diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-20 11:09:36 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-20 11:09:36 +0000 |
commit | 5245e666a09df5f401c1329bf5ee1fc1b09b1d16 (patch) | |
tree | dcf032743e890fddd400b268b75a0868976b0a0b /Makefile.in | |
parent | d23c508bcc38520970156e5e25f14b03714878eb (diff) | |
download | hercules-5245e666a09df5f401c1329bf5ee1fc1b09b1d16.tar.gz hercules-5245e666a09df5f401c1329bf5ee1fc1b09b1d16.tar.bz2 hercules-5245e666a09df5f401c1329bf5ee1fc1b09b1d16.tar.xz hercules-5245e666a09df5f401c1329bf5ee1fc1b09b1d16.zip |
* Merged the tmpsql branch:
- Abstraction for the sql code (sql.c/h).
- New configure script and makefiles.
- Restored txt zeny logging code. (r10814)
- Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814)
- Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833)
- Improved db reading code a bit for consistency. (r11077)
- Added separate atcommand for mail deletion. (r11077)
- Corrected a few messages that said "new" instead of "unread". (r11077)
- Broadcast (*) messages now use "*" as the target's name (not ""). (r11077)
- Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117)
- Some misc login server cleanups (reformatting etc). (r11136)
- Corrected/modified some header entries. (r11141 r11147 11148)
- Adjusted VS project files. (r11147)
- Adjusted the way the sql charserver does item saving. (r11192)
- Corrected usage of reserved keyword 'friend' in mmo.h. (r11192)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..a1075c85a --- /dev/null +++ b/Makefile.in @@ -0,0 +1,181 @@ +@SET_MAKE@ + +HAVE_MYSQL=@HAVE_MYSQL@ +ifeq ($(HAVE_MYSQL),yes) + ALL_DEPENDS=common common_sql login login_sql char char_sql map map_sql ladmin tools converters plugins conf + SQL_DEPENDS=common_sql login_sql char_sql map_sql conf + COMMON_SQL_DEPENDS= + LOGIN_SQL_DEPENDS=common_sql + CHAR_SQL_DEPENDS=common_sql + MAP_SQL_DEPENDS=common_sql + CONVERTERS_DEPENDS=common_sql +else + ALL_DEPENDS=common login char map ladmin tools plugins conf + SQL_DEPENDS=needs_mysql + COMMON_SQL_DEPENDS=needs_mysql + LOGIN_SQL_DEPENDS=needs_mysql + CHAR_SQL_DEPENDS=needs_mysql + MAP_SQL_DEPENDS=needs_mysql + CONVERTERS_DEPENDS=needs_mysql +endif + +##################################################################### +.PHONY: txt sql common common_sql login login_sql char char_sql map map_sql \ + ladmin tools converters plugins addons conf clean help depend + +all: $(ALL_DEPENDS) + +txt: common login char map conf + +sql: $(SQL_DEPENDS) + +common: + @$(MAKE) -C src/common txt + +common_sql: $(COMMON_SQL_DEPENDS) + @$(MAKE) -C src/common sql + +login: common + @$(MAKE) -C src/login + +login_sql: $(LOGIN_SQL_DEPENDS) + @$(MAKE) -C src/login_sql + +char: common + @$(MAKE) -C src/char + +char_sql: $(CHAR_SQL_DEPENDS) + @$(MAKE) -C src/char_sql + +map: common + @$(MAKE) -C src/map txt + +map_sql: $(MAP_SQL_DEPENDS) + @$(MAKE) -C src/map sql + +ladmin: common + @$(MAKE) -C src/ladmin + +tools: + @$(MAKE) -C src/tool + +converters: $(CONVERTERS_DEPENDS) + @$(MAKE) -C src/txt-converter + +plugins addons: common + @$(MAKE) -C src/plugins + +conf: +# conf: +# 1) create conf and conf/import folders +# 2) add missing import files +# 3) copy the rest of the files and folders +# 4) remove remaining .svn folders + @echo "building conf folder..." + @if test ! -d conf ; then mkdir conf ; fi + @if test ! -d conf/import ; then mkdir conf/import ; fi + @for f in $$(ls conf-tmpl/import) ; do if test ! -e conf/import/$$f ; then cp conf-tmpl/import/$$f conf/import ; fi ; done + @for f in $$(ls conf-tmpl) ; do if test "$$f" != "import" ; then cp -rf conf-tmpl/$$f conf ; fi ; done + @rm -rf conf/*/.svn +# save: +# 1) create save folder +# 2) add missing files + @echo "building save folder..." + @if test ! -d save ; then mkdir save ; fi + @for f in $$(ls save-tmpl) ; do if test ! -e save/$$f ; then cp save-tmpl/$$f save ; fi ; done + +clean: + @$(MAKE) -C src/common $@ + @$(MAKE) -C src/login $@ + @$(MAKE) -C src/login_sql $@ + @$(MAKE) -C src/char $@ + @$(MAKE) -C src/char_sql $@ + @$(MAKE) -C src/map $@ + @$(MAKE) -C src/ladmin $@ + @$(MAKE) -C src/plugins $@ + @$(MAKE) -C src/tool $@ + @$(MAKE) -C src/txt-converter $@ + +help: + @echo "most common targets are 'all' 'txt' 'sql' 'clean' 'help'" + @echo "possible targets are:" + @echo "'common' - builds object files used in TXT servers" + @echo "'common_sql' - builds object files used in SQL servers" + @echo "'login' - builds login server (TXT version)" + @echo "'login_sql' - builds login server (SQL version)" + @echo "'char' - builds char server (TXT version)" + @echo "'char_sql' - builds char server (SQL version)" + @echo "'map' - builds map server (TXT version)" + @echo "'map_sql' - builds map server (SQL version)" + @echo "'ladmin' - builds remote administration tool" + @echo "'tools' - builds all the tools in src/tools" + @echo "'converters' - builds the login/char converters" + @echo "'plugins' - builds all the plugins in src/plugins" + @echo "'addons'" + @echo "'conf' - builds conf and save folders from the templates" + @echo "'all' - builds all above targets" + @echo "'txt' - builds txt servers (targets 'common' 'login' 'char' 'map' and" + @echo " 'conf')" + @echo "'sql' - builds sql servers (targets 'common_sql' 'login_sql' 'char_sql'" + @echo " 'map_sql' and 'conf')" + @echo "'clean' - cleans builds and objects" + @echo "'help' - outputs this message" + +##################################################################### + +needs_mysql: + @echo "MySQL not found or disabled by the configure script" + @exit 1 + +##################################################################### +# TODO + +# Server Packet Protocol version (also defined in src/common/mmo.h) +# CFLAGS += -DPACKETVER=8 + +# Makes map-wide script variables be saved to SQL instead of TXT files. +# CFLAGS += -DMAPREGSQL + +# OPT += -DGCOLLECT +# LIBS += -lgc + +# OPT += -DMEMWATCH + +# OPT += -DDMALLOC -DDMALLOC_FUNC_CHECK +# LIBS += -ldmalloc + +# OPT += -DBCHECK + + +install: conf/%.conf conf/%.txt + $(shell mkdir -p /opt/eathena/bin/) + $(shell mkdir -p /opt/eathena/etc/eathena/) + $(shell mkdir -p /opt/eathena/var/log/eathena/) + $(shell mv save /opt/eathena/etc/eathena/save) + $(shell mv db /opt/eathena/etc/eathena/db) + $(shell mv conf /opt/eathena/etc/eathena/conf) + $(shell mv npc /opt/eathena/etc/eathena/npc) + $(shell mv log/* /opt/eathena/var/log/eathena/) + $(shell cp *-server* /opt/eathena/bin/) + $(shell cp ladmin /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/save/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/db/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/conf/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/npc/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/var/log/eathena/ /opt/eathena/bin/log) + +bin-clean: + $(shell rm /opt/eathena/bin/login-server*) + $(shell rm /opt/eathena/bin/char-server*) + $(shell rm /opt/eathena/bin/map-server*) + $(shell rm /opt/eathena/bin/ladmin) + +uninstall: + bin-clean + $(shell rm /opt/eathena/bin/save) + $(shell rm /opt/eathena/bin/db) + $(shell rm /opt/eathena/bin/conf) + $(shell rm /opt/eathena/bin/npc) + $(shell rm /opt/eathena/bin/log) + $(shell rm -rf /opt/eathena/etc/eathena) + $(shell rm -rf /opt/eathena/var/log/eathena) |