changed for plugin support

This commit is contained in:
Bob Polis 2020-10-27 15:27:46 +01:00
parent a26d082bdb
commit da2d463ab7
3 changed files with 17 additions and 3 deletions

View File

@ -1,4 +1,5 @@
BIN := $(shell basename $$(pwd))
PLUGINS := rect
MANSECTION := 1
MANPAGE := $(BIN).$(MANSECTION)
@ -27,11 +28,11 @@ else
CXXFLAGS += -D NDEBUG -O3
endif
LDLIBS := -lm -lpthread -lscgui -lSDL2 -lcairo -lscerror
LDLIBS := -lm -lpthread -lscgui -lSDL2 -lcairo -lscerror -lscstring
.PHONY: all clean install
.PHONY: all clean install modules
all: $(BIN)
all: $(BIN) $(PLUGINS)
$(BIN): $(OBJS) $(DEPS)
$(CXX) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $(BIN)
@ -43,8 +44,21 @@ $(BIN): $(OBJS) $(DEPS)
%.d: ;
modules: $(PLUGINS)
mkdir -p plugins
@for plug in $(PLUGINS) ;\
do \
cd $$plug && $(MAKE) && $(MAKE) install ;\
cd .. ;\
done
clean:
$(RM) $(OBJS) $(DEPS) $(BIN)
$(RM) -r plugins
@for plug in $(PLUGINS) ;\
do \
$(MAKE) -C $$plug clean ;\
done
install: $(BIN)
$(INSTALL) -d $(BINDIR)