From d7eda85abb19097226a9e8f342f43ff8e2d092fb Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Fri, 24 Jan 2014 13:02:27 +0100 Subject: add makefile for native compilation --- flow/src/main/native/posix/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 flow/src/main/native/posix/Makefile 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 -- cgit v1.2.3