summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-09-20 12:23:02 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-09-21 10:32:11 -0700
commita3c885e41bc188051f8918f090be998469018bca (patch)
treeccf891b900a52ed8146732f216c2d091996cb0b2 /Makefile.in
parent91669aba40ce744f2d759c430537c94f23ec9fc2 (diff)
downloadtmwa-a3c885e41bc188051f8918f090be998469018bca.tar.gz
tmwa-a3c885e41bc188051f8918f090be998469018bca.tar.bz2
tmwa-a3c885e41bc188051f8918f090be998469018bca.tar.xz
tmwa-a3c885e41bc188051f8918f090be998469018bca.zip
Use the One Makefile to build them all
This changes the names of the built binaries: login-server -> tmwa-login char-server -> tmwa-char map-server -> tmwa-map ladmin -> tmwa-admin eathena-monitor -> tmwa-monitor It also gets rid of the 'deps.make' file.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in141
1 files changed, 10 insertions, 131 deletions
diff --git a/Makefile.in b/Makefile.in
index ada3921..01592ac 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,132 +1,11 @@
-vpath %.ypp ${SRC_DIR}
-vpath %.lpp ${SRC_DIR}
-vpath %.cpp ${SRC_DIR}
-vpath %.hpp ${SRC_DIR}
-
-SHELL=/bin/bash
-BUILD_DIR = obj
-default: login-server char-server map-server ladmin eathena-monitor
-.DELETE_ON_ERROR:
-
-# this used to be in make.defs
-CXXFLAGS += ${WARNINGS}
-ifeq (${ENABLE_WARNINGS},yes)
-WARNINGS = -include ${SRC_DIR}/src/warnings.hpp
+# This file is reverse included. Don't forward in that case.
+ifeq '${MAKEFILE_LIST}' ' Makefile'
+.DEFAULT_GOAL=.default-target-wrapper
+# The documentation for ${MAKECMDGOALS} says "Note that this variable
+# should be used only in special circumstances."
+# If you do not understand *exactly* why I do this instead of
+# %::;${MAKE}, stay away from this code. You have been warned.
+.default-target-wrapper ${MAKECMDGOALS}: .all-target-wrapper
+.all-target-wrapper:
+ ${MAKE} -rRf ${SRC_DIR}/real.make ${MAKECMDGOALS}
endif
-
-# gdb bug 15801
-ifeq (${ENABLE_ABI6},yes)
-CXX += -fabi-version=6
-endif
-ifeq (${ENABLE_CYGWIN_HACKS},yes)
-override CXX += -std=gnu++0x
-else
-override CXX += -std=c++0x
-endif
-# for linking
-override CC = ${CXX}
-
-override CXXFLAGS += -fstack-protector -fno-strict-aliasing
-override CXXFLAGS += -fvisibility=hidden
-# end what used to be in make.defs
-
-.PHONY: all clean common most
-# With no prerequisites, no target should ever be implicitly deleted.
-# With any prerequisites, those targets won't be (no patterns).
-.SECONDARY:
-# This does the same, but only for its prerequisites.
-# Unlike .SECONDARY, these may be patterns as well as normal prerequisites.
-# .PRECIOUS: %/.
-
-%/.:
- +mkdir -p $@
-
-# The default recipe is suboptimal
-%.cpp: %.lpp
- +mkdir -p ${@D}
- $(FLEX) -o $@ $<
-%.cpp %.hpp: %.ypp
- +mkdir -p ${@D}
- $(BISON) -d -o $*.cpp $<
-
-
-# All this duplication is required because make handles pattern rules specially
-${BUILD_DIR}/char/%.o: src/char/%.cpp | ${BUILD_DIR}/char/.
- $(COMPILE.cpp) -o $@ $<
-${BUILD_DIR}/common/%.o: src/common/%.cpp | ${BUILD_DIR}/common/.
- $(COMPILE.cpp) -o $@ $<
-${BUILD_DIR}/ladmin/%.o: src/ladmin/%.cpp | ${BUILD_DIR}/ladmin/.
- $(COMPILE.cpp) -o $@ $<
-${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
-# Things to actually make
-all: ${PROGS}
-most: ${MOSTPROGS}
-clean:
- rm -rf ${PROGS} ${BUILD_DIR}/
-common: ${BUILD_DIR}/common/core.o ${BUILD_DIR}/common/db.o ${BUILD_DIR}/common/lock.o ${BUILD_DIR}/common/md5calc.o ${BUILD_DIR}/common/random.o ${BUILD_DIR}/common/nullpo.o ${BUILD_DIR}/common/socket.o ${BUILD_DIR}/common/timer.o ${BUILD_DIR}/common/utils.o ${BUILD_DIR}/common/extract.o ${BUILD_DIR}/common/ip.o
-magic: ${BUILD_DIR}/map/magic-interpreter-lexer.o ${BUILD_DIR}/map/magic-interpreter-parser.o ${BUILD_DIR}/map/magic-expr.o ${BUILD_DIR}/map/magic-interpreter-base.o ${BUILD_DIR}/map/magic-stmt.o ${BUILD_DIR}/map/magic.o
-
-# Top level programs
-login-server: ${BUILD_DIR}/login/login
- cp -f $< $@
-char-server: ${BUILD_DIR}/char/char
- cp -f $< $@
-map-server: ${BUILD_DIR}/map/map
- cp -f $< $@
-ladmin: ${BUILD_DIR}/ladmin/ladmin
- cp -f $< $@
-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 \
- ${BUILD_DIR}/common/extract.o ${BUILD_DIR}/common/md5calc.o ${BUILD_DIR}/common/random.o ${BUILD_DIR}/common/ip.o
-test: ${BUILD_DIR}/tests/main
- ${TESTER} $< ${TEST_ARGS}
-
-# 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/extract.o ${BUILD_DIR}/common/ip.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/extract.o ${BUILD_DIR}/common/random.o ${BUILD_DIR}/common/utils.o ${BUILD_DIR}/common/ip.o
-${BUILD_DIR}/login/login: ${BUILD_DIR}/login/login.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/md5calc.o ${BUILD_DIR}/common/utils.o ${BUILD_DIR}/common/extract.o ${BUILD_DIR}/common/ip.o
-${BUILD_DIR}/map/map: ${BUILD_DIR}/map/map.o ${BUILD_DIR}/map/tmw.o ${BUILD_DIR}/map/magic-interpreter-lexer.o ${BUILD_DIR}/map/magic-interpreter-parser.o ${BUILD_DIR}/map/magic-interpreter-base.o ${BUILD_DIR}/map/magic-expr.o ${BUILD_DIR}/map/magic-stmt.o ${BUILD_DIR}/map/magic.o ${BUILD_DIR}/map/map.o ${BUILD_DIR}/map/chrif.o ${BUILD_DIR}/map/clif.o ${BUILD_DIR}/map/pc.o ${BUILD_DIR}/map/npc.o ${BUILD_DIR}/map/path.o ${BUILD_DIR}/map/itemdb.o ${BUILD_DIR}/map/mob.o ${BUILD_DIR}/map/script.o ${BUILD_DIR}/map/storage.o ${BUILD_DIR}/map/skill.o ${BUILD_DIR}/map/skill-pools.o ${BUILD_DIR}/map/atcommand.o ${BUILD_DIR}/map/battle.o ${BUILD_DIR}/map/intif.o ${BUILD_DIR}/map/trade.o ${BUILD_DIR}/map/party.o ${BUILD_DIR}/common/core.o ${BUILD_DIR}/common/socket.o ${BUILD_DIR}/common/timer.o ${BUILD_DIR}/map/grfio.o ${BUILD_DIR}/common/db.o ${BUILD_DIR}/common/lock.o ${BUILD_DIR}/common/nullpo.o ${BUILD_DIR}/common/random.o ${BUILD_DIR}/common/md5calc.o ${BUILD_DIR}/common/utils.o ${BUILD_DIR}/common/extract.o ${BUILD_DIR}/common/ip.o
-${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 ${BUILD_DIR}/gtest-all.o: override WARNINGS=
-# for out-of-tree builds
-${BUILD_DIR}/map/magic-interpreter-lexer.o ${BUILD_DIR}/map/magic-interpreter-parser.o: override CPPFLAGS+=-I${SRC_DIR}/src/map
-
-# deps.make is *NOT* automatically rebuilt normally
-# but the generated source files do need to be done first
-deps.make: src/map/magic-interpreter-parser.cpp src/map/magic-interpreter-lexer.cpp
- ( cd ${SRC_DIR}; for F in `find src/ -name '*.cpp'`; do \
- ${CXX} ${CPPFLAGS} ${CXXFLAGS} -MM "$$F" -MT "$$(sed 's/src/$${BUILD_DIR}/;s/\.cpp/.o/' <<< "$$F")"; \
- done ) > deps.make
- echo '# vim: filetype=make' >> deps.make
-
-include deps.make
-
-install:
- install -d ${BINDIR}
- install --backup=${ENABLE_BACKUPS_DURING_INSTALL} -t ${BINDIR} $(wildcard ${PROGS})
-
-# might need changes later to handle static declarations (solution:
-# run ctags twice, specifying forward patterns for the declarations
-# and backward patterns for the definition)
-tags: $(shell cd ${SRC_DIR}; git ls-files src/ | grep -v GNUmakefile)
- ctags --totals --c-kinds=+px -f $@ $^
-Makefile: ${SRC_DIR}/Makefile.in
- @echo Makefile.in updated, you must rerun configure
- @false