Adapt to unified Makefile with plugin support
This commit is contained in:
12
Makefile
12
Makefile
@ -1,12 +1,3 @@
|
||||
# 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 "new"
|
||||
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/*)
|
||||
|
||||
@ -65,9 +56,6 @@ $(BIN): $(OBJS)
|
||||
|
||||
-include $(DEPS)
|
||||
|
||||
new:
|
||||
@./newmodule $(NEW_ARGS)
|
||||
|
||||
modules: $(PLUGINS)
|
||||
mkdir -p plugins
|
||||
@for plug in $(PLUGINS) ;\
|
||||
|
Reference in New Issue
Block a user