summaryrefslogtreecommitdiff
path: root/src/common/Makefile.in
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/common/Makefile.in
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/common/Makefile.in')
-rw-r--r--src/common/Makefile.in57
1 files changed, 22 insertions, 35 deletions
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index 94f42a956..89bb8a75a 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -1,18 +1,33 @@
+
+COMMON_OBJ = obj/core.o obj/socket.o obj/timer.o obj/db.o obj/plugins.o obj/lock.o \
+ obj/nullpo.o obj/malloc.o obj/showmsg.o obj/strlib.o obj/utils.o \
+ obj/grfio.o obj/mapindex.o obj/ers.o obj/md5calc.o \
+ obj/minicore.o obj/minisocket.o obj/minimalloc.o
+COMMON_H = svnversion.h mmo.h plugin.h version.h \
+ core.h socket.h timer.h db.h plugins.h lock.h \
+ nullpo.h malloc.h showmsg.h strlib.h utils.h \
+ grfio.h mapindex.h ers.h md5calc.h
+
+COMMON_SQL_OBJ = obj_sql/sql.o
+COMMON_SQL_H = sql.h
+
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
ALL_DEPENDS=txt sql
- SQL_DEPENDS=txt obj_sql common_sql
+ SQL_DEPENDS=common common_sql
else
ALL_TARGET=txt
SQL_DEPENDS=needs_mysql
endif
+@SET_MAKE@
+
#####################################################################
.PHONY : all txt sql clean help
all: $(ALL_DEPENDS)
-txt: obj common
+txt: common
sql: $(SQL_DEPENDS)
@@ -39,21 +54,18 @@ obj:
obj_sql:
-mkdir obj_sql
-common: obj/core.o obj/socket.o obj/timer.o obj/db.o obj/plugins.o obj/lock.o \
- obj/nullpo.o obj/malloc.o obj/showmsg.o obj/strlib.o obj/utils.o \
- obj/grfio.o obj/minicore.o obj/minisocket.o obj/minimalloc.o \
- obj/mapindex.o obj/ers.o obj/md5calc.o
+common: obj $(COMMON_OBJ)
-common_sql: obj_sql/sql.o
+common_sql: obj_sql $(COMMON_SQL_OBJ)
-obj/%.o: %.c
+obj/%.o: %.c $(COMMON_H)
@CC@ @CFLAGS@ @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
-obj/mini%.o: %.c
+obj/mini%.o: %.c $(COMMON_H)
@CC@ @CFLAGS@ -DMINICORE @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
-obj_sql/%.o: %.c
+obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
@@ -68,28 +80,3 @@ else
svnversion.h:
@printf "\n" > svnversion.h
endif
-
-obj/minicore.o: core.c core.h
-obj/minisocket.o: socket.c socket.h
-obj/minimalloc.o: malloc.c malloc.h
-
-# DO NOT DELETE
-
-obj/core.o: core.c core.h showmsg.h svnversion.h
-obj/db.o: db.c db.h showmsg.h ers.h
-obj/ers.o: ers.c ers.h cbasetypes.h
-obj/grfio.o: grfio.c grfio.h
-obj/lock.o: lock.c lock.h showmsg.h
-obj/malloc.o: malloc.c malloc.h showmsg.h
-obj/mapindex.o: mapindex.c mapindex.h
-obj/md5calc.o: md5calc.c md5calc.h
-obj/nullpo.o: nullpo.c nullpo.h showmsg.h
-obj/plugins.o: plugins.c plugins.h plugin.h
-obj/showmsg.o: showmsg.c showmsg.h
-obj/socket.o: socket.c socket.h mmo.h showmsg.h plugins.h
-obj/strlib.o: strlib.c strlib.h utils.h
-obj/timer.o: timer.c timer.h showmsg.h
-obj/utils.o: utils.c utils.h malloc.h showmsg.h mmo.h
-obj_sql/sql.o: sql.c sql.h cbasetypes.h malloc.h showmsg.h utils.h
-mmo.h: cbasetypes.h
- @touch mmo.h