Created
December 13, 2015 10:15
-
-
Save kdxu/0f5d1176fe909bd5c8ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL=/bin/sh | |
ifndef SKETCH_DIRECTORY | |
SKETCH_DIRECTORY = ${CURDIR} | |
endif | |
ifndef OUTPUT_FOLDERNAME | |
OUTPUT_FOLDERNAME = output | |
endif | |
ifndef OUTPUT_DIRECTORY | |
OUTPUT_DIRECTORY = $(SKETCH_DIRECTORY)/$(OUTPUT_FOLDERNAME) | |
endif | |
define CLEAN_RULE | |
@echo "rm -rf '${1}'" | |
$(shell rm -rf ${1}) | |
endef | |
define BUILD_RULE | |
processing-java --sketch=$(SKETCH_DIRECTORY) --output=$(OUTPUT_DIRECTORY) --${1} --force | |
endef | |
.PHONY: run | |
run: | |
$(call BUILD_RULE,run) | |
.PHONY: clean | |
clean: | |
$(call CLEAN_RULE, $(OUTPUT_DIRECTORY)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment