merge from dmlc/xgboost

This commit is contained in:
黄子轩
2015-12-29 01:34:06 -08:00
8 changed files with 29 additions and 15 deletions

View File

@@ -1,11 +1,18 @@
#!/usr/bin/env sh
echo "build java wrapper"
dylib="so"
# cd to script's directory
pushd `dirname $0` > /dev/null
#settings according to os
dl="so"
omp="0"
if [ $(uname) == "Darwin" ]; then
export JAVA_HOME=$(/usr/libexec/java_home)
dylib="dylib"
dl="dylib"
omp="1"
fi
cd ..
make java no_omp=${omp}
cd java
@@ -16,7 +23,8 @@ if [ ! -d "$libPath" ]; then
mkdir -p "$libPath"
fi
rm -f xgboost4j/src/main/resources/lib/libxgboost4j.${dylib}
mv libxgboost4j.so xgboost4j/src/main/resources/lib/libxgboost4j.${dylib}
rm -f xgboost4j/src/main/resources/lib/libxgboost4j.${dl}
mv libxgboost4j.so xgboost4j/src/main/resources/lib/libxgboost4j.${dl}
popd > /dev/null
echo "complete"