-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile.sdl
41 lines (28 loc) · 1.05 KB
/
Makefile.sdl
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
TARGET = basic.sdl
OBJDIR = build_sdl
all: $(TARGET)
DEMOS_DIR = ../basicengine_demos
include common.mk
SOURCES = $(COMMON_SOURCES) $(shell ls sdl/*.cpp)
SOURCES_C = $(COMMON_SOURCES_C) libraries/tinycc/lib/va_list.c
OBJS = $(SOURCES:.cpp=.o) $(SOURCES_C:.c=.o)
OUT_OBJS = $(addprefix $(OBJDIR)/, $(OBJS))
LIBS = -lstdc++ `sdl-config --libs` -L$(OBJDIR)/dyncall/dyncall -ldyncall_s -lm
CROSS_COMPILE=
CC=$(CROSS_COMPILE)gcc
CXX=$(CROSS_COMPILE)g++
INCLUDE = $(COMMON_INCLUDE)
ARDFLAGS = $(COMMON_ARDFLAGS) -MMD -funroll-loops -fomit-frame-pointer -Isdl \
-DSDL -DDISABLE_NEON `sdl-config --cflags`
CFLAGS += $(ARDFLAGS) -Wno-pointer-sign
#CFLAGS += -m32
#CFLAGS += -fprofile-arcs -ftest-coverage
#CFLAGS += -fsanitize=undefined -fsanitize-address-use-after-scope
CXXFLAGS += $(ARDFLAGS) -fpermissive -std=c++11 -fno-exceptions
$(TARGET): $(OUT_OBJS) $(OBJDIR)/dyncall/dyncall/libdyncall_s.a
$(CXX) $(CFLAGS) -o $(TARGET) $(OUT_OBJS) $(LIBS)
clean:
rm -fr build_sdl
@rm -f $(PROF)
$(MAKE) -C ttbasic -f autogen.mk autogen_clean
-include $(OUT_OBJS:%.o=%.d)