OpenGTA/makefile

83 lines
1.7 KiB
Makefile
Raw Normal View History

2015-12-03 00:37:02 +00:00
include src_list.make
INC_EX_LIBS = $(PHYSFS_INC) $(SDL_INC) $(LUA_INC)
2015-12-03 00:37:37 +00:00
INC_INTERN = -I. -Iloki/include/loki -Iutil -Icoldet -Imath -Iopensteer/include
2015-12-03 00:37:02 +00:00
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:
2015-12-03 00:37:37 +00:00
rm -f tags depend *.o tools/*.o coldet/*.o lua_addon/*.o math/*.o util/*.o opensteer/src/Clock.o \
2015-12-03 00:37:02 +00:00
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
2015-12-03 00:38:22 +00:00
package: release_files_sorted
sh tools/cvslog.sh
2015-12-03 00:37:02 +00:00
(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
2015-12-03 00:37:37 +00:00
make -c loki clean
rm -f loki/lib/libloki.*
rm -f $(OSTEER_OBJ)
2015-12-03 00:37:02 +00:00
depend: loki src_list.make
$(RM) depend
2015-12-03 00:37:37 +00:00
$(CXX) $(CXXFLAGS) -E -MM $(GL_SRC) $(OGTA_SRC) $(UTIL_SRC) > depend
2015-12-03 00:37:02 +00:00