forked from uli/basicengine-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.sdl
More file actions
46 lines (34 loc) · 1.39 KB
/
Makefile.sdl
File metadata and controls
46 lines (34 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
TARGET = basic.sdl
SOURCES = $(shell ls libraries/lua/*.cpp) $(shell ls ttbasic/*.cpp) $(shell ls libraries/TTBAS_LIB/*.cpp) \
$(shell ls libraries/ESP8266SAM/src/*.cpp) $(shell ls libraries/TTVoutfonts/*.cpp) \
$(shell ls libraries/azip/*.cpp) \
$(shell ls sdl/*.cpp) \
$(shell ls arduino_compat/*.cpp)
SOURCES_C = $(shell ls ttbasic/*.c)
OBJS = $(SOURCES:.cpp=.o) $(SOURCES_C:.c=.o)
PROF = $(SOURCES:.cpp=.gcda) $(SOURCES:.cpp=.gcno) \
$(SOURCES_C:.c=.gcda) $(SOURCES_C:.c=.gcno)
LIBS = -lstdc++ -lSDL -lSDL_gfx
CROSS_COMPILE=
CC=$(CROSS_COMPILE)gcc
CXX=$(CROSS_COMPILE)g++
INCLUDE = -Ilibraries/TTVoutfonts -Ilibraries/TTBAS_LIB -Ilibraries/TKeyboard/src \
-Ilibraries/ESP8266SAM/src -Ilibraries/azip -Ilibraries/lua
ARDFLAGS = -g -MMD -O3 -funroll-loops -fomit-frame-pointer -fno-exceptions -Isdl -Iarduino_compat -Ittbasic $(INCLUDE) \
-Wall -Wno-unused -D_GNU_SOURCE -DSDL
CFLAGS += $(ARDFLAGS)
#CFLAGS += -m32
#CFLAGS += -fprofile-arcs -ftest-coverage
CXXFLAGS += $(ARDFLAGS) -fpermissive -std=c++11 -fno-exceptions
$(TARGET): $(OBJS)
$(CXX) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(OBJS:%.o=%.d) $(PROF)
$(MAKE) -C ttbasic -f autogen.mk autogen_clean
gcov:
rm -f *.gcov
$(CROSS_COMPILE)gcov $(SOURCES) $(SOURCES_C)
ttbasic/funtbl.h: ttbasic/icode.txt
$(MAKE) -C ttbasic -f autogen.mk funtbl.h epigrams.h version.h
$(OBJS): ttbasic/funtbl.h
-include $(OBJS:%.o=%.d)