From 17222f8fdc6cb6f17efe391cbab0c357a5f93081 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Mon, 26 Nov 2007 22:36:30 +0000 Subject: * 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 --- src/plugins/Makefile.in | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 769771aca..00493a7c9 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -1,8 +1,13 @@ -@SET_MAKE@ + +COMMON_OBJ = ../common/obj/showmsg.o ../common/obj/utils.o ../common/obj/strlib.o \ + ../common/obj/minimalloc.o +COMMON_H = ../common/plugin.h ../common/cbasetypes.h \ + ../common/showmsg.h ../common/utils.h ../common/strlib.h \ + ../common/malloc.h PLUGINS = sample sig pid gui upnp console -COMMON_H = ../common/plugin.h ../common/cbasetypes.h +@SET_MAKE@ ##################################################################### .PHONY : all $(PLUGINS) clean help @@ -41,27 +46,18 @@ help: %@DLLEXT@: %.c @CC@ @CFLAGS@ @CPPFLAGS@ -shared -o ../../plugins/$@ $< -sig@DLLEXT@: sig.c - @$(MAKE) -C ../common txt - @CC@ @CFLAGS@ @CPPFLAGS@ -shared -o ../../plugins/$@ $< \ - ../common/obj/showmsg.o ../common/obj/utils.o ../common/obj/strlib.o \ - ../common/obj/minimalloc.o - gui@DLLEXT@: ../../plugins/gui.conf upnp@DLLEXT@: ../../plugins/upnp.conf +sig@DLLEXT@: sig.c $(COMMON_OBJ) + @CC@ @CFLAGS@ @CPPFLAGS@ -shared -o ../../plugins/$@ $< $(COMMON_OBJ) + ../../plugins/%.conf: %.txt cp -r $< $@ -../../plugins/gui.conf: gui.txt -../../plugins/upnp.conf: upnp.txt - -# DO NOT DELETE +# missing common object files +../common/obj/%.o: ../common/%.c $(COMMON_H) + @$(MAKE) -C ../common txt -sample@DLLEXT@: sample.c $(COMMON_H) -sig@DLLEXT@: sig.c $(COMMON_H) -pid@DLLEXT@: pid.c $(COMMON_H) -gui@DLLEXT@: gui.c $(COMMON_H) -#TODO where is upnp.c? [FlavioJS] -#upnp@DLLEXT@: upnp.c $(COMMON_H) -console@DLLEXT@: console.c $(COMMON_H) +../common/obj/mini%.o: ../common/%.c $(COMMON_H) + @$(MAKE) -C ../common txt -- cgit v1.2.3-60-g2f50