dir structure
This commit is contained in:
parent
30d8aefce3
commit
2c4f2653cd
32 changed files with 7 additions and 4 deletions
43
driver/src/Makefile
Normal file
43
driver/src/Makefile
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Name: Makefile
|
||||
# Project: B15F (board15 Famulus Edition)
|
||||
# Author: Tristan Krause
|
||||
# Creation Date: 2019-03-22
|
||||
|
||||
# Environment
|
||||
COMPILER_PATH = g++
|
||||
|
||||
# Options
|
||||
OUT_MAIN = main.elf
|
||||
OBJ_MAIN = main.o
|
||||
OUT_CLI = cli.elf
|
||||
OBJ_CLI = cli.o
|
||||
CFLAGS = -std=c++14 -O3 -Wall -Wextra
|
||||
LDFLAGS = -lcurses -lpthread
|
||||
OBJECTS_DRV = drv/usart.o drv/b15f.o drv/plottyfile.o drv/dot.o
|
||||
OBJECTS_UI = ui/view.o ui/view_selection.o ui/view_promt.o ui/view_info.o ui/view_monitor.o ui/ui.o
|
||||
|
||||
COMPILE = $(COMPILER_PATH) $(CFLAGS)
|
||||
|
||||
all: drv cli
|
||||
|
||||
drv: $(OBJECTS_DRV) $(OBJ_MAIN)
|
||||
@echo "Linking..."
|
||||
$(COMPILE) $(OBJ_MAIN) $(OBJECTS_DRV) -o $(OUT_MAIN) $(LDFLAGS)
|
||||
|
||||
cli: $(OBJECTS_DRV) $(OBJECTS_UI) $(OBJ_CLI)
|
||||
@echo "Linking..."
|
||||
$(COMPILE) $(OBJ_CLI) $(OBJECTS_DRV) $(OBJECTS_UI) -o $(OUT_CLI) $(LDFLAGS)
|
||||
|
||||
help:
|
||||
@echo "This Makefile compiles the b15f driver and command line interface (CLI):"
|
||||
@echo "make ......... to compile all"
|
||||
@echo "make drv ..... to compile the b15f driver"
|
||||
@echo "make cli .... to compile the cli"
|
||||
@echo "make clean ... to delete objects and executables"
|
||||
|
||||
clean:
|
||||
@echo "Cleaning..."
|
||||
rm -f $(OBJECTS_DRV) $(OBJECTS_UI) $(OBJ_CLI) $(OUT_CLI) $(OBJ_MAIN) $(OUT_MAIN)
|
||||
|
||||
.cpp.o:
|
||||
$(COMPILE) -c $< -o $@
|
Loading…
Add table
Add a link
Reference in a new issue