diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-24 15:21:16 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-24 15:21:16 -0700 |
commit | ee5ea021c66a6d8b011dd754ce620fd6b1cc60e1 (patch) | |
tree | 260a6da1d2608b9ab33afada086b03de60131611 /Makefile | |
parent | f9d990b2a553706334c3b85e211c0b10f6c7028f (diff) | |
parent | ee547337e2a5ae97dc52b3e67b4481247470eaf6 (diff) | |
download | tmwa-ee5ea021c66a6d8b011dd754ce620fd6b1cc60e1.tar.gz tmwa-ee5ea021c66a6d8b011dd754ce620fd6b1cc60e1.tar.bz2 tmwa-ee5ea021c66a6d8b011dd754ce620fd6b1cc60e1.tar.xz tmwa-ee5ea021c66a6d8b011dd754ce620fd6b1cc60e1.zip |
Merge branch 'master' of git@gitorious.org:tmw-eathena/mainline
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 260 |
1 files changed, 130 insertions, 130 deletions
@@ -1,130 +1,130 @@ -# $Id$
-
-ifeq ($(shell uname -m), x86_64)
-M32=-m32
-endif
-
-CC = gcc ${M32} -pipe
-PACKETDEF = -DPACKETVER=5 -DNEW_006b
-#PACKETDEF = -DPACKETVER=4 -DNEW_006b
-#PACKETDEF = -DPACKETVER=3 -DNEW_006b
-#PACKETDEF = -DPACKETVER=2 -DNEW_006b
-#PACKETDEF = -DPACKETVER=1 -DNEW_006b
-
-PLATFORM = $(shell uname)
-
-ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD)
-MAKE = gmake
-else
-MAKE = make
-endif
-
-OPT = -g -O2 ${M32}
-
-ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
-OS_TYPE = -DCYGWIN
-CFLAGS = $(OPT) -Wall -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE)
-else
-OS_TYPE =
-CFLAGS = $(OPT) -Wall -I../common $(PACKETDEF) $(OS_TYPE)
-endif
-
-MYSQLFLAG_INCLUDE_DEFAULT = /usr/local/include/mysql
-
-ifdef SQLFLAG
-MYSQLFLAG_CONFIG = $(shell which mysql_config)
-ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /)
-MYSQLFLAG_VERSION = $(shell $(MYSQLFLAG_CONFIG) --version | sed s:\\..*::)
-endif
-
-ifeq ($(findstring 5,$(MYSQLFLAG_VERSION)), 5)
-MYSQLFLAG_CONFIG_ARGUMENT = --include
-endif
-ifeq ($(findstring 4,$(MYSQLFLAG_VERSION)), 4)
-MYSQLFLAG_CONFIG_ARGUMENT = --include
-endif
-ifndef MYSQLFLAG_CONFIG_ARGUMENT
-MYSQLFLAG_CONFIG_ARGUMENT = --cflags
-endif
-
-ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /)
-MYSQLFLAG_INCLUDE = $(shell $(MYSQLFLAG_CONFIG) $(MYSQLFLAG_CONFIG_ARGUMENT))
-else
-MYSQLFLAG_INCLUDE = -I$(MYSQLFLAG_INCLUDE_DEFAULT)
-endif
-
-LIB_S_DEFAULT = -L/usr/local/lib/mysql -lmysqlclient -lz
-MYSQLFLAG_CONFIG = $(shell which mysql_config)
-ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /)
-LIB_S = $(shell $(MYSQLFLAG_CONFIG) --libs)
-else
-LIB_S = $(LIB_S_DEFAULT)
-endif
-
-MYLIB = CC="$(CC)" CFLAGS="$(CFLAGS) $(MYSQLFLAG_INCLUDE)" LIB_S="$(LIB_S)"
-
-endif
-
-MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)"
-
-all: conf txt
-
-conf:
- cp -r conf-tmpl conf
- rm -rf conf/.svn conf/*/.svn
-
-txt : src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile conf
- cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd login ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd char ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd map ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd ..
-
-
-ifdef SQLFLAG
-sql: src/common/GNUmakefile src/login_sql/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile src/txt-converter/login/GNUmakefile src/txt-converter/char/GNUmakefile conf
- cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd login_sql ; $(MAKE) $(MYLIB) $@ ; cd ..
- cd src ; cd char_sql ; $(MAKE) $(MYLIB) $@ ; cd ..
- cd src ; cd map ; $(MAKE) $(MYLIB) $@ ; cd ..
- cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd txt-converter ; cd login ; $(MAKE) $(MYLIB) $@ ; cd ..
- cd src ; cd txt-converter ; cd char ; $(MAKE) $(MYLIB) $@ ; cd ..
-else
-sql:
- $(MAKE) CC="$(CC)" OPT="$(OPT)" SQLFLAG=1 $@
-endif
-
-clean: src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile src/txt-converter/login/GNUmakefile src/txt-converter/char/GNUmakefile
- cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd login ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd login_sql ; $(MAKE) $(MKLIB) $@ ; cd ..
- cd src ; cd char ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd char_sql ; $(MAKE) $(MKLIB) $@ ; cd ..
- cd src ; cd map ; $(MAKE) $(MKLIB) $@ ; cd ..
- cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd txt-converter ; cd login ; $(MAKE) $(MKLIB) $@ ; cd ..
- cd src ; cd txt-converter ; cd char ; $(MAKE) $(MKLIB) $@ ; cd ..
-
-tools:
- cd tool && $(MAKE) $(MKDEF) && cd ..
- $(CC) -o setupwizard setupwizard.c
-
-src/common/GNUmakefile: src/common/Makefile
- sed -e 's/$$>/$$^/' src/common/Makefile > src/common/GNUmakefile
-src/login/GNUmakefile: src/login/Makefile
- sed -e 's/$$>/$$^/' src/login/Makefile > src/login/GNUmakefile
-src/login_sql/GNUmakefile: src/login_sql/Makefile
- sed -e 's/$$>/$$^/' src/login_sql/Makefile > src/login_sql/GNUmakefile
-src/char/GNUmakefile: src/char/Makefile
- sed -e 's/$$>/$$^/' src/char/Makefile > src/char/GNUmakefile
-src/char_sql/GNUmakefile: src/char_sql/Makefile
- sed -e 's/$$>/$$^/' src/char_sql/Makefile > src/char_sql/GNUmakefile
-src/map/GNUmakefile: src/map/Makefile
- sed -e 's/$$>/$$^/' src/map/Makefile > src/map/GNUmakefile
-src/ladmin/GNUmakefile: src/ladmin/Makefile
- sed -e 's/$$>/$$^/' src/ladmin/Makefile > src/ladmin/GNUmakefile
-src/txt-converter/login/GNUmakefile: src/txt-converter/login/Makefile
- sed -e 's/$$>/$$^/' src/txt-converter/login/Makefile > src/txt-converter/login/GNUmakefile
-src/txt-converter/char/GNUmakefile: src/txt-converter/char/Makefile
- sed -e 's/$$>/$$^/' src/txt-converter/char/Makefile > src/txt-converter/char/GNUmakefile
+# $Id$ + +ifeq ($(shell uname -m), x86_64) +M32=-m32 +endif + +CC = gcc ${M32} -pipe +PACKETDEF = -DPACKETVER=5 -DNEW_006b +#PACKETDEF = -DPACKETVER=4 -DNEW_006b +#PACKETDEF = -DPACKETVER=3 -DNEW_006b +#PACKETDEF = -DPACKETVER=2 -DNEW_006b +#PACKETDEF = -DPACKETVER=1 -DNEW_006b + +PLATFORM = $(shell uname) + +ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD) +MAKE = gmake +else +MAKE = make +endif + +OPT = -g -O2 ${M32} + +ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN) +OS_TYPE = -DCYGWIN +CFLAGS = $(OPT) -Wall -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE) +else +OS_TYPE = +CFLAGS = $(OPT) -Wall -I../common $(PACKETDEF) $(OS_TYPE) +endif + +MYSQLFLAG_INCLUDE_DEFAULT = /usr/local/include/mysql + +ifdef SQLFLAG +MYSQLFLAG_CONFIG = $(shell which mysql_config) +ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /) +MYSQLFLAG_VERSION = $(shell $(MYSQLFLAG_CONFIG) --version | sed s:\\..*::) +endif + +ifeq ($(findstring 5,$(MYSQLFLAG_VERSION)), 5) +MYSQLFLAG_CONFIG_ARGUMENT = --include +endif +ifeq ($(findstring 4,$(MYSQLFLAG_VERSION)), 4) +MYSQLFLAG_CONFIG_ARGUMENT = --include +endif +ifndef MYSQLFLAG_CONFIG_ARGUMENT +MYSQLFLAG_CONFIG_ARGUMENT = --cflags +endif + +ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /) +MYSQLFLAG_INCLUDE = $(shell $(MYSQLFLAG_CONFIG) $(MYSQLFLAG_CONFIG_ARGUMENT)) +else +MYSQLFLAG_INCLUDE = -I$(MYSQLFLAG_INCLUDE_DEFAULT) +endif + +LIB_S_DEFAULT = -L/usr/local/lib/mysql -lmysqlclient -lz +MYSQLFLAG_CONFIG = $(shell which mysql_config) +ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /) +LIB_S = $(shell $(MYSQLFLAG_CONFIG) --libs) +else +LIB_S = $(LIB_S_DEFAULT) +endif + +MYLIB = CC="$(CC)" CFLAGS="$(CFLAGS) $(MYSQLFLAG_INCLUDE)" LIB_S="$(LIB_S)" + +endif + +MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" + +all: conf txt + +conf: + cp -r conf-tmpl conf + rm -rf conf/.svn conf/*/.svn + +txt : src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile conf + cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd login ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd char ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd map ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd .. + + +ifdef SQLFLAG +sql: src/common/GNUmakefile src/login_sql/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile src/txt-converter/login/GNUmakefile src/txt-converter/char/GNUmakefile conf + cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd login_sql ; $(MAKE) $(MYLIB) $@ ; cd .. + cd src ; cd char_sql ; $(MAKE) $(MYLIB) $@ ; cd .. + cd src ; cd map ; $(MAKE) $(MYLIB) $@ ; cd .. + cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd txt-converter ; cd login ; $(MAKE) $(MYLIB) $@ ; cd .. + cd src ; cd txt-converter ; cd char ; $(MAKE) $(MYLIB) $@ ; cd .. +else +sql: + $(MAKE) CC="$(CC)" OPT="$(OPT)" SQLFLAG=1 $@ +endif + +clean: src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile src/txt-converter/login/GNUmakefile src/txt-converter/char/GNUmakefile + cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd login ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd login_sql ; $(MAKE) $(MKLIB) $@ ; cd .. + cd src ; cd char ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd char_sql ; $(MAKE) $(MKLIB) $@ ; cd .. + cd src ; cd map ; $(MAKE) $(MKLIB) $@ ; cd .. + cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd .. + cd src ; cd txt-converter ; cd login ; $(MAKE) $(MKLIB) $@ ; cd .. + cd src ; cd txt-converter ; cd char ; $(MAKE) $(MKLIB) $@ ; cd .. + +tools: + cd tool && $(MAKE) $(MKDEF) && cd .. + $(CC) -o setupwizard setupwizard.c + +src/common/GNUmakefile: src/common/Makefile + sed -e 's/$$>/$$^/' src/common/Makefile > src/common/GNUmakefile +src/login/GNUmakefile: src/login/Makefile + sed -e 's/$$>/$$^/' src/login/Makefile > src/login/GNUmakefile +src/login_sql/GNUmakefile: src/login_sql/Makefile + sed -e 's/$$>/$$^/' src/login_sql/Makefile > src/login_sql/GNUmakefile +src/char/GNUmakefile: src/char/Makefile + sed -e 's/$$>/$$^/' src/char/Makefile > src/char/GNUmakefile +src/char_sql/GNUmakefile: src/char_sql/Makefile + sed -e 's/$$>/$$^/' src/char_sql/Makefile > src/char_sql/GNUmakefile +src/map/GNUmakefile: src/map/Makefile + sed -e 's/$$>/$$^/' src/map/Makefile > src/map/GNUmakefile +src/ladmin/GNUmakefile: src/ladmin/Makefile + sed -e 's/$$>/$$^/' src/ladmin/Makefile > src/ladmin/GNUmakefile +src/txt-converter/login/GNUmakefile: src/txt-converter/login/Makefile + sed -e 's/$$>/$$^/' src/txt-converter/login/Makefile > src/txt-converter/login/GNUmakefile +src/txt-converter/char/GNUmakefile: src/txt-converter/char/Makefile + sed -e 's/$$>/$$^/' src/txt-converter/char/Makefile > src/txt-converter/char/GNUmakefile |