Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-without-ivy.xml and build.xml do not initiate JNI re-build #7

Open
mouse07410 opened this issue Aug 19, 2016 · 1 comment
Open

Comments

@mouse07410
Copy link

The current scripts only use pre-built shared libraries. Not good for me, because their hardcoded paths are wrong - but I cannot force the build to re-do this.

CardContact pushed a commit that referenced this issue Aug 23, 2016
@CardContact CardContact reopened this Aug 23, 2016
@mouse07410
Copy link
Author

mouse07410 commented Aug 25, 2016

Following your guidance, here's the complete diff:

$ git diff
diff --git a/build-without-ivy.xml b/build-without-ivy.xml
index 7f6a368..46d23d6 100644
--- a/build-without-ivy.xml
+++ b/build-without-ivy.xml
@@ -27,6 +27,7 @@

        <target name="compile">
                <mkdir dir="${build}/bin"/>
+               <mkdir dir="${basedir}/java/lib"/>
                <javac encoding="8859_1" srcdir="${basedir}/java/src" destdir="${build}/bin">
                        <classpath refid="project.class.path"/>
                        <exclude name="**/.git"/>
diff --git a/jni/build/macosx/release/config.data b/jni/build/macosx/release/config.data
index 0e9d543..7bc6406 100644
--- a/jni/build/macosx/release/config.data
+++ b/jni/build/macosx/release/config.data
@@ -1,7 +1,18 @@
 #
 # Default makefile variable settings.
 #
+ac CC=clang
+ac CPP=clang -E
+ac CXX=clang++
 ac CFLAGS=-O2 -Wall
 ac CXXFLAGS=-O2 -Wall
 ac JNI_CFLAGS=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
 ac LIBDYN=dylib
+ac DYN_LDFLAGS=-shared -dynamiclib
+ac SSL_LDFLAGS=-L/opt/local/lib
+ac SSL_LIBS=-lcrypto -lssl
+ac SSL_CFLAGS=-I/opt/local/include
+ac OPENSC_LDFLAGS=-L/Library/OpenSC/lib
+ac OPENSC_LIBS=-lopensc
+ac PKCS11_CFLAGS=-I/opt/local/include
+ac PKCS11_LDFLAGS=-L/opt/local/lib

To re-build the native shared library on Mac OS X I had to do (as you mentioned)

$ cd jni/build/macosx/release
$ perl ../../../src/scripts/config.pl
. . . . .
$ make

P.S. Similar config.data for macosx/debug, except replacing "-O2" with "-g".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants