changeset 41:544ee975b822

OS/X makefile
author Chris Cannam
date Mon, 28 Jan 2013 11:37:59 +0000
parents b1036ab80767
children b776aa5f4c84
files Makefile.osx test/test.java
diffstat 2 files changed, 32 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.osx	Mon Jan 28 11:37:59 2013 +0000
@@ -0,0 +1,28 @@
+
+JAR := jvamp.jar
+LIBRARY := libvamp-jni.dylib
+
+all: $(JAR) $(LIBRARY)
+
+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/Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Headers -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
+
+clean:
+	rm -f $(OBJFILES) $(CLASSFILES)
+
+distclean:	clean
+	rm $(JAR) $(LIBRARY)
--- a/test/test.java	Fri Jan 11 16:37:26 2013 +0000
+++ b/test/test.java	Mon Jan 28 11:37:59 2013 +0000
@@ -32,8 +32,6 @@
     authorization.
 */
 
-import java.util.ArrayList;
-import java.util.TreeMap;
 import java.util.Map;
 import java.util.List;
 import java.lang.RuntimeException;
@@ -47,8 +45,8 @@
 
 public class test
 {
-    private static void printFeatures(Map<Integer, ArrayList<Feature>> features) {
-	for (Map.Entry<Integer, ArrayList<Feature>> mi : features.entrySet()) {
+    private static void printFeatures(Map<Integer, List<Feature>> features) {
+	for (Map.Entry<Integer, List<Feature>> mi : features.entrySet()) {
 	    System.out.print(mi.getKey() + ": ");
 	    for (Feature li : mi.getValue()) {
 		System.out.print("[" + li.timestamp + "= ");
@@ -128,7 +126,7 @@
 		    buffers[0][1] = -0.5f;
 		}
 		RealTime timestamp = RealTime.frame2RealTime(block * 1024, 44100);
-		TreeMap<Integer, ArrayList<Feature>>
+		Map<Integer, List<Feature>>
 		    features = p.process(buffers, timestamp);
 
 		timestamp.dispose();
@@ -136,7 +134,7 @@
 		printFeatures(features);
 	    }
 
-	    TreeMap<Integer, ArrayList<Feature>>
+	    Map<Integer, List<Feature>>
 		features = p.getRemainingFeatures();
 
 	    System.out.println("Results from getRemainingFeatures:");