diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -34,8 +34,13 @@ ${BUILD_DIR}/login/%.o: src/login/%.cpp | ${BUILD_DIR}/login/. $(COMPILE.cpp) -o $@ $< ${BUILD_DIR}/map/%.o: src/map/%.cpp | ${BUILD_DIR}/map/. $(COMPILE.cpp) -o $@ $< +${BUILD_DIR}/tests/%.o: src/tests/%.cpp | ${BUILD_DIR}/tests/. + $(COMPILE.cpp) -o $@ $< ${BUILD_DIR}/tool/%.o: src/tool/%.cpp | ${BUILD_DIR}/tool/. $(COMPILE.cpp) -o $@ $< +${BUILD_DIR}/gtest-all.o: ${GTEST_DIR}/src/gtest-all.cc | ${BUILD_DIR}/. + $(COMPILE.cpp) -I${GTEST_DIR} -DGTEST_HAS_PTHREAD=0 -o $@ $< + MOSTPROGS = login-server char-server ladmin eathena-monitor PROGS = ${MOSTPROGS} map-server @@ -59,6 +64,10 @@ ladmin: ${BUILD_DIR}/ladmin/ladmin eathena-monitor: ${BUILD_DIR}/tool/eathena-monitor cp -f $< $@ +${BUILD_DIR}/tests/main: ${BUILD_DIR}/tests/main.o $(patsubst src/%.cpp,obj/%.o,$(wildcard src/*/*_test.cpp)) ${BUILD_DIR}/gtest-all.o +test: ${BUILD_DIR}/tests/main + $< + # Executable dependencies - generated by hand ${BUILD_DIR}/char/char: ${BUILD_DIR}/char/char.o ${BUILD_DIR}/char/inter.o ${BUILD_DIR}/char/int_party.o ${BUILD_DIR}/char/int_storage.o ${BUILD_DIR}/common/core.o ${BUILD_DIR}/common/socket.o ${BUILD_DIR}/common/timer.o ${BUILD_DIR}/common/db.o ${BUILD_DIR}/common/lock.o ${BUILD_DIR}/common/random.o ${BUILD_DIR}/common/utils.o ${BUILD_DIR}/common/cxxstdio.o ${BUILD_DIR}/common/extract.o ${BUILD_DIR}/ladmin/ladmin: ${BUILD_DIR}/ladmin/ladmin.o ${BUILD_DIR}/common/md5calc.o ${BUILD_DIR}/common/core.o ${BUILD_DIR}/common/socket.o ${BUILD_DIR}/common/timer.o ${BUILD_DIR}/common/db.o ${BUILD_DIR}/common/random.o ${BUILD_DIR}/common/utils.o ${BUILD_DIR}/common/cxxstdio.o @@ -67,7 +76,7 @@ ${BUILD_DIR}/map/map: ${BUILD_DIR}/map/map.o ${BUILD_DIR}/map/tmw.o ${BUILD_DIR} ${BUILD_DIR}/tool/eathena-monitor: ${BUILD_DIR}/tool/eathena-monitor.o ${BUILD_DIR}/common/utils.o # silence build warnings for code beyond my control -${BUILD_DIR}/map/magic-interpreter-lexer.o ${BUILD_DIR}/map/magic-interpreter-parser.o : override WARNINGS= +${BUILD_DIR}/map/magic-interpreter-lexer.o ${BUILD_DIR}/map/magic-interpreter-parser.o ${BUILD_DIR}/gtest-all.o: override WARNINGS= # deps.make is *NOT* automatically rebuilt normally # but the generated source files do need to be done first |