-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile
82 lines (59 loc) · 1.66 KB
/
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
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
include src_list.make
INC_EX_LIBS = $(PHYSFS_INC) $(SDL_INC) $(LUA_INC)
INC_INTERN = -I. -Iloki/include/loki -Iutil -Icoldet -Imath -Iopensteer/include
INC = $(INC_INTERN) $(INC_EX_LIBS)
FLAGS = $(WARN) $(DEBUG) $(OPT)
BUILD_FOR = $(shell if [ -n "$(HOST)" ]; then echo $(HOST) ; else echo "LINUX"; fi)
#SDL_GL_LIB = -lGL -lGLU
LOKI_LIB = -Wl,-Rloki/lib -Lloki/lib -lloki
#COLDET_LIB = -Wl,-Rcoldet -Lcoldet -lcoldet
CXXFLAGS=$(FLAGS) $(DEFS) \
$(INC)
src_list.make: prepare_build.sh
./prepare_build.sh $(BUILD_FOR)
$(MAKE) depend
%.o: %.cpp
$(CXX) $(FLAGS) $(DEFS) \
$(INC) \
-c -o $@ $<
%.o: %.c
$(CC) $(CCFLAGS) \
-c -o $@ $<
loki:
ifeq ($(BUILD_FOR), LINUX)
make -f loki.make
else
make -f loki.make.w32_cross
endif
ctags:
ctags *.cpp util/*.cpp
coldet/libcoldet.a:
make -C coldet -f makefile.g++ all
clean:
rm -f tags depend *.o tools/*.o coldet/*.o lua_addon/*.o math/*.o util/*.o opensteer/src/Clock.o \
spriteplayer gfxextract viewer $(TOOLS) objdump objdump_map minimap slopeview luaviewer g24
html: doxy_main.h
doxygen
doxygen: doxy_main.h
doxygen
doxy_main.h: doc/hacking.txt tools/doxy_doc.sh
./tools/doxy_doc.sh > doxy_main.h
doxyclean:
$(RM) doxy_main.h -r doc/html
package: release_files_sorted
sh tools/cvslog.sh
(cd .. && tar jvcf ogta_src_`date +%F`.tar.bz2 -T ogta/release_files_sorted)
@echo "saved as: ogta_src_`date +%F.tar.bz2`"
rclean:
make libclean
make clean
make doxyclean
rm -f src_list.make
libclean:
make -C coldet -f makefile.g++ clean
make -c loki clean
rm -f loki/lib/libloki.*
rm -f $(OSTEER_OBJ)
depend: loki src_list.make
$(RM) depend
$(CXX) $(CXXFLAGS) -E -MM $(GL_SRC) $(OGTA_SRC) $(UTIL_SRC) > depend