summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorblacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-01 10:46:02 +0000
committerblacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-01 10:46:02 +0000
commit81e4918a779ef631106fd2ecaae6bd6433fb2b07 (patch)
treeedea88dcaae69f8d8d859609201883aa3207f0f3 /src/common
parent3433dea871bcd256e2635e0b416467330633af95 (diff)
downloadhercules-81e4918a779ef631106fd2ecaae6bd6433fb2b07.tar.gz
hercules-81e4918a779ef631106fd2ecaae6bd6433fb2b07.tar.bz2
hercules-81e4918a779ef631106fd2ecaae6bd6433fb2b07.tar.xz
hercules-81e4918a779ef631106fd2ecaae6bd6433fb2b07.zip
feature merge bs-coreoptimize->trunk: Build Output Cleanup, Makefile Common Dependency Handling
- "Optimized" the build Output using Makefiles - to Kernel style build output. - Changed dependency handling to common (core), by generating one lib file (ar) and link against that instead of assigning all deps individually in every subproject - Changed header dependency handling in Subproject makefiles - requiring all common/ headers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16198 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Makefile.in37
1 files changed, 24 insertions, 13 deletions
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index de591a59f..5e3b00a88 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -4,11 +4,8 @@ COMMON_OBJ = obj_all/core.o obj_all/socket.o obj_all/timer.o obj_all/db.o obj_al
obj_all/grfio.o obj_all/mapindex.o obj_all/ers.o obj_all/md5calc.o \
obj_all/minicore.o obj_all/minisocket.o obj_all/minimalloc.o obj_all/random.o obj_all/des.o \
obj_all/conf.o
-COMMON_H = mmo.h plugin.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 random.h des.h \
- conf.h
+
+COMMON_H = $(shell ls ../common/*.h)
COMMON_SQL_OBJ = obj_sql/sql.o
COMMON_SQL_H = sql.h
@@ -46,7 +43,8 @@ txt: $(TXT_DEPENDS)
sql: $(SQL_DEPENDS)
clean:
- rm -rf *.o obj_all obj_sql
+ @echo " CLEAN common"
+ @rm -rf *.o obj_all obj_sql
help:
@echo "possible targets are 'txt' 'sql' 'all' 'clean' 'help'"
@@ -63,24 +61,37 @@ needs_mysql:
@exit 1
obj_all:
- -mkdir obj_all
+ @echo " MKDIR obj_all"
+ @-mkdir obj_all
obj_sql:
- -mkdir obj_sql
+ @echo " MKDIR obj_sql"
+ @-mkdir obj_sql
+
+obj_all/common.a: $(COMMON_OBJ)
+ @echo " AR $@"
+ @@AR@ rcs obj_all/common.a $(COMMON_OBJ)
-common: obj_all $(COMMON_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ)
+obj_sql/common_sql.a: $(COMMON_SQL_OBJ)
+ @echo " AR $@"
+ @@AR@ rcs obj_sql/common_sql.a $(COMMON_SQL_OBJ)
+
-common_sql: obj_sql $(COMMON_SQL_OBJ)
+common: obj_all $(COMMON_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) obj_all/common.a
+common_sql: obj_sql $(COMMON_SQL_OBJ) obj_sql/common_sql.a
obj_all/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H)
- @CC@ @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @echo " CC $<"
+ @@CC@ @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
obj_all/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H)
- @CC@ @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DMINICORE @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @echo " CC $<"
+ @@CC@ @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DMINICORE @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H) $(LIBCONFIG_H)
- @CC@ @CFLAGS@ $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @echo " CC $<"
+ @@CC@ @CFLAGS@ $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files