add settings for OS X
This commit is contained in:
parent
1456585249
commit
7d23ea7e9e
4
Makefile
4
Makefile
@ -19,6 +19,10 @@ ifeq ($(UNAME), Linux)
|
||||
JAVAINCFLAGS += -I${JAVA_HOME}/include/linux
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME), Darwin)
|
||||
JAVAINCFLAGS += -I${JAVA_HOME}/include/darwin
|
||||
endif
|
||||
|
||||
ifeq ($(no_omp),1)
|
||||
CFLAGS += -DDISABLE_OPENMP
|
||||
else
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
echo "build java wrapper"
|
||||
dylib="so"
|
||||
omp="0"
|
||||
if [ $(uname) == "Darwin" ]; then
|
||||
export JAVA_HOME=$(/usr/libexec/java_home)
|
||||
dylib="dylib"
|
||||
omp="1"
|
||||
fi
|
||||
cd ..
|
||||
make java
|
||||
make java no_omp=${omp}
|
||||
cd java
|
||||
echo "move native lib"
|
||||
|
||||
@ -9,7 +16,7 @@ if [ ! -d "$libPath" ]; then
|
||||
mkdir -p "$libPath"
|
||||
fi
|
||||
|
||||
rm -f xgboost4j/src/main/resources/lib/libxgboost4j.so
|
||||
mv libxgboost4j.so xgboost4j/src/main/resources/lib/
|
||||
rm -f xgboost4j/src/main/resources/lib/libxgboost4j.${dylib}
|
||||
mv libxgboost4j.so xgboost4j/src/main/resources/lib/libxgboost4j.${dylib}
|
||||
|
||||
echo "complete"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user