Commit f72dc43d authored by Martin Deinhofer's avatar Martin Deinhofer
Browse files

added flag -fPIC to gcc command to prevent ld error

parent a83d23cd
......@@ -17,7 +17,7 @@ $(JNI_DIR)/libhello.so : $(JNI_DIR)/HelloJNI.o
# $@ matches the target, $< matches the first dependancy
$(JNI_DIR)/HelloJNI.o : $(JNI_DIR)/HelloJNI.c $(JNI_DIR)/HelloJNI.h
gcc -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux" -I"$(JNI_DIR)" -c $< -o $@
gcc -fPIC -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux" -I"$(JNI_DIR)" -c $< -o $@
# $* matches the target filename without the extension
$(JNI_DIR)/HelloJNI.h :
......@@ -31,7 +31,7 @@ $(JNI_DIR)/libjava_exercises7_2_1_HelloJNI.so : $(JNI_DIR)/java_exercises7_2_1_H
# $@ matches the target, $< matches the first dependancy
$(JNI_DIR)/java_exercises7_2_1_HelloJNI.o : $(JNI_DIR)/java_exercises7_2_1_HelloJNI.c $(JNI_DIR)/java_exercises7_2_1_HelloJNI.h
gcc -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux" -I"$(JNI_DIR)" -c $< -o $@
gcc -fPIC -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux" -I"$(JNI_DIR)" -c $< -o $@
$(JNI_DIR)/java_exercises7_2_1_HelloJNI.h :
$(JAVAC) -version
......
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