summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-05 10:26:11 +0100
committerHaru <haru@dotalux.com>2013-12-05 11:47:53 +0100
commit34628660ed71e6d3b39571087131b214adf4a48f (patch)
treefaab6265546bc7b3bb5e7b7d928c9b384d39ca5c /src
parent5dd63c8ccef96e51cec7339eff6c31d1cfbc360d (diff)
downloadhercules-34628660ed71e6d3b39571087131b214adf4a48f.tar.gz
hercules-34628660ed71e6d3b39571087131b214adf4a48f.tar.bz2
hercules-34628660ed71e6d3b39571087131b214adf4a48f.tar.xz
hercules-34628660ed71e6d3b39571087131b214adf4a48f.zip
Improved plugins Makefile
- It is now possible to build a plugin without adding it to the Makefile, by using 'make plugin.my_plugin_name'. - To have it built through 'make all' or 'make plugins', it is still necessary to add it to the Makefile, as before. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Makefile.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index ff2e83cf9..0f1698d2a 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -6,6 +6,11 @@
# #
# MYPLUGINS = my_cool_plugin my_second_plugin #
# #
+# This is only needed if you want to build your plugin through #
+# 'make plugins' or 'make all'. If you don't add it to this list, #
+# you will still be able to build your plugin through #
+# 'make plugin.my_plugin' #
+# #
# Note: DO NOT include the .c extension!!! #
MYPLUGINS =
@@ -13,6 +18,10 @@ MYPLUGINS =
# #
######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ##################
+# All plugins in the src/plugins directory
+ALLPLUGINS = $(basename $(wildcard *.c))
+
+# Plugins that will be built through 'make plugins' or 'make all'
PLUGINS = sample db2sql HPMHooking $(MYPLUGINS)
COMMON_D = ../common
@@ -32,11 +41,11 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all $(PLUGINS) clean buildclean help
+.PHONY: all $(ALLPLUGINS) clean buildclean help
all: $(PLUGINS) Makefile
-$(PLUGINS): %: ../../plugins/%@DLLEXT@
+$(ALLPLUGINS): %: ../../plugins/%@DLLEXT@
buildclean:
@echo " CLEAN plugins (build temp files)"