From 1624d1d57db3cfde3b4f42a55580f5a1e742f28e Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 26 Jul 2008 20:45:57 +0000 Subject: Merged the /loginmerge branch (topic:192754) * the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity) * storage systems are now added via compiler options (WITH_SQL / WITH_TXT) * multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used. * due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'. * login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868). * removed config options that defined column names in the login table * removed `memo` and `error message` columns from login db/savefile * moved `loginlog` table to the logs database * added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql * due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully! * moved third-party includes/libs to a separate directory * updated project files / makefiles Changed the way GM levels are handled * removed conf/gm_account.txt * added the gm level column to the txt savefile (after 'email' column) * gm level information is now transferred along with account data For open problems see bugreport:1889. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/login/Makefile.in | 63 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 14 deletions(-) (limited to 'src/login/Makefile.in') diff --git a/src/login/Makefile.in b/src/login/Makefile.in index aeb41b667..1f6080746 100644 --- a/src/login/Makefile.in +++ b/src/login/Makefile.in @@ -10,36 +10,71 @@ COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/grfio.h ../common/mapindex.h \ ../common/ers.h ../common/md5calc.h -LOGIN_OBJ = obj_txt/login.o obj_txt/admin.o -LOGIN_H = login.h +COMMON_SQL_OBJ = ../common/obj_sql/sql.o +COMMON_SQL_H = ../common/sql.h + +LOGIN_OBJ = login.o admin.o +LOGIN_TXT_OBJ = $(LOGIN_OBJ:%=obj_txt/%) \ + obj_txt/account_txt.o obj_txt/ipban_txt.o obj_txt/loginlog_txt.o +LOGIN_SQL_OBJ = $(LOGIN_OBJ:%=obj_sql/%) \ + obj_sql/account_sql.o obj_sql/ipban_sql.o obj_sql/loginlog_sql.o +LOGIN_H = login.h account.h ipban.h loginlog.h + +HAVE_MYSQL=@HAVE_MYSQL@ +ifeq ($(HAVE_MYSQL),yes) + LOGIN_SERVER_SQL_DEPENDS=obj_sql $(LOGIN_SQL_OBJ) $(COMMON_OBJ) $(COMMON_SQL_OBJ) +else + LOGIN_SERVER_SQL_DEPENDS=needs_mysql +endif @SET_MAKE@ ##################################################################### -.PHONY : all login-server clean help +.PHONY :all txt sql clean help -all: login-server +all: txt sql -login-server: obj_txt $(LOGIN_OBJ) $(COMMON_OBJ) - @CC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_OBJ) @LIBS@ +txt: obj_txt login-server + +sql: obj_sql login-server_sql clean: - rm -rf *.o obj_txt ../../login-server@EXEEXT@ + rm -rf *.o obj_txt obj_sql ../../login-server@EXEEXT@ ../../login-server_sql@EXEEXT@ help: - @echo "possible targets are 'login-server' 'all' 'clean' 'help'" - @echo "'login-server' - login server (TXT version)" - @echo "'all' - builds all above targets" - @echo "'clean' - cleans builds and objects" - @echo "'help' - outputs this message" + @echo "possible targets are 'sql' 'txt' 'all' 'clean' 'help'" + @echo "'sql' - login server (SQL version)" + @echo "'txt' - login server (TXT version)" + @echo "'all' - builds all above targets" + @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 + +# object directories obj_txt: - -mkdir obj_txt + test -d obj_txt || mkdir obj_txt +obj_sql: + test -d obj_sql || mkdir obj_sql + +#executables +login-server: $(LOGIN_TXT_OBJ) $(COMMON_OBJ) + @CC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_TXT_OBJ) $(COMMON_OBJ) @LIBS@ + +login-server_sql: $(LOGIN_SERVER_SQL_DEPENDS) + @CC@ @LDFLAGS@ -o ../../login-server_sql@EXEEXT@ $(LOGIN_SQL_OBJ) $(COMMON_OBJ) $(COMMON_SQL_OBJ) @LIBS@ @MYSQL_LIBS@ + +# login object files obj_txt/%.o: %.c $(LOGIN_H) $(COMMON_H) - @CC@ @CFLAGS@ $(CUSTOM_CFLAGS) -DTXT_ONLY @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + @CC@ @CFLAGS@ $(CUSTOM_CFLAGS) -DWITH_TXT @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + +obj_sql/%.o: %.c $(LOGIN_H) $(COMMON_H) + @CC@ @CFLAGS@ $(CUSTOM_CFLAGS) -DWITH_SQL @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< # missing common object files ../common/obj_all/%.o: -- cgit v1.2.3-60-g2f50