forked from vamp-plugins/jvamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.osx
41 lines (26 loc) · 1.07 KB
/
Makefile.osx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
JAR := jvamp.jar
LIBRARY := libvamp-jni.dylib
JAVA_HOME := /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
HOST := host/host.class
TEST := test/test.class
all: $(JAR) $(LIBRARY) $(HOST)
test: $(TEST)
java -classpath $(JAR):test test
OBJFILES := src/PluginLoader.o src/Plugin.o src/RealTime.o src/getset.o
JAVAFILES := org/vamp_plugins/Feature.java org/vamp_plugins/OutputDescriptor.java org/vamp_plugins/ParameterDescriptor.java org/vamp_plugins/Plugin.java org/vamp_plugins/PluginLoader.java org/vamp_plugins/RealTime.java
CLASSFILES := $(patsubst %.java,%.class,$(JAVAFILES))
INCLUDES := -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -I../vamp-plugin-sdk $(INCLUDES)
CXXFLAGS := $(INCLUDES) -g -fPIC
$(JAR): $(JAVAFILES)
javac $^
jar cf $@ org/vamp_plugins
$(LIBRARY): $(OBJFILES)
$(CXX) -shared -o $@ $^ -L../vamp-plugin-sdk -lvamp-hostsdk
$(HOST): host/host.java $(JAR)
javac -classpath $(JAR) $<
$(TEST): test/test.java $(JAR)
javac -classpath $(JAR) $<
clean:
rm -f $(OBJFILES) $(CLASSFILES) $(HOST) $(TEST)
distclean: clean
rm $(JAR) $(LIBRARY)