aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2014-01-24 13:02:27 +0100
committerJakob Odersky <jodersky@gmail.com>2014-01-24 13:02:27 +0100
commitd7eda85abb19097226a9e8f342f43ff8e2d092fb (patch)
tree42934d7772f0f20ecd0a0ed83866b0ae345ab31f
parentaa25e858a6b0872ac9989be9baee79a31a392901 (diff)
downloadakka-serial-1.1.0.tar.gz
akka-serial-1.1.0.tar.bz2
akka-serial-1.1.0.zip
add makefile for native compilationv1.1.0
-rw-r--r--flow/src/main/native/posix/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/flow/src/main/native/posix/Makefile b/flow/src/main/native/posix/Makefile
new file mode 100644
index 0000000..d144ec5
--- /dev/null
+++ b/flow/src/main/native/posix/Makefile
@@ -0,0 +1,25 @@
+# Build native binaries for flow.
+# This makefile is intended for linux-based operating systems.
+
+TARGET=libflow.so
+MAJOR_VERSION=2
+
+CC=$(CROSS_COMPILE)gcc
+CFLAGS= -O2 -fPIC
+LD=$(CROSS_COMPILE)gcc
+LDFLAGS=-shared -Wl,-soname,$(TARGET).$(MAJOR_VERSION)
+INCLUDES=../include/ /usr/lib/jvm/java-7-oracle/include/ /usr/lib/jvm/java-7-oracle/include/linux/
+
+all: $(TARGET)
+
+$(TARGET): flow.o
+ $(CC) $(LDFLAGS) -o $@ $<
+
+flow.o: flow.c
+ $(CC) $(CFLAGS) $(addprefix -I, $(INCLUDES)) -o $@ -c $<
+
+clean:
+ rm -f *.o
+ rm -f *.so
+
+.PHONY: clean