From de16a24277c432435a6eda2e8b0331aa459bee5a Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sun, 14 May 2017 11:06:35 +0200 Subject: server: Neatness stuff --- Makefile | 2 +- plugin_client_header.h | 2 +- plugins/Makefile | 5 ++++- 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 $@ $< -- cgit v1.2.3-54-g00ecf