OpenGTA/makefile
Anonymous Maarten 78c27f03c8 2006-12-10
2015-12-03 01:37:02 +01:00

79 lines
1.5 KiB
Makefile

include src_list.make
INC_EX_LIBS = $(PHYSFS_INC) $(SDL_INC) $(LUA_INC)
INC_INTERN = -I. -Iloki/include/loki -Iutil -Icoldet -Imath
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 \
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:
(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
depend: loki src_list.make
$(RM) depend
$(CXX) $(CXXFLAGS) -DGCC -E -MM $(GL_SRC) $(OGTA_SRC) $(UTIL_SRC) > depend