summaryrefslogtreecommitdiff
path: root/src/char/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/char/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/char/Makefile.in')
-rw-r--r--src/char/Makefile.in29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index 78d2cb2c8..334265819 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -1,3 +1,4 @@
+
COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \
../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \
../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \
@@ -9,18 +10,22 @@ COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h
../common/strlib.h ../common/grfio.h \
../common/mapindex.h ../common/ers.h
-CHAR_OBJ = char.o inter.o int_party.o int_guild.o int_storage.o int_status.o int_pet.o int_homun.o
+CHAR_OBJ = obj/char.o obj/inter.o obj/int_party.o obj/int_guild.o \
+ obj/int_storage.o obj/int_status.o obj/int_pet.o obj/int_homun.o
+CHAR_H = char.h inter.h int_party.h int_guild.h int_storage.h int_status.h int_pet.h int_homun.h
+
+@SET_MAKE@
#####################################################################
.PHONY : all char-server clean help
all: char-server
-char-server: $(CHAR_OBJ) $(COMMON_OBJ)
+char-server: obj $(CHAR_OBJ) $(COMMON_OBJ)
@CC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_OBJ) @LIBS@
clean:
- rm -f *.o ../../char-server@EXEEXT@
+ rm -rf *.o obj ../../char-server@EXEEXT@
help:
@echo "possible targets are 'char-server' 'all' 'clean' 'help'"
@@ -31,16 +36,12 @@ help:
#####################################################################
-%.o: %.c
- @CC@ @CFLAGS@ -DTXT_ONLY @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+obj:
+ -mkdir obj
-# DO NOT DELETE
+obj/%.o: %.c $(CHAR_H) $(COMMON_H)
+ @CC@ @CFLAGS@ -DTXT_ONLY @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
-char.o: char.c char.h inter.h int_pet.h $(COMMON_H)
-inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h char.h $(COMMON_H)
-int_party.o: int_party.c int_party.h inter.h char.h $(COMMON_H)
-int_guild.o: int_guild.c int_guild.h int_storage.h inter.h char.h $(COMMON_H)
-int_storage.o: int_storage.c int_storage.h int_guild.h inter.h char.h $(COMMON_H)
-int_status.o: int_status.c int_status.h char.h $(COMMON_H)
-int_pet.o: int_pet.c int_pet.h inter.h char.h $(COMMON_H)
-int_homun.o: int_homun.c int_homun.h inter.h char.h $(COMMON_H)
+# missing common object files
+../common/obj/%.o:
+ @$(MAKE) -C ../common txt