
--Upd Makefiles and configure --Upd shell scripts and remove old unmaintenained one. -Upd tools/config.pl, add FreeBSD install package support git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17181 54d463be-8e91-2dee-dedb-b68131a5f0ec
116 lines
3.0 KiB
Makefile
116 lines
3.0 KiB
Makefile
@SET_MAKE@
|
|
|
|
HAVE_MYSQL=@HAVE_MYSQL@
|
|
ifeq ($(HAVE_MYSQL),yes)
|
|
ALL_DEPENDS=sql tools
|
|
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
|
|
else
|
|
ALL_DEPENDS=needs_mysql
|
|
SQL_DEPENDS=needs_mysql
|
|
COMMON_SQL_DEPENDS=needs_mysql
|
|
LOGIN_SQL_DEPENDS=needs_mysql
|
|
CHAR_SQL_DEPENDS=needs_mysql
|
|
MAP_SQL_DEPENDS=needs_mysql
|
|
endif
|
|
|
|
|
|
#####################################################################
|
|
.PHONY: all sql \
|
|
common_sql \
|
|
mt19937ar \
|
|
login_sql \
|
|
char_sql \
|
|
map_sql \
|
|
tools \
|
|
import \
|
|
test \
|
|
clean help \
|
|
install uninstall bin-clean \
|
|
|
|
all: $(ALL_DEPENDS)
|
|
|
|
sql: $(SQL_DEPENDS)
|
|
|
|
common_sql: $(COMMON_SQL_DEPENDS)
|
|
@$(MAKE) -C src/common sql
|
|
|
|
login_sql: $(LOGIN_SQL_DEPENDS)
|
|
@$(MAKE) -C src/login sql
|
|
|
|
char_sql: $(CHAR_SQL_DEPENDS)
|
|
@$(MAKE) -C src/char
|
|
|
|
map_sql: $(MAP_SQL_DEPENDS)
|
|
@$(MAKE) -C src/map sql
|
|
|
|
mt19937ar:
|
|
@$(MAKE) -C 3rdparty/mt19937ar
|
|
|
|
libconfig:
|
|
@$(MAKE) -C 3rdparty/libconfig
|
|
|
|
tools:
|
|
@$(MAKE) -C src/tool
|
|
|
|
test:
|
|
@$(MAKE) -C src/test
|
|
|
|
import:
|
|
# 1) create conf/import folder
|
|
# 2) add missing files
|
|
# 3) remove remaining .svn folder
|
|
@echo "building conf/import folder..."
|
|
@if test ! -d conf/import ; then mkdir conf/import ; fi
|
|
@for f in $$(ls conf/import-tmpl) ; do if test ! -e conf/import/$$f ; then cp conf/import-tmpl/$$f conf/import ; fi ; done
|
|
@rm -rf conf/import/.svn
|
|
|
|
clean:
|
|
@$(MAKE) -C src/common $@
|
|
@$(MAKE) -C 3rdparty/mt19937ar $@
|
|
@$(MAKE) -C 3rdparty/libconfig $@
|
|
@$(MAKE) -C src/login $@
|
|
@$(MAKE) -C src/char $@
|
|
@$(MAKE) -C src/map $@
|
|
@$(MAKE) -C src/tool $@
|
|
@$(MAKE) -C src/test $@
|
|
|
|
help:
|
|
@echo "most common targets are 'all' 'sql' 'conf' 'clean' '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 "'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"
|
|
@echo "'sql' - builds sql servers (targets 'common_sql' 'login_sql' 'char_sql'"
|
|
@echo " 'map_sql' and 'import')"
|
|
@echo "'test' - builds tests"
|
|
@echo "'clean' - cleans builds and objects"
|
|
@echo "'install' - run installer wich setup rathena in /opt/"
|
|
@echo "'bin-clean' - delete binary installed"
|
|
@echo "'uninstall' - run uninstaller wich erase all install change"
|
|
@echo "'help' - outputs this message"
|
|
|
|
needs_mysql:
|
|
@echo "MySQL not found or disabled by the configure script"
|
|
@exit 1
|
|
|
|
install:
|
|
@sh ./install.sh
|
|
|
|
bin-clean:
|
|
@sh ./uninstall.sh bin
|
|
|
|
uninstall:
|
|
@sh ./uninstall.sh all
|
|
|
|
#####################################################################
|