diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-05-09 22:39:16 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-05-09 22:39:16 +0200 |
commit | 24de2cd600a4e108c24f6f77a5a4d30111fd9918 (patch) | |
tree | b27f97f511fb3d6fd5ce7f8a3fad9687867dbfda /Makefile | |
parent | a7a0ce278e661bf5d3f2b47556d8c30469d2bd6c (diff) |
server: Add plugin framework
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,9 +1,13 @@ CC = gcc -CFLAGS = -Wall -Wextra -std=c11 -g -fwrapv -LDFLAGS = -lsqlite3 +CFLAGS = -Wall -Wextra -std=c11 -g -fwrapv -D_BSD_SOURCE +LDFLAGS = -lsqlite3 -ldl TARGETS = tomsg_server +PLUGINDIR = plugins + +PLUGINS = $(patsubst $(PLUGINDIR)/%,%,$(shell find $(PLUGINDIR)/ -maxdepth 1 -type d)) + .PHONY: all clean remake # Clear all implicit suffix rules @@ -13,9 +17,11 @@ TARGETS = tomsg_server .SECONDARY: all: $(TARGETS) + for pl in $(PLUGINS); do make --no-print-directory -C $(PLUGINDIR) $@ PLUGINNAME=$$pl; done clean: rm -f $(TARGETS) *.o *.sql.h + for pl in $(PLUGINS); do make --no-print-directory -C $(PLUGINDIR) $@ PLUGINNAME=$$pl; done remake: clean $(MAKE) all |