-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile.hosted
41 lines (32 loc) · 1.39 KB
/
Makefile.hosted
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
INCLUDE = -Ilibraries/TTVoutfonts -Ilibraries/TTBAS_LIB -Ilibraries/TKeyboard/src \
-Ilibraries/ESP8266SAM/src -Ilibraries/azip -Ilibraries/lua
CFLAGS=-DARDUINO -DESP8266 -DESP8266_NOWIFI -DHOSTED -DF_CPU=160000000 \
-O2 -g -Ihosted -Iarduino_compat -Ittbasic $(INCLUDE) -Wall -Wno-unused
#CFLAGS += -m32
#CFLAGS += -fprofile-arcs -ftest-coverage
CXXFLAGS = $(CFLAGS) -fpermissive -std=c++11
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) \
hosted/ttbasic.cpp \
hosted/Arduino.cpp $(shell ls arduino_compat/*.cpp) \
hosted/hosted_spi.cpp hosted/TKeyboard.cpp \
hosted/files.cpp hosted/hosted_i2s.cpp
SOURCES_C = $(shell ls ttbasic/*.c)
OBJS = $(SOURCES:.cpp=.o)
OBJS_C = $(SOURCES_C:.c=.o)
PROF = $(SOURCES:.cpp=.gcda) $(SOURCES:.cpp=.gcno) \
$(SOURCES_C:.c=.gcda) $(SOURCES_C:.c=.gcno)
all: basic
basic: $(OBJS) $(OBJS_C)
$(CXX) $(CXXFLAGS) -o basic $(OBJS) $(OBJS_C) -lSDL
clean:
rm -f $(OBJS) $(OBJS_C) $(PROF)
$(MAKE) -C ttbasic -f autogen.mk autogen_clean
gcov:
rm -f *.gcov
gcov $(SOURCES) $(SOURCES_C)
$(OBJS) $(OBJS_C): $(shell ls hosted/*.h ttbasic/*.h libraries/*/src/*.h libraries/*/*.h)
ttbasic/funtbl.h: ttbasic/icode.txt
$(MAKE) -C ttbasic -f autogen.mk funtbl.h epigrams.h version.h
$(OBJS): ttbasic/funtbl.h