diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | plugin_client_header.h | 2 | ||||
-rw-r--r-- | plugins/Makefile | 5 |
3 files changed, 6 insertions, 3 deletions
@@ -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 $@ $< |