forked from uli/basicengine-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.h3
44 lines (32 loc) · 1.28 KB
/
Makefile.h3
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
TARGET = basic
INIT_FS_DIR = ../basicengine_demos
OSDIR = $(HOME)/devel/orangepi/allwinner-bare-metal
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 h3/*.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++
include $(OSDIR)/build.mk
INCLUDE = -Ilibraries/TTVoutfonts -Ilibraries/TTBAS_LIB -Ilibraries/TKeyboard/src \
-Ilibraries/ESP8266SAM/src -Ilibraries/azip -Ilibraries/lua
ARDFLAGS = -DH3 -O2 -g -Ih3 -Iarduino_compat -Ittbasic $(INCLUDE) \
-Wall -Wno-unused -D_GNU_SOURCE
CFLAGS += $(ARDFLAGS)
#CFLAGS += -m32
#CFLAGS += -fprofile-arcs -ftest-coverage
CXXFLAGS += $(ARDFLAGS) -fpermissive -std=c++11 -fno-exceptions
clean:
rm -f $(OBJS) $(OBJS:%.o=%.d) $(PROF)
$(MAKE) -C ttbasic -f autogen.mk autogen_clean
gcov:
rm -f *.gcov
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)