aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..01c1b6a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+TARGET=target
+SCALA_VERSION=2.10
+CLASSPATH=$(TARGET)/scala-$(SCALA_VERSION)/classes
+TARGETDIR=target
+
+all: flow.so
+
+javah: $(CLASSPATH)
+ javah -d src/main/c/ -classpath $(CLASSPATH) com.github.jodersky.flow.NativeSerial
+
+flow.o:
+ gcc -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -fPIC -c src/main/c/flow.c -o flow.o
+
+flow.so: flow.o
+ gcc -shared -Wl,-soname,libflow.so.1 -o libflow.so $< -lc
+
+clean:
+ rm -f *.o
+ rm -f *.so