changed for plugin support
This commit is contained in:
parent
a26d082bdb
commit
da2d463ab7
20
Makefile
20
Makefile
@ -1,4 +1,5 @@
|
|||||||
BIN := $(shell basename $$(pwd))
|
BIN := $(shell basename $$(pwd))
|
||||||
|
PLUGINS := rect
|
||||||
|
|
||||||
MANSECTION := 1
|
MANSECTION := 1
|
||||||
MANPAGE := $(BIN).$(MANSECTION)
|
MANPAGE := $(BIN).$(MANSECTION)
|
||||||
@ -27,11 +28,11 @@ else
|
|||||||
CXXFLAGS += -D NDEBUG -O3
|
CXXFLAGS += -D NDEBUG -O3
|
||||||
endif
|
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)
|
$(BIN): $(OBJS) $(DEPS)
|
||||||
$(CXX) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $(BIN)
|
$(CXX) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $(BIN)
|
||||||
@ -43,8 +44,21 @@ $(BIN): $(OBJS) $(DEPS)
|
|||||||
|
|
||||||
%.d: ;
|
%.d: ;
|
||||||
|
|
||||||
|
modules: $(PLUGINS)
|
||||||
|
mkdir -p plugins
|
||||||
|
@for plug in $(PLUGINS) ;\
|
||||||
|
do \
|
||||||
|
cd $$plug && $(MAKE) && $(MAKE) install ;\
|
||||||
|
cd .. ;\
|
||||||
|
done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OBJS) $(DEPS) $(BIN)
|
$(RM) $(OBJS) $(DEPS) $(BIN)
|
||||||
|
$(RM) -r plugins
|
||||||
|
@for plug in $(PLUGINS) ;\
|
||||||
|
do \
|
||||||
|
$(MAKE) -C $$plug clean ;\
|
||||||
|
done
|
||||||
|
|
||||||
install: $(BIN)
|
install: $(BIN)
|
||||||
$(INSTALL) -d $(BINDIR)
|
$(INSTALL) -d $(BINDIR)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user