Use option -fPIC for g++
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 17 Sep 2009 11:58:55 +0000 (13:58 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 17 Sep 2009 11:58:55 +0000 (13:58 +0200)
libyaz4j/build.sh

index 36e379a..d326fda 100755 (executable)
@@ -8,9 +8,9 @@ YAZ_LIBS=`${YAZ_CONFIG} --libs`
 
 swig -I"include" -I"${YAZ_PREFIX}/include" -outdir ../src/org/yaz4j/jni -package org.yaz4j.jni -o src/libyaz4j.cpp -c++ -java libyaz4j.i
 
-g++ -I"include" -I"$JNI_DIR" -I"$JNI_DIR/linux" ${YAZ_CFLAGS} -c -Wall -o obj/libyaz4j.o src/libyaz4j.cpp
+g++ -fPIC -I"include" -I"$JNI_DIR" -I"$JNI_DIR/linux" ${YAZ_CFLAGS} -c -Wall -o obj/libyaz4j.o src/libyaz4j.cpp
 
-g++ -I"include" -I"$JNI_DIR" -I"$JNI_DIR/linux" ${YAZ_CFLAGS} -c -Wall -o obj/zoom-extra.o src/zoom-extra.cpp
+g++ -fPIC -I"include" -I"$JNI_DIR" -I"$JNI_DIR/linux" ${YAZ_CFLAGS} -c -Wall -o obj/zoom-extra.o src/zoom-extra.cpp
 
 g++ -shared obj/libyaz4j.o obj/zoom-extra.o  -o lib/libyaz4j.so ${YAZ_LIBS}