diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-02-17 21:05:42 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-02-17 21:05:42 +0100 |
commit | f6ba2ed10f41e5a9fc41eba6a2a610084910458d (patch) | |
tree | d7e8de891c3eaaa213cbe6b96f584f63d65f742e /Makefile | |
parent | jni stuff (diff) | |
download | sha3sum-f6ba2ed10f41e5a9fc41eba6a2a610084910458d.tar.gz sha3sum-f6ba2ed10f41e5a9fc41eba6a2a610084910458d.tar.bz2 sha3sum-f6ba2ed10f41e5a9fc41eba6a2a610084910458d.tar.xz |
add jni .so to makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -18,12 +18,15 @@ CPPFLAGS= LDFLAGS= C_FLAGS=$(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +JNI_INCLUDE=-I$${JAVA_HOME}/include +JNI_FLAGS=$(JNI_INCLUDE) -fPIC -shared + JAVA_CLASSES = $(shell find "pure-java" | grep '\.java$$' | sed -e 's_^_bin/_g' -e 's_java$$_class_g') C_OBJS = $(shell find "c" | grep '\.h$$' | sed -e 's_^_bin/_g' -e 's_h$$_o_g') C_BINS = bin/c/sha3sum -all: pure-java c +all: pure-java c java-c-jni pure-java: $(JAVA_CLASSES) @@ -40,6 +43,11 @@ bin/c/%: c/%.c mkdir -p "bin/c" $(CC) $(C_FLAGS) -o "$@" "c/$*".c "c/"*.o +java-c-jni: bin/java-c-jni/SHA3.so +bin/java-c-jni/%.so: java-c-jni/%.c + mkdir -p "bin/java-c-jni" + gcc $(C_FLAGS) $(JNI_FLAGS) "java-c-jni/$*.c" -o "bin/java-c-jni/$*.so" + .PHONY: clean clean: |