diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 $@ $< |