Added target te create new module subproject
This commit is contained in:
parent
489de843c8
commit
e96b1bc5f4
14
Makefile
14
Makefile
@ -1,3 +1,12 @@
|
||||
# Taken from: https://stackoverflow.com/questions/2214575/passing-arguments-to-make-run
|
||||
# If the first argument is "new"...
|
||||
ifeq (new,$(firstword $(MAKECMDGOALS)))
|
||||
# use the rest as arguments for "run"
|
||||
NEW_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
# ...and turn them into do-nothing targets
|
||||
$(eval $(NEW_ARGS):;@:)
|
||||
endif
|
||||
|
||||
BIN := $(shell basename $$(pwd))
|
||||
PLUGINS := $(wildcard modules/*)
|
||||
|
||||
@ -32,7 +41,7 @@ endif
|
||||
|
||||
LDLIBS := -lm -lpthread -lscgui -lSDL2 -lcairo -lscerror -lscstring -lscscreensaver -ldl
|
||||
|
||||
.PHONY: all clean install modules
|
||||
.PHONY: all clean install modules new
|
||||
|
||||
all: $(BIN) modules
|
||||
|
||||
@ -46,6 +55,9 @@ $(BIN): $(OBJS) $(DEPS)
|
||||
|
||||
%.d: ;
|
||||
|
||||
new:
|
||||
@./newmodule $(NEW_ARGS)
|
||||
|
||||
modules: $(PLUGINS)
|
||||
mkdir -p plugins
|
||||
@for plug in $(PLUGINS) ;\
|
||||
|
Loading…
x
Reference in New Issue
Block a user