summaryrefslogtreecommitdiff
path: root/src/txt-converter
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/txt-converter
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/txt-converter')
-rw-r--r--src/txt-converter/Makefile.in58
1 files changed, 39 insertions, 19 deletions
diff --git a/src/txt-converter/Makefile.in b/src/txt-converter/Makefile.in
index 31d593743..59d3a6641 100644
--- a/src/txt-converter/Makefile.in
+++ b/src/txt-converter/Makefile.in
@@ -1,25 +1,42 @@
-LOGIN_CONVERTER_OBJ = login-converter.o ../common/obj/minicore.o \
+
+LOGIN_CONVERTER_OBJ = obj_login/login-converter.o ../common/obj/minicore.o \
../common/obj/malloc.o ../common/obj/strlib.o ../common/obj/showmsg.o \
../common/obj/utils.o ../common/obj/ers.o ../common/obj/db.o \
../common/obj_sql/sql.o
-CHAR_CONVERTER_OBJ = char-converter.o ../common/obj/minicore.o \
+LOGIN_CONVERTER_H = ../common/cbasetypes.h ../common/mmo.h ../common/core.h \
+ ../common/malloc.h ../common/strlib.h ../common/showmsg.h \
+ ../common/utils.h ../common/ers.h ../common/db.h \
+ ../common/sql.h
+
+CHAR_CONVERTER_OBJ = obj_char/char-converter.o \
+ obj_char/txt-char.o obj_char/txt-int_pet.o obj_char/txt-int_storage.o obj_char/txt-inter.o \
+ obj_char/txt-int_party.o obj_char/txt-int_guild.o \
+ obj_char/sql-char.o obj_char/sql-int_pet.o obj_char/sql-int_storage.o \
+ obj_char/sql-inter.o obj_char/sql-int_party.o obj_char/sql-int_guild.o \
+ ../common/obj/minicore.o \
../common/obj/malloc.o ../common/obj/strlib.o ../common/obj/showmsg.o \
../common/obj/utils.o ../common/obj/ers.o ../common/obj/mapindex.o \
- ../common/obj_sql/sql.o \
- obj_txt/char.o obj_txt/int_pet.o obj_txt/int_storage.o obj_txt/inter.o \
- obj_txt/int_party.o obj_txt/int_guild.o \
- obj_sql/char.o obj_sql/int_pet.o obj_sql/int_storage.o \
- obj_sql/inter.o obj_sql/int_party.o obj_sql/int_guild.o
+ ../common/obj_sql/sql.o
+CHAR_CONVERTER_H = ../char/char.h ../char/int_pet.h ../char/int_storage.h ../char/inter.h \
+ ../char/int_party.h ../char/int_guild.h \
+ ../char_sql/char.h ../char_sql/int_pet.h ../char_sql/int_storage.h \
+ ../char_sql/inter.h ../char_sql/int_party.h ../char_sql/int_guild.h \
+ ../common/cbasetypes.h ../common/mmo.h ../common/core.h \
+ ../common/malloc.h ../common/strlib.h ../common/showmsg.h \
+ ../common/utils.h ../common/ers.h ../common/mapindex.h \
+ ../common/sql.h
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- LOGIN_CONVERTER_DEPENDS=$(LOGIN_CONVERTER_OBJ)
- CHAR_CONVERTER_DEPENDS=obj $(CHAR_CONVERTER_OBJ)
+ LOGIN_CONVERTER_DEPENDS=obj_login $(LOGIN_CONVERTER_OBJ)
+ CHAR_CONVERTER_DEPENDS=obj_char $(CHAR_CONVERTER_OBJ)
else
LOGIN_CONVERTER_DEPENDS=needs_mysql
CHAR_CONVERTER_DEPENDS=needs_mysql
endif
+@SET_MAKE@
+
#####################################################################
.PHONY : all login-converter char-converter clean help
@@ -32,7 +49,7 @@ char-converter: $(CHAR_CONVERTER_DEPENDS)
@CC@ @LDFLAGS@ -o ../../tools/char-converter@EXEEXT@ $(CHAR_CONVERTER_OBJ) @LIBS@ @MYSQL_LIBS@
clean:
- rm -rf *.o obj_txt obj_sql ../../tools/login-converter@EXEEXT@ ../../tools/char-converter@EXEEXT@
+ rm -rf *.o obj_login obj_char ../../tools/login-converter@EXEEXT@ ../../tools/char-converter@EXEEXT@
help:
@echo "possible targets are 'login-converter' 'char-converter' 'all' 'clean' 'help'"
@@ -48,21 +65,24 @@ needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
-obj:
- -mkdir obj_txt
- -mkdir obj_sql
+obj_login:
+ -mkdir obj_login
+obj_char:
+ -mkdir obj_char
-# DO NOT DELETE
+obj_login/%.o: %.c $(LOGIN_CONVERTER_H)
+ @CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
-%.o: %.c
+obj_char/%.o: %.c $(CHAR_CONVERTER_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
-obj_txt/%.o: ../char/%.c
+obj_char/txt-%.o: ../char/%.c $(CHAR_CONVERTER_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
-obj_sql/%.o: ../char_sql/%.c
+obj_char/sql-%.o: ../char_sql/%.c $(CHAR_CONVERTER_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
-char-converter.o: char-converter.c
-login-converter.o: login-converter.c
+# missing common object files
+../common/obj/%.o:
+ @$(MAKE) -C ../common sql