From ed2b3a38ec05c566c645dc2aabfd513edff8d63b Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sun, 25 Dec 2016 22:55:21 +0100 Subject: Plugins --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1583287..078b0a0 100644 --- a/Makefile +++ b/Makefile @@ -7,12 +7,18 @@ else endif BIN = cserver +PLUGINDIR = plugins + +PLUGINS = $(patsubst $(PLUGINDIR)/%,%,$(shell find $(PLUGINDIR)/ -maxdepth 1 -type d)) + .PHONY: all clean remake all: $(BIN) + for pl in $(PLUGINS); do make -C $(PLUGINDIR) $@ PLUGINNAME=$$pl; done clean: rm -rf $(BIN) *.o *.dSYM + for pl in $(PLUGINS); do make -C $(PLUGINDIR) $@ PLUGINNAME=$$pl; done remake: clean all @@ -20,5 +26,5 @@ remake: clean all $(BIN): $(patsubst %.c,%.o,$(wildcard *.c)) $(CC) -o $@ $^ -%.o: %.cpp $(wildcard *.h) +%.o: %.c $(wildcard $(dir %.o)*.h) $(CC) $(CFLAGS) -c -o $@ $< -- cgit v1.2.3-70-g09d2