diff options
Diffstat (limited to 'flow/src/main/native/posix/Makefile')
-rw-r--r-- | flow/src/main/native/posix/Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/flow/src/main/native/posix/Makefile b/flow/src/main/native/posix/Makefile index d144ec5..81e0fad 100644 --- a/flow/src/main/native/posix/Makefile +++ b/flow/src/main/native/posix/Makefile @@ -1,21 +1,23 @@ # Build native binaries for flow. # This makefile is intended for linux-based operating systems. -TARGET=libflow.so +TARGET?=libflow.so MAJOR_VERSION=2 CC=$(CROSS_COMPILE)gcc CFLAGS= -O2 -fPIC -LD=$(CROSS_COMPILE)gcc +LD=$(CROSS_COMPILE)ld LDFLAGS=-shared -Wl,-soname,$(TARGET).$(MAJOR_VERSION) -INCLUDES=../include/ /usr/lib/jvm/java-7-oracle/include/ /usr/lib/jvm/java-7-oracle/include/linux/ +INCLUDES?=../include/ /usr/lib/jvm/java-7-oracle/include/ /usr/lib/jvm/java-7-oracle/include/linux/ + +OBJECTS=flow.o flow_jni.o all: $(TARGET) -$(TARGET): flow.o +$(TARGET): $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $< -flow.o: flow.c +%.o: %.c $(CC) $(CFLAGS) $(addprefix -I, $(INCLUDES)) -o $@ -c $< clean: |