From dbbfda0e96037da4f208ff8f00d181a5294484ae Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 22 Jun 2013 22:30:13 -0700 Subject: add new stuff stuff (with tests!), poison memcmp and strncpy --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1e78b51..5436881 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.3-70-g09d2