Replace deprecated javah call with "javac -h"
This commit is contained in:
parent
a2ee09ab76
commit
db08686f07
|
@ -30,7 +30,6 @@ MOVE := @mv
|
|||
PRINT := @echo
|
||||
FULL_CLASS := com.fazecast.jSerialComm.SerialPort
|
||||
JAVAC := "$(JDK_HOME)/bin/javac"
|
||||
JAVAH := "$(JDK_HOME)/bin/javah" -jni
|
||||
JFLAGS := -source 1.6 -target 1.6 -Xlint:-options
|
||||
LIBRARY_NAME_POSIX := libjSerialComm.so
|
||||
LIBRARY_NAME_APPLE := libjSerialComm.jnilib
|
||||
|
@ -248,8 +247,7 @@ $(BUILD_DIR)/osx_x86_64/%.o : %.c
|
|||
|
||||
# Rule to build JNI header file
|
||||
$(JNI_HEADER) : $(JAVA_CLASS)
|
||||
$(JAVAH) -d .. -classpath $(JAVA_CLASS_DIR)/../../.. $(FULL_CLASS)
|
||||
|
||||
# Suffix rule to get from *.java -> *.class
|
||||
$(JAVA_CLASS) :
|
||||
$(JAVAC) $(JFLAGS) -d $(JAVA_CLASS_DIR)/../../.. -cp $(JAVA_SOURCE_DIR)/../../.. $(JAVA_SOURCE_DIR)/$(basename $(notdir $@)).java
|
||||
$(JAVAC) $(JFLAGS) -d $(JAVA_CLASS_DIR)/../../.. -cp $(JAVA_SOURCE_DIR)/../../.. $(JAVA_SOURCE_DIR)/$(basename $(notdir $@)).java -h ..
|
||||
|
|
|
@ -13,7 +13,6 @@ MOVE = @move /y
|
|||
PRINT = @echo
|
||||
FULL_CLASS = com.fazecast.jSerialComm.SerialPort
|
||||
JAVAC = "$(JDK_HOME)\bin\javac"
|
||||
JAVAH = "$(JDK_HOME)\bin\javah" -jni
|
||||
JFLAGS = -source 1.6 -target 1.6 -Xlint:-options
|
||||
LIBRARY_NAME = jSerialComm.dll
|
||||
SOURCES = SerialPort_Windows.c WindowsHelperFunctions.c
|
||||
|
@ -77,8 +76,7 @@ $(OBJECTSx86) :
|
|||
|
||||
# Rule to build JNI header file
|
||||
$(JNI_HEADER) : $(JAVA_CLASS)
|
||||
$(JAVAH) -d .. -classpath $(JAVA_CLASS_DIR)\..\..\.. $(FULL_CLASS)
|
||||
|
||||
# Suffix rule to get from *.java -> *.class
|
||||
$(JAVA_CLASS) :
|
||||
$(JAVAC) $(JFLAGS) -d $(JAVA_CLASS_DIR)\..\..\.. -cp $(JAVA_SOURCE_DIR)\..\..\.. $(JAVA_SOURCE_DIR)\$(*B).java
|
||||
$(JAVAC) $(JFLAGS) -d $(JAVA_CLASS_DIR)\..\..\.. -cp $(JAVA_SOURCE_DIR)\..\..\.. $(JAVA_SOURCE_DIR)\$(*B).java -h ..
|
||||
|
|
Loading…
Reference in New Issue