summaryrefslogtreecommitdiff
path: root/src/ladmin
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/ladmin
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/ladmin')
-rw-r--r--src/ladmin/Makefile.in26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/ladmin/Makefile.in b/src/ladmin/Makefile.in
index f1f7bff23..87cc2ad49 100644
--- a/src/ladmin/Makefile.in
+++ b/src/ladmin/Makefile.in
@@ -1,20 +1,26 @@
+
COMMON_OBJ = ../common/obj/minicore.o ../common/obj/minisocket.o ../common/obj/timer.o \
../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o \
../common/obj/utils.o ../common/obj/md5calc.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
../common/version.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h \
- ../common/utils.h ../common/md5calc.h
+ ../common/utils.h ../common/md5calc.h ../common/cbasetypes.h
+
+LADMIN_OBJ = obj/ladmin.o
+LADMIN_H = ladmin.h
+
+@SET_MAKE@
#####################################################################
.PHONY : all ladmin clean help
all: ladmin
-ladmin: ladmin.o $(COMMON_OBJ)
- @CC@ @LDFLAGS@ -o ../../ladmin@EXEEXT@ ladmin.o $(COMMON_OBJ) @LIBS@
+ladmin: obj $(LADMIN_OBJ) $(COMMON_OBJ)
+ @CC@ @LDFLAGS@ -o ../../ladmin@EXEEXT@ $(LADMIN_OBJ) $(COMMON_OBJ) @LIBS@
clean:
- rm -f *.o ../../ladmin@EXEEXT@
+ rm -rf *.o obj ../../ladmin@EXEEXT@
help:
@echo "possible targets are 'ladmin' 'all' 'clean' 'help'"
@@ -25,7 +31,15 @@ help:
#####################################################################
-# DO NOT DELETE
+obj:
+ -mkdir obj
-ladmin.o: ladmin.c ladmin.h $(COMMON_H)
+obj/%.o: %.c $(LADMIN_H) $(COMMON_H)
@CC@ @CFLAGS@ @LDFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+
+# missing common object files
+../common/obj/%.o:
+ @$(MAKE) -C ../common txt
+
+../common/obj/mini%.o:
+ @$(MAKE) -C ../common txt