forked from graphitemaster/neothyne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (40 loc) · 778 Bytes
/
Makefile
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
47
48
49
50
51
include include.mk
CC ?= clang
CXX = $(CC)
GAME_BIN = neothyne
CXXFLAGS = \
-std=c++11 \
-Wall \
-Wextra \
-ffast-math \
-fno-exceptions \
-fno-rtti \
-I. \
-DDEBUG_GL \
-DDXT_COMPRESSOR \
-O3
ifneq (, $(findstring -g, $(CXXFLAGS)))
STRIP = true
else
STRIP = strip
endif
ENGINE_CXXFLAGS = \
$(CXXFLAGS) \
`sdl2-config --cflags`
ENGINE_LDFLAGS = \
-lm \
`sdl2-config --libs`
all: $(GAME_BIN)
$(GAME_BIN): $(GAME_OBJECTS)
$(CXX) $(GAME_OBJECTS) $(ENGINE_LDFLAGS) -o $@
$(STRIP) $@
.cpp.o:
$(CXX) -MD -c $(ENGINE_CXXFLAGS) $< -o $@
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
clean:
rm -f $(GAME_OBJECTS) $(GAME_OBJECTS:.o=.P)
rm -f $(GAME_BIN)
-include *.P