-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (60 loc) · 1.36 KB
/
Makefile
File metadata and controls
81 lines (60 loc) · 1.36 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#CXX:=g++
#CC:=gcc
#
# clang 3.0 should work.
# clang 2.9 is known to be broken, as it can't seem to
# compile the GNU header files…
#
CXX:=clang++
CC:=clang
AR:=ar
FLAGS:=-Wall -Werror -g -O3
# GL_SILENCE_DEPRECATION silences opengl deprecation errors on osx.
FLAGS +=-DGL_SILENCE_DEPRECATION
ifeq ($(CXX), clang)
FLAGS+=-fno-color-diagnostics
endif
CXXFLAGS:=$(FLAGS) -std=c++0x
CFLAGS:=$(FLAGS) -std=c99
OS := $(shell uname)
ifeq ($(OS), Darwin)
LIB_RT_UNLESS_OSX := ""
else
LIB_RT_UNLESS_OSX := "-lrt"
endif
LDFLAGS:=$(FLAGS) -std=c++0x $(LIB_RT_UNLESS_OSX)
EVERYTHING:=
TESTS:=
all: everything tests
include utils/Make.inc
include rdb/Make.inc
include structs/Make.inc
include search/Make.inc
include tiles/Make.inc
include pancake/Make.inc
include gridnav/Make.inc
include visnav/Make.inc
include plat2d/Make.inc
include graphics/Make.inc
include drobot/Make.inc
include segments/Make.inc
include vacuum/Make.inc
include traffic/Make.inc
everything: $(EVERYTHING)
tests: $(TESTS)
%.o: %.c
@echo $@
@$(CC) -c $(CFLAGS) -o $@ $<
%.o: %.cc
@echo $@
@$(CXX) -c $(CXXFLAGS) -o $@ $<
%.d: %.cc
@echo $@
@./dep.sh $(CXX) $(shell dirname $*) $(CXXFLAGS) $*.cc > $@
%.d: %.c
@echo $@
@./dep.sh $(CC) $(shell dirname $*) $(CFLAGS) $*.c > $@
clean:
rm -f $(CLEAN) $(BINS) $(TMPLS:.hpp=.hpp.gch)
nuke: clean
rm -f $(shell find . -not -iwholename \*.hg\* -name \*.d)