diff --git a/Makefile b/Makefile index e60f57517ad0..a57402d3d851 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +ROOTDIR = $(CURDIR) + ifndef config ifdef CXXNET_CONFIG config = $(CXXNET_CONFIG) @@ -32,14 +34,13 @@ ifeq ($(DEBUG), 1) else CFLAGS += -O3 endif -CFLAGS += -I./mshadow/ -I./dmlc-core/include -fPIC -Iinclude $(MSHADOW_CFLAGS) +CFLAGS += -I$(ROOTDIR)/mshadow/ -I$(ROOTDIR)/dmlc-core/include -fPIC -Iinclude $(MSHADOW_CFLAGS) LDFLAGS = -pthread $(MSHADOW_LDFLAGS) $(DMLC_LDFLAGS) ifeq ($(DEBUG), 1) NVCCFLAGS = -g -G -O0 -ccbin $(CXX) $(MSHADOW_NVCCFLAGS) else NVCCFLAGS = --use_fast_math -g -O3 -ccbin $(CXX) $(MSHADOW_NVCCFLAGS) endif -ROOTDIR = $(CURDIR) ifndef LINT_LANG LINT_LANG="all" @@ -218,6 +219,12 @@ rpkg: roxygen cp -rf dmlc-core/include/* R-package/inst/include/ R CMD build --no-build-vignettes R-package +scalapkg: + (cd scala-package; mvn clean package -Dcxx="$(CXX)" -Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)"; cd $(ROOTDIR)) + +scalatest: + (cd scala-package; mvn integration-test -Dcxx="$(CXX)" -Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" $(SCALA_TEST_ARGS); cd $(ROOTDIR)) + ifneq ($(EXTRA_OPERATORS),) clean: $(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~ diff --git a/scala-package/core/pom.xml b/scala-package/core/pom.xml index c0b2bfa696ea..984830ed9500 100644 --- a/scala-package/core/pom.xml +++ b/scala-package/core/pom.xml @@ -14,12 +14,23 @@ osx-x86_64 + + + mac + x86_64 + + osx-x86_64 linux-x86_64 + + + linux + + linux-x86_64 diff --git a/scala-package/native/linux-x86_64/pom.xml b/scala-package/native/linux-x86_64/pom.xml index a0dedfb8122b..4369a340f9e6 100644 --- a/scala-package/native/linux-x86_64/pom.xml +++ b/scala-package/native/linux-x86_64/pom.xml @@ -36,60 +36,6 @@ maven-compiler-plugin - - maven-antrun-plugin - - - generate-sources - - run - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.mojo native-maven-plugin @@ -111,33 +57,23 @@ -std=c++0x - - - -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -fopenmp - - -I../../../include - -I../../../dmlc-core/include - -I../../../mshadow ${cflags.blas} - -DMSHADOW_USE_CUDA=0 - -DMSHADOW_USE_CBLAS=${use.cblas} - -DMSHADOW_USE_MKL=${use.mkl} - -fPIC - + ${cflags} -shared - -Wl,--whole-archive - ../../../lib/libmxnet.a - ../../../dmlc-core/libdmlc.a - -Wl,--no-whole-archive - -lm -lrt -fopenmp - ${ldflags.opencv} - ${ldflags.blas} + ${ldflags} + -fopenmp + + -Wl,--whole-archive + ../../../lib/libmxnet.a + ../../../dmlc-core/libdmlc.a + -Wl,--no-whole-archive + diff --git a/scala-package/native/osx-x86_64/pom.xml b/scala-package/native/osx-x86_64/pom.xml index b3719dcb7b38..46ab532870ab 100644 --- a/scala-package/native/osx-x86_64/pom.xml +++ b/scala-package/native/osx-x86_64/pom.xml @@ -36,55 +36,6 @@ maven-compiler-plugin - - maven-antrun-plugin - - - generate-sources - - run - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.mojo native-maven-plugin @@ -106,33 +57,23 @@ -std=c++0x - - - -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas - - -I../../../include - -I../../../dmlc-core/include - -I../../../mshadow ${cflags.blas} - -DMSHADOW_USE_CUDA=0 - -DMSHADOW_USE_CBLAS=${use.cblas} - -DMSHADOW_USE_MKL=${use.mkl} - -fPIC + ${cflags} -shared - -fopenmp - -lm - -framework Accelerate ${ldflags.opencv} - -framework JavaVM ${ldflags.blas} - -Wl,-exported_symbol,_Java_* - -Wl,-x - ../../../dmlc-core/libdmlc.a - -force_load ../../../lib/libmxnet.a + ${ldflags} + + -framework JavaVM + -Wl,-exported_symbol,_Java_* + -Wl,-x + ../../../dmlc-core/libdmlc.a + -force_load ../../../lib/libmxnet.a + diff --git a/scala-package/native/pom.xml b/scala-package/native/pom.xml index d7f246c31348..99cae2e9e2ea 100644 --- a/scala-package/native/pom.xml +++ b/scala-package/native/pom.xml @@ -14,6 +14,12 @@ osx-x86_64 + + + mac + x86_64 + + osx-x86_64 @@ -23,6 +29,11 @@ linux-x86_64 + + + linux + + linux-x86_64 diff --git a/tests/travis/run_test.sh b/tests/travis/run_test.sh index add17a9b97b2..e8778b078859 100755 --- a/tests/travis/run_test.sh +++ b/tests/travis/run_test.sh @@ -119,18 +119,10 @@ if [ ${TASK} == "scala_test" ]; then mkdir -p ${CACHE_PREFIX}/data ln -s ${CACHE_PREFIX}/data ${PWD}/data - cd scala-package export JAVA_HOME=$(/usr/libexec/java_home) - if [ ${TRAVIS_OS_NAME} == "osx" ]; then - mvn clean package -P osx-x86_64 - mvn integration-test -P osx-x86_64 || exit -1 - fi - if [ ${TRAVIS_OS_NAME} == "linux" ]; then - # use g++-4.8 for linux - mvn clean package -P linux-x86_64 -D cxx=g++-4.8 -D ldflags.blas=-lblas - mvn integration-test -P linux-x86_64 -D cxx=g++-4.8 -D ldflags.blas=-lblas || exit -1 - fi + make scalapkg || exit -1 + make scalatest || exit -1 exit 0 fi