aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-10 05:20:31 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-10 05:20:31 +0200
commitfba6d1b2b73edb1c5dda6d1a87890d74d8b1e0c0 (patch)
treedfd02e11df3cdc5099a69f00989664c1e47110f6 /Makefile
parentdo not allow extra arguments (diff)
downloadsha3sum-fba6d1b2b73edb1c5dda6d1a87890d74d8b1e0c0.tar.gz
sha3sum-fba6d1b2b73edb1c5dda6d1a87890d74d8b1e0c0.tar.bz2
sha3sum-fba6d1b2b73edb1c5dda6d1a87890d74d8b1e0c0.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d205115..b15303d 100644
--- a/Makefile
+++ b/Makefile
@@ -56,12 +56,15 @@ bin/c/%: c/%.c
java-c-jni: bin/java-c-jni/SHA3.$(LIB_EXT) $(JNI_CLASSES)
-bin/java-c-jni/%.so: java-c-jni/%.c
- mkdir -p "bin/java-c-jni"
- gcc $(C_FLAGS) $(JNI_C_FLAGS) "java-c-jni/$*.c" -o "bin/java-c-jni/$*.$(LIB_EXT)"
bin/java-c-jni/%.class: java-c-jni/%.java
- mkdir -p "bin/java-c-jni"
+ mkdir -p "bin/java-c-jni"
$(JAVAC) $(JNI_JAVA_FLAGS) "java-c-jni/$*.java"
+java-c-jni/%.h: bin/java-c-jni/%.class
+ javah -classpath bin/java-c-jni -jni -d java-c-jni \
+ $$(echo "$<" | sed -e 's:^bin/java-c-jni/::' -e 's:.class$$::' | sed -e 's:/:.:g')
+bin/java-c-jni/%.so: java-c-jni/%.h java-c-jni/%.c
+ mkdir -p "bin/java-c-jni"
+ gcc $(C_FLAGS) $(JNI_C_FLAGS) "java-c-jni/$*.c" -o "bin/java-c-jni/$*.$(LIB_EXT)"
@@ -69,5 +72,6 @@ bin/java-c-jni/%.class: java-c-jni/%.java
clean:
-rm {*/,}*.{t2d,aux,cp,cps,fn,ky,log,pg,pgs,toc,tp,vr,vrs,op,ops} 2>/dev/null
-rm {*/,}*.{bak,info,pdf,ps,dvi,gz,class,jar,pyc,o,so,out} 2>/dev/null
+ -rm java-c-jni/*.h 2>/dev/null
-rm -r bin 2>/dev/null