summaryrefslogtreecommitdiff
path: root/src/login_sql/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/login_sql/Makefile.in')
-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