blob: b818d9cb300e44d9c8c8ee4ce2ca16d6db9da7f1 (
plain)
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
|
--- a/Makefile.linux
+++ b/Makefile.linux
@@ -29,11 +29,11 @@
$(shell pkg-config zlib --cflags) \
$(foreach FEATURE, $(FEATURES), $($(FEATURE)_CFLAGS))
-CFLAGS=$(PLATFORM) $(CWARN) -O1 -ggdb -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
+CFLAGS += -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
-CXXFLAGS=$(PLATFORM) $(CXXWARN) -O1 -ggdb -pipe $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
+CXXFLAGS += $(OPTIONS) -fno-strict-aliasing $(EXTRA_INCLUDES)
-LDFLAGS=$(shell pkg-config sdl2 --libs) \
+LDFLAGS += $(shell pkg-config sdl2 --libs) \
$(shell pkg-config libxml-2.0 --libs) \
$(shell pkg-config SDL2_net --libs) \
$(shell pkg-config SDL2_image --libs) \
@@ -140,8 +140,8 @@
# the compile targets
$(EXE): $(OBJS)
- @echo " LINK $(EXE)"
- @$(LINK) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS)
+ @echo "$(CC) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS)"
+ @$(CC) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS)
#recompile on Makefile or conf change
#.depend $(OBJS): Makefile.linux make.conf
@@ -152,14 +152,14 @@
DEPS_MAGIC := $(shell mkdir $(DEPS_DIRS) > /dev/null 2>&1 || :)
$(COBJS): %.o: %.c Makefile.linux make.conf
- @echo " CC $@"
+ @echo "$(CC) $(CFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@"
@if $(CC) $(CFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@; then \
mv ".deps/$@.pp" ".deps/$@.P"; \
else rm -f ".deps/$@.pp"; exit 1; \
fi
$(CXXOBJS): %.o: %.cpp Makefile.linux make.conf
- @echo " CXX $@"
+ @echo "$(CXX) $(CXXFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@"
@if $(CXX) $(CXXFLAGS) -MT '$@' -MD -MP -MF '.deps/$@.pp' -c $< -o $@; then \
mv ".deps/$@.pp" ".deps/$@.P"; \
else rm -f ".deps/$@.pp"; exit 1; \
|