diff options
Diffstat (limited to 'src/common/Makefile.in')
-rw-r--r-- | src/common/Makefile.in | 82 |
1 files changed, 49 insertions, 33 deletions
diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 313db8ccc..78f9cd0d1 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -1,31 +1,35 @@ -COMMON_OBJ = obj_all/core.o obj_all/socket.o obj_all/timer.o obj_all/db.o obj_all/HPM.o \ - obj_all/nullpo.o obj_all/malloc.o obj_all/showmsg.o obj_all/strlib.o obj_all/utils.o \ - 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 obj_all/thread.o obj_all/mutex.o obj_all/raconf.o obj_all/mempool.o obj_all/console.o \ - obj_all/miniconsole.o - -COMMON_H = $(shell ls ../common/*.h) +MT19937AR_D = ../../3rdparty/mt19937ar +MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o +MT19937AR_H = $(MT19937AR_D)/mt19937ar.h +MT19937AR_INCLUDE = -I$(MT19937AR_D) + +LIBCONFIG_D = ../../3rdparty/libconfig +LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \ + scanner.o strbuf.o) +LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \ + scanctx.h scanner.h strbuf.h wincompat.h) +LIBCONFIG_INCLUDE = -I$(LIBCONFIG_D) + +COMMON_SHARED_OBJ = conf.o db.o des.o ers.o grfio.o HPM.o mapindex.o \ + md5calc.o mempool.o mutex.o nullpo.o raconf.o random.o \ + showmsg.o strlib.o thread.o timer.o utils.o +COMMON_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \ + console.o core.o malloc.o socket.o) +COMMON_MINI_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \ + miniconsole.o minicore.o minimalloc.o minisocket.o) +COMMON_H = atomic.h cbasetypes.h conf.h console.h core.h db.h des.h ers.h \ + evdp.h grfio.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h \ + mempool.h mmo.h mutex.h netbuffer.h network.h nullpo.h raconf.h \ + random.h showmsg.h socket.h spinlock.h sql.h strlib.h thread.h \ + timer.h utils.h winapi.h COMMON_SQL_OBJ = obj_sql/sql.o COMMON_SQL_H = sql.h -MT19937AR_OBJ = ../../3rdparty/mt19937ar/mt19937ar.o -MT19937AR_H = ../../3rdparty/mt19937ar/mt19937ar.h -MT19937AR_INCLUDE = -I../../3rdparty/mt19937ar - -LIBCONFIG_OBJ = ../../3rdparty/libconfig/libconfig.o ../../3rdparty/libconfig/grammar.o \ - ../../3rdparty/libconfig/scanctx.o ../../3rdparty/libconfig/scanner.o ../../3rdparty/libconfig/strbuf.o -LIBCONFIG_H = ../../3rdparty/libconfig/libconfig.h ../../3rdparty/libconfig/grammar.h \ - ../../3rdparty/libconfig/parsectx.h ../../3rdparty/libconfig/scanctx.h ../../3rdparty/libconfig/scanner.h \ - ../../3rdparty/libconfig/strbuf.h ../../3rdparty/libconfig/wincompat.h -LIBCONFIG_INCLUDE = -I../../3rdparty/libconfig - HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - ALL_DEPENDS=sql - SQL_DEPENDS=common common_sql + SQL_DEPENDS=common common_sql common_mini else SQL_DEPENDS=needs_mysql endif @@ -36,9 +40,9 @@ CC = @CC@ export CC ##################################################################### -.PHONY : all sql clean help +.PHONY: all sql common common_sql common_mini clean help -all: $(ALL_DEPENDS) +all: sql sql: $(SQL_DEPENDS) @@ -55,10 +59,15 @@ help: ##################################################################### +Makefile: Makefile.in + @$(MAKE) -C ../.. src/common/Makefile + needs_mysql: @echo "MySQL not found or disabled by the configure script" @exit 1 +# object directories + obj_all: @echo " MKDIR obj_all" @-mkdir obj_all @@ -67,35 +76,42 @@ obj_sql: @echo " MKDIR obj_sql" @-mkdir obj_sql -obj_all/common.a: $(COMMON_OBJ) +obj_all/common.a: $(COMMON_OBJ) Makefile @echo " AR $@" @@AR@ rcs obj_all/common.a $(COMMON_OBJ) -obj_sql/common_sql.a: $(COMMON_SQL_OBJ) +obj_all/common_mini.a: $(COMMON_MINI_OBJ) Makefile + @echo " AR $@" + @@AR@ rcs obj_all/common_mini.a $(COMMON_MINI_OBJ) + +obj_sql/common_sql.a: $(COMMON_SQL_OBJ) Makefile @echo " AR $@" @@AR@ rcs obj_sql/common_sql.a $(COMMON_SQL_OBJ) - -common: obj_all $(COMMON_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) obj_all/common.a +common: $(COMMON_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) obj_all/common.a Makefile + +common_mini: $(COMMON_MINI_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) obj_all/common_mini.a Makefile -common_sql: obj_sql $(COMMON_SQL_OBJ) obj_sql/common_sql.a +common_sql: $(COMMON_SQL_OBJ) obj_sql/common_sql.a Makefile -obj_all/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj_all/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_all @echo " CC $<" @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @CPPFLAGS@ -c $(OUTPUT_OPTION) $< -obj_all/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) +obj_all/mini%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_all @echo " CC $<" @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $< -obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H) $(LIBCONFIG_H) +obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H) $(CONFIG_H) $(LIBCONFIG_H) | obj_sql @echo " CC $<" @$(CC) @CFLAGS@ $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $< # missing object files $(MT19937AR_OBJ): - @$(MAKE) -C ../../3rdparty/mt19937ar + @echo " MAKE $@" + @$(MAKE) -C $(MT19937AR_D) $(LIBCONFIG_OBJ): - @$(MAKE) -C ../../3rdparty/libconfig + @echo " MAKE $@" + @$(MAKE) -C $(LIBCONFIG_D) |