summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-18 05:11:10 +0200
committerHaru <haru@dotalux.com>2013-09-18 16:29:18 +0200
commitbabdf60b0339ac4249072a4ba13d27052e0b2fc5 (patch)
treeadfc85bbae73830081098ae7dc56325448b8cfc7 /Makefile.in
parent78c7c6bf04a6c96d92524ae37ad165e65f599eb8 (diff)
downloadhercules-babdf60b0339ac4249072a4ba13d27052e0b2fc5.tar.gz
hercules-babdf60b0339ac4249072a4ba13d27052e0b2fc5.tar.bz2
hercules-babdf60b0339ac4249072a4ba13d27052e0b2fc5.tar.xz
hercules-babdf60b0339ac4249072a4ba13d27052e0b2fc5.zip
Makefiles improvements and cleanup
This should resolve #138 (please reopen or comment on it if it's not the case). Special thanks to Takkun for helping to reproduce the issue. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in92
1 files changed, 53 insertions, 39 deletions
diff --git a/Makefile.in b/Makefile.in
index 5d59a7144..d78aa631d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,14 +2,13 @@
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- ALL_DEPENDS=common_sql login_sql char_sql map_sql tools import
- SQL_DEPENDS=common_sql login_sql char_sql map_sql import
+ ALL_DEPENDS=common_sql login_sql char_sql map_sql tools | import
+ SQL_DEPENDS=common_sql login_sql char_sql map_sql | import
COMMON_SQL_DEPENDS=mt19937ar libconfig
LOGIN_SQL_DEPENDS=mt19937ar libconfig common_sql
CHAR_SQL_DEPENDS=mt19937ar libconfig common_sql
MAP_SQL_DEPENDS=mt19937ar libconfig common_sql
TOOLS_DEPENDS=mt19937ar libconfig common_sql
- CONVERTERS_DEPENDS=common_sql
else
ALL_DEPENDS=needs_mysql
SQL_DEPENDS=needs_mysql
@@ -49,30 +48,39 @@ all: $(ALL_DEPENDS)
sql: $(SQL_DEPENDS)
common_sql: $(COMMON_SQL_DEPENDS)
+ @echo " MAKE $@"
@$(MAKE) -C src/common sql
mt19937ar:
+ @echo " MAKE $@"
@$(MAKE) -C 3rdparty/mt19937ar
libconfig:
+ @echo " MAKE $@"
@$(MAKE) -C 3rdparty/libconfig
login_sql: $(LOGIN_SQL_DEPENDS)
+ @echo " MAKE $@"
@$(MAKE) -C src/login sql
char_sql: $(CHAR_SQL_DEPENDS)
+ @echo " MAKE $@"
@$(MAKE) -C src/char
map_sql: $(MAP_SQL_DEPENDS)
+ @echo " MAKE $@"
@$(MAKE) -C src/map sql
tools: $(TOOLS_DEPENDS)
+ @echo " MAKE $@"
@$(MAKE) -C src/tool
test:
+ @echo " MAKE $@"
@$(MAKE) -C src/test
plugins: $(PLUGIN_DEPENDS)
+ @echo " MAKE $@"
@$(MAKE) -C src/plugins
import:
@@ -93,15 +101,21 @@ clean:
@$(MAKE) -C src/tool $@
@$(MAKE) -C src/test $@
+distclean: clean
+ @-rm -f Makefile src/common/Makefile 3rdparty/mt19937ar/Makefile \
+ 3rdparty/libconfig/Makefile src/char/Makefile src/login/Makefile \
+ src/map/Makefile src/plugins/Makefile src/tool/Makefile \
+ src/test/Makefile
+
help:
- @echo "most common targets are 'all' 'sql' 'conf' 'clean' 'help'"
+ @echo "most common targets are 'all' 'sql' 'clean' 'plugins' 'help'"
@echo "possible targets are:"
@echo "'common_sql' - builds object files used in SQL servers"
@echo "'mt19937ar' - builds object file of Mersenne Twister MT19937"
@echo "'libconfig' - builds object files of libconfig"
- @echo "'login_sql' - builds login server (SQL version)"
- @echo "'char_sql' - builds char server (SQL version)"
- @echo "'map_sql' - builds map server (SQL version)"
+ @echo "'login_sql' - builds login server"
+ @echo "'char_sql' - builds char server"
+ @echo "'map_sql' - builds map server"
@echo "'tools' - builds all the tools in src/tools"
@echo "'import' - builds conf/import folder from the template conf/import-tmpl"
@echo "'all' - builds all the above targets"
@@ -109,6 +123,7 @@ help:
@echo " 'map_sql' and 'import')"
@echo "'test' - builds tests"
@echo "'clean' - cleans builds and objects"
+ @echo "'distclean' - cleans files generated by ./configure"
@echo "'help' - outputs this message"
#####################################################################
@@ -124,35 +139,34 @@ no_plugins:
#####################################################################
# TODO
-install: conf/%.conf conf/%.txt
- $(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue.")
- $(shell mkdir -p /opt/rathena/bin/)
- $(shell mkdir -p /opt/rathena/etc/rathena/)
- $(shell mkdir -p /opt/rathena/var/log/rathena/)
- $(shell mv save /opt/rathena/etc/rathena/save)
- $(shell mv db /opt/rathena/etc/rathena/db)
- $(shell mv conf /opt/rathena/etc/rathena/conf)
- $(shell mv npc /opt/rathena/etc/rathena/npc)
- $(shell mv log/* /opt/rathena/var/log/rathena/)
- $(shell cp *-server* /opt/rathena/bin/)
- $(shell ln -s /opt/rathena/etc/rathena/save/ /opt/rathena/bin/)
- $(shell ln -s /opt/rathena/etc/rathena/db/ /opt/rathena/bin/)
- $(shell ln -s /opt/rathena/etc/rathena/conf/ /opt/rathena/bin/)
- $(shell ln -s /opt/rathena/etc/rathena/npc/ /opt/rathena/bin/)
- $(shell ln -s /opt/rathena/var/log/rathena/ /opt/rathena/bin/log)
-
-bin-clean:
- $(shell rm /opt/rathena/bin/login-server*)
- $(shell rm /opt/rathena/bin/char-server*)
- $(shell rm /opt/rathena/bin/map-server*)
-
-uninstall:
- $(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue.")
- bin-clean
- $(shell rm /opt/rathena/bin/save)
- $(shell rm /opt/rathena/bin/db)
- $(shell rm /opt/rathena/bin/conf)
- $(shell rm /opt/rathena/bin/npc)
- $(shell rm /opt/rathena/bin/log)
- $(shell rm -rf /opt/rathena/etc/rathena)
- $(shell rm -rf /opt/rathena/var/log/rathena)
+#install: conf/%.conf conf/%.txt
+# @read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue."
+# @mkdir -p /opt/hercules/bin/
+# @mkdir -p /opt/hercules/etc/hercules/
+# @mkdir -p /opt/hercules/var/log/hercules/
+# @mv save /opt/hercules/etc/hercules/save
+# @mv db /opt/hercules/etc/hercules/db
+# @mv conf /opt/hercules/etc/hercules/conf
+# @mv npc /opt/hercules/etc/hercules/npc
+# @mv log/* /opt/hercules/var/log/hercules/
+# @cp *-server /opt/hercules/bin/
+# @ln -s /opt/hercules/etc/hercules/save/ /opt/hercules/bin/
+# @ln -s /opt/hercules/etc/hercules/db/ /opt/hercules/bin/
+# @ln -s /opt/hercules/etc/hercules/conf/ /opt/hercules/bin/
+# @ln -s /opt/hercules/etc/hercules/npc/ /opt/hercules/bin/
+# @ln -s /opt/hercules/var/log/hercules/ /opt/hercules/bin/log
+
+#bin-clean:
+# @rm /opt/hercules/bin/login-server
+# @rm /opt/hercules/bin/char-server
+# @rm /opt/hercules/bin/map-server
+
+#uninstall: bin-clean
+# @read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue."
+# @rm /opt/hercules/bin/save
+# @rm /opt/hercules/bin/db
+# @rm /opt/hercules/bin/conf
+# @rm /opt/hercules/bin/npc
+# @rm /opt/hercules/bin/log
+# @rm -rf /opt/hercules/etc/hercules
+# @rm -rf /opt/hercules/var/log/hercules