Last active
August 29, 2015 14:02
-
-
Save monkstone/f422674bf0696a2e69b9 to your computer and use it in GitHub Desktop.
A Makefile for Ruby Mode for Processing on linux (not archlinux)
This file contains hidden or 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
TARGET=RubyMode.jar | |
SRC_ROOT_PATH=src | |
SRCDIR=$(SRC_ROOT_PATH)/processing/mode/ruby | |
OUTPUT_PATH=classes | |
DIST_PATH=~/sketchbook/modes/RubyMode/mode/ | |
SRCS=$(wildcard $(SRCDIR)/*.java) | |
CLASSES=$(subst $(SRC_ROOT_PATH)/,$(OUTPUT_PATH)/,$(SRCS:%.java=%.class)) | |
PATH_CLASSES=$(subst $(OUTPUT_PATH)/,,$(CLASSES)) | |
PROCESSING_PATH=/home/tux/processing-2.2.1 | |
PROCESSING_CORE_JAR=$(PROCESSING_PATH)/core/library/core.jar | |
PROCESSING_APP_JAR=$(PROCESSING_PATH)/lib/pde.jar | |
JRUBY_JAR=others/mode/jruby.jar | |
dist: $(TARGET) | |
cp $(TARGET) $(DIST_PATH) | |
$(TARGET): $(CLASSES) | |
jar -cvf $@ -C $(OUTPUT_PATH) . | |
clean: | |
rm -rf $(CLASSES) $(TARGET) | |
$(OUTPUT_PATH)/%.class: $(SRC_ROOT_PATH)/%.java | |
javac -d $(OUTPUT_PATH) -cp src:$(PROCESSING_CORE_JAR):$(PROCESSING_APP_JAR):$(JRUBY_JAR) $^ |
This file contains hidden or 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
TARGET=RubyMode.jar | |
SRC_ROOT_PATH=src | |
SRCDIR=$(SRC_ROOT_PATH)/processing/mode/ruby | |
OUTPUT_PATH=classes | |
DIST_PATH=~/sketchbook/modes/RubyMode/mode/ | |
SRCS=$(wildcard $(SRCDIR)/*.java) | |
CLASSES=$(subst $(SRC_ROOT_PATH)/,$(OUTPUT_PATH)/,$(SRCS:%.java=%.class)) | |
PATH_CLASSES=$(subst $(OUTPUT_PATH)/,,$(CLASSES)) | |
PROCESSING_PATH=/usr/share/processing | |
PROCESSING_CORE_JAR=$(PROCESSING_PATH)/core/library/core.jar | |
PROCESSING_APP_JAR=$(PROCESSING_PATH)/lib/pde.jar | |
dist: $(TARGET) | |
cp $(TARGET) $(DIST_PATH) | |
$(TARGET): $(CLASSES) | |
jar -cvf $@ -C $(OUTPUT_PATH) . | |
clean: | |
rm -rf $(CLASSES) $(TARGET) | |
$(OUTPUT_PATH)/%.class: $(SRC_ROOT_PATH)/%.java | |
javac -d $(OUTPUT_PATH) -cp src:$(PROCESSING_CORE_JAR):$(PROCESSING_APP_JAR) $^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment