-
Notifications
You must be signed in to change notification settings - Fork 56
Yices: Use official repository for building the Java bindings #660
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
Open
daniel-raffler
wants to merge
3
commits into
master
Choose a base branch
from
yices2-upstream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ diff --git a/build.xml b/build.xml | |
| </target> | ||
|
|
||
| <target name="dist" depends="compile" | ||
| @@ -220,11 +226,16 @@ | ||
| @@ -220,11 +237,16 @@ | ||
| </manifest> | ||
| </jar> | ||
|
|
||
|
|
@@ -75,48 +75,53 @@ diff --git a/src/main/java/com/sri/yices/Makefile b/src/main/java/com/sri/yices/ | |
| $(error "Unkown OS: $(OS)") | ||
| @@ -48,7 +50,11 @@ | ||
| endif | ||
|
|
||
| # name of the library | ||
| -libyices2java := libyices2java.$(EXTENSION) | ||
| +ifeq ($(OS),win32) | ||
| + libyices2java := yices2java.$(EXTENSION) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| +else | ||
| + libyices2java := libyices2java.$(EXTENSION) | ||
| +endif | ||
|
|
||
| # install name for darwin | ||
| libyices2java_install_name := $(YICES_JNI)/libyices2java.dylib | ||
| @@ -56,9 +62,11 @@ | ||
| @@ -56,15 +62,11 @@ | ||
| # we ignore versions and soname for now | ||
|
|
||
| # default include directories for jni.h and jni_md.h | ||
| -CPPFLAGS := -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/$(OS) | ||
| -CXXFLAGS := -g -fPIC | ||
| -LIBS := -lyices -lgmp | ||
| -GMP_CPPFLAGS ?= $(shell pkg-config --cflags gmp 2>/dev/null) | ||
| -GMP_LIBS ?= $(shell pkg-config --libs gmp 2>/dev/null) | ||
| +CPPFLAGS := -I $(JNI_PATH) -I $(JNI_PATH)/$(OS) -I $(GMP_PATH)/include -I $(YICES_PATH)/include | ||
| +CXXFLAGS := -O3 -fPIC $(CXXFLAGS) | ||
| + | ||
|
|
||
| -CPPFLAGS += -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/$(OS) $(GMP_CPPFLAGS) | ||
| -CXXFLAGS += -g -fPIC | ||
| -ifeq ($(strip $(GMP_LIBS)),) | ||
| -GMP_LIBS := -lgmp | ||
| -endif | ||
| -LIBS += -lyices $(GMP_LIBS) | ||
| +LDFLAGS := -L $(YICES_PATH)/lib -L $(CUDD_PATH)/lib -L $(POLY_PATH)/lib -L $(GMP_PATH)/lib | ||
| +LIBS := -lyices -lcudd -lpoly -lgmpxx -lgmp | ||
| +LIBS = -lyices -lcudd -lpoly -lgmpxx -lgmp | ||
|
|
||
| CXX ?= g++ | ||
| @@ -86,7 +94,10 @@ | ||
| $(CXX) $(CPPFLAGS) $(CXXFLAGS) -dynamiclib -o $@ yicesJNI.o $(LIBS) | ||
|
|
||
| @@ -92,7 +94,10 @@ | ||
| $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -dynamiclib -o $@ yicesJNI.o $(LIBS) | ||
|
|
||
| libyices2java.so: yicesJNI.o | ||
| - $(CXX) $(CFLAGS) $(LDFLAGS) -shared -o $@ yicesJNI.o $(LIBS) | ||
| - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ yicesJNI.o $(LIBS) | ||
| + $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ yicesJNI.o -shared -Wl,-soname,$(libyices2java) -Wl,-Bstatic $(LIBS) -static-libstdc++ -lstdc++ -Wl,-Bdynamic -lc -lm -Wl,--version-script=libyices2java.version | ||
| + | ||
| +yices2java.dll: yicesJNI.o | ||
| + $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ yicesJNI.o -shared -Wl,-soname,$(libyices2java) -Wl,-Bstatic,--whole-archive -lpthread -Wl,-Bstatic,--no-whole-archive $(LIBS) -static-libgcc -static-libstdc++ -lstdc++ -Wl,-Bdynamic -lm -Wl,--version-script=libyices2java.version | ||
|
|
||
| LIBDIR := $(YICES_JNI) | ||
| @@ -99,7 +110,10 @@ | ||
|
|
||
| @@ -105,7 +110,10 @@ | ||
| install-darwin: | ||
| cp $(libyices2java) $(LIBDIR) | ||
|
|
||
| +install-win32: | ||
| + cp $(libyices2java) $(LIBDIR) | ||
| + | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PhilippWendler do we need to add a license of we use Oracle JDKs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One always needs a license for every piece of software that one uses.
Whether the current license of the Oracle JDK allows us to use it for free I don't know, you have to check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! We will take a look and add the appropriate license if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean with "add"? Why and where would you want to "add" a license? The license is specified by Oracle, not us. We need to be given a license that allows us to use the software.