summaryrefslogtreecommitdiff
path: root/src/plugins/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/plugins/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/plugins/Makefile.in')
-rw-r--r--src/plugins/Makefile.in34
1 files changed, 15 insertions, 19 deletions
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