aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-05-14 11:06:35 +0200
committertomsmeding <tom.smeding@gmail.com>2017-05-14 11:06:35 +0200
commitde16a24277c432435a6eda2e8b0331aa459bee5a (patch)
tree286364a958d327b364d5c72925c84c142474b37a
parent635802489282cea52220569fed8297d75c98a774 (diff)
server: Neatness stuff
-rw-r--r--Makefile2
-rw-r--r--plugin_client_header.h2
-rw-r--r--plugins/Makefile5
3 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 307fbfa..c9f4989 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ TARGETS = tomsg_server
PLUGINDIR = plugins
-PLUGINS = $(patsubst $(PLUGINDIR)/%,%,$(shell find $(PLUGINDIR)/ -maxdepth 1 -type d))
+PLUGINS = $(filter-out _%,$(patsubst $(PLUGINDIR)/%,%,$(shell find $(PLUGINDIR)/ -maxdepth 1 -type d)))
.PHONY: all clean remake
diff --git a/plugin_client_header.h b/plugin_client_header.h
index 4428b3c..d1be0b5 100644
--- a/plugin_client_header.h
+++ b/plugin_client_header.h
@@ -20,7 +20,7 @@ struct plugin_event{
typedef void plugin_event_func_t(const struct plugin_event *event);
-// All plugins should export a function of type plugin_init_func_t with
+// All plugins should export a function of the following signature with
// name "plugin_init_func" that returns a pointer to a function that
// receives all events.
plugin_event_func_t* plugin_init_func(void);
diff --git a/plugins/Makefile b/plugins/Makefile
index 0824f2e..26d3047 100644
--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -30,5 +30,8 @@ endif
.SECONDARY:
-$(PLUGINNAME)/%.$(SO_EXT): $(patsubst %.c,%.o,$(wildcard $(PLUGINNAME)/*.c)) $(wildcard ../*.h)
+$(PLUGINNAME)/%.$(SO_EXT): $(patsubst %.c,%.o,$(wildcard $(PLUGINNAME)/*.c))
$(CC) $(SO_FLAGS) -o $@ $(filter %.o,$^)
+
+$(PLUGINNAME)/%.o: $(PLUGINNAME)/%.c $(wildcard $(PLUGINNAME)/*.h) $(wildcard ../*.h)
+ $(CC) $(CFLAGS) $(SO_FLAGS) -o $@ $<