diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-26 22:36:30 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-26 22:36:30 +0000 |
commit | 17222f8fdc6cb6f17efe391cbab0c357a5f93081 (patch) | |
tree | 5dcafe9c66fec2ae691bda2a4f86237c6ad81c39 /src/login | |
parent | 08bdb8f6123c057475b23c717402cea50b887864 (diff) | |
download | hercules-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/login')
-rw-r--r-- | src/login/Makefile.in | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/login/Makefile.in b/src/login/Makefile.in index c0fdcc8e3..187a3eaf0 100644 --- a/src/login/Makefile.in +++ b/src/login/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,16 +10,21 @@ COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/grfio.h ../common/mapindex.h \ ../common/ers.h ../common/md5calc.h +LOGIN_OBJ = obj/login.o +LOGIN_H = login.h + +@SET_MAKE@ + ##################################################################### .PHONY : all login-server clean help all: login-server -login-server: login.o $(COMMON_OBJ) - @CC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ login.o $(COMMON_OBJ) @LIBS@ +login-server: obj $(LOGIN_OBJ) $(COMMON_OBJ) + @CC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_OBJ) @LIBS@ clean: - rm -f *.o ../../login-server@EXEEXT@ + rm -rf *.o obj ../../login-server@EXEEXT@ help: @echo "possible targets are 'login-server' 'all' 'clean' 'help'" @@ -29,7 +35,12 @@ help: ##################################################################### -# DO NOT DELETE +obj: + -mkdir obj -login.o: login.c login.h $(COMMON_H) +obj/%.o: %.c $(LOGIN_H) $(COMMON_H) @CC@ @CFLAGS@ -DTXT_ONLY @CPPFLAGS@ -c $(OUTPUT_OPTION) $< + +# missing common object files +../common/obj/%.o: + @$(MAKE) -C ../common sql |