summaryrefslogtreecommitdiff
path: root/src/login_sql
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-26 22:36:30 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-26 22:36:30 +0000
commit17222f8fdc6cb6f17efe391cbab0c357a5f93081 (patch)
tree5dcafe9c66fec2ae691bda2a4f86237c6ad81c39 /src/login_sql
parent08bdb8f6123c057475b23c717402cea50b887864 (diff)
downloadhercules-17222f8fdc6cb6f17efe391cbab0c357a5f93081.tar.gz
hercules-17222f8fdc6cb6f17efe391cbab0c357a5f93081.tar.bz2
hercules-17222f8fdc6cb6f17efe391cbab0c357a5f93081.tar.xz
hercules-17222f8fdc6cb6f17efe391cbab0c357a5f93081.zip
* Normalized makefiles:
- 3 sections: variables, public targets, private/support targets - object files always in a *_OBJ variable - header files always in a *_H variable - object files always generated to an obj* subfolder - all Makefiles can be executed individually, calling other makefiles if necessary - generic object targets when possible git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11812 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login_sql')
-rw-r--r--src/login_sql/Makefile.in23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/login_sql/Makefile.in b/src/login_sql/Makefile.in
index d10b49b5f..22a1437b3 100644
--- a/src/login_sql/Makefile.in
+++ b/src/login_sql/Makefile.in
@@ -9,23 +9,28 @@ 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 ../common/sql.h
+LOGIN_OBJ = obj/login.o
+LOGIN_H = login.h
+
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- LOGIN_SERVER_SQL_DEPENDS=login.o $(COMMON_OBJ)
+ LOGIN_SERVER_SQL_DEPENDS=obj $(LOGIN_OBJ) $(COMMON_OBJ)
else
LOGIN_SERVER_SQL_DEPENDS=needs_mysql
endif
+@SET_MAKE@
+
#####################################################################
.PHONY : all login-server_sql clean help
all: login-server_sql
login-server_sql: $(LOGIN_SERVER_SQL_DEPENDS)
- @CC@ @LDFLAGS@ -o ../../login-server_sql@EXEEXT@ login.o $(COMMON_OBJ) @LIBS@ @MYSQL_LIBS@
+ @CC@ @LDFLAGS@ -o ../../login-server_sql@EXEEXT@ $(LOGIN_OBJ) $(COMMON_OBJ) @LIBS@ @MYSQL_LIBS@
clean:
- rm -f *.o ../../login-server_sql@EXEEXT@
+ rm -rf *.o obj ../../login-server_sql@EXEEXT@
help:
@echo "possible targets are 'login-server_sql' 'all' 'clean' 'help'"
@@ -40,7 +45,15 @@ needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
-# DO NOT DELETE
+obj:
+ -mkdir obj
-login.o: login.c login.h $(COMMON_H)
+obj/%.o: %.c $(LOGIN_H) $(COMMON_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+
+# missing common object files
+../common/obj/%.o:
+ @$(MAKE) -C ../common sql
+
+../common/obj_sql/%.o:
+ @$(MAKE) -C ../common sql