Commit 80cf4330 authored by Martin Deinhofer's avatar Martin Deinhofer
Browse files

changed javah command to javac -h command

fixed clean target
parent 8037a2c2
# Define common variables
CLASS_PATH = ../bin
JAVA_SRC_PATH = ../src
JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
#JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
#Paths to libmcp23s17 and libpifacecad
LIB_MCP23S17=../../libmcp23s17
......@@ -11,13 +11,14 @@ LIB_PIFACECAD=../../libpifacecad
# Define a virtual path for .class in the bin directory
vpath %.class $(CLASS_PATH)
all : libhello.so
all : java_exercises8_1_1/HelloJNI.class libhello.so
run :
java -cp $(CLASS_PATH) -Djava.library.path=../jni java_exercises8_1_1.HelloJNI
java_exercises8_1_1/HelloJNI.class:
javac -cp $(CLASS_PATH) -d $(CLASS_PATH) $(JAVA_SRC_PATH)/java_exercises8_1_1/HelloJNI.java
javac -h . -cp $(CLASS_PATH) -d $(CLASS_PATH) $(JAVA_SRC_PATH)/java_exercises8_1_1/HelloJNI.java
mv java_exercises8_1_1_HelloJNI.h HelloJNI.h
# Targets for java_exercises8_1_1
# $@ matches the target, $< matches the first dependancy
......@@ -30,7 +31,7 @@ HelloJNI.o : HelloJNI.c HelloJNI.h
# $* matches the target filename without the extension
HelloJNI.h : java_exercises8_1_1/HelloJNI.class
javah -o HelloJNI.h -classpath $(CLASS_PATH) java_exercises8_1_1.$*
# javac -h -o HelloJNI.h -classpath $(CLASS_PATH) java_exercises8_1_1.$*
clean :
rm HelloJNI.h HelloJNI.o libhello.so
\ No newline at end of file
rm -f HelloJNI.h HelloJNI.o libhello.so ../bin/java_exercises8_1_1/HelloJNI.class
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment