b15f/driver/Makefile

41 lines
1 KiB
Makefile
Raw Normal View History

2019-03-26 08:57:01 +00:00
# Name: Makefile
# Project: B15F (board15 Famulus Edition)
# Author: Tristan Krause
# Creation Date: 2019-03-22
2019-04-03 13:20:49 +00:00
# Environment
2019-03-26 08:57:01 +00:00
COMPILER_PATH = g++
2019-04-03 13:20:49 +00:00
# Options
OUT_MAIN = main
OBJ_MAIN = main.o
OUT_CLI = cli
OBJ_CLI = cli.o
CFLAGS = -std=c++14 -O3 -Wall -Wextra
2019-04-03 14:15:35 +00:00
LDFLAGS = -lcurses
2019-04-04 11:19:11 +00:00
OBJECTS_DRV = drv/usart.o drv/b15f.o drv/plottyfile.o drv/dot.o
2019-04-05 06:33:31 +00:00
OBJECTS_UI = ui/view.o ui/view_selection.o ui/view_info.o
2019-03-26 08:57:01 +00:00
COMPILE = $(COMPILER_PATH) $(CFLAGS)
2019-04-04 11:19:11 +00:00
main: $(OBJECTS_DRV) $(OBJ_MAIN)
2019-04-03 13:20:49 +00:00
@echo "Linking..."
2019-04-04 11:19:11 +00:00
$(COMPILE) $(OBJ_MAIN) $(OBJECTS_DRV) -o $(OUT_MAIN) $(LDFLAGS)
2019-04-03 13:20:49 +00:00
2019-04-04 11:19:11 +00:00
cli: $(OBJECTS_DRV) $(OBJECTS_UI) $(OBJ_CLI)
2019-03-26 08:57:01 +00:00
@echo "Linking..."
2019-04-04 11:19:11 +00:00
$(COMPILE) $(OBJ_CLI) $(OBJECTS_DRV) $(OBJECTS_UI) -o $(OUT_CLI) $(LDFLAGS)
2019-03-26 08:57:01 +00:00
help:
@echo "This Makefile has the following rules:"
2019-04-03 13:20:49 +00:00
@echo "make main .... to compile main.cpp"
@echo "make cli .... to compile Command Line Interface"
@echo "make clean ... to delete objects and executables"
2019-03-26 08:57:01 +00:00
clean:
@echo "Cleaning..."
2019-04-04 14:16:28 +00:00
rm -f $(OBJECTS_DRV) $(OBJECTS_UI) $(OBJ_CLI) $(OUT_CLI) $(OBJ_MAIN) $(OUT_MAIN)
2019-03-26 08:57:01 +00:00
.cpp.o:
$(COMPILE) -c $< -o $@