Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiang Kou committed Nov 4, 2015
1 parent ab78837 commit e00d03f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ deps
*.Rcheck
*.rds
*.Rproj
.Rproj.user
.Rproj.user
R-package/inst/*
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,15 @@ rcppexport:
roxygen:
Rscript -e "require(roxygen2); roxygen2::roxygenise(\"R-package\")"

rpkg: roxygen
mkdir -p R-package/inst
mkdir -p R-package/inst/libs
cp -rf lib/libmxnet.so R-package/inst/libs
mkdir -p R-package/inst/include
cp -rf include/* R-package/inst/include
cp -rf dmlc-core/include/* R-package/inst/include/
R CMD build R-package

clean:
$(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~

Expand Down
2 changes: 1 addition & 1 deletion R-package/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\.o$
\.so$
src/*.so$
\.dll$
^.*\.Rproj$
^\.Rproj\.user$
Expand Down
17 changes: 2 additions & 15 deletions R-package/src/Makevars
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# _*_ mode: makefile; _*_
PKGROOT=../../

# This file is only used for compilation from github
# It will be replaced by more formal Rpackage structure
# Where PKGROOT moved to root directory

.PHONY: all mxlib
all: $(SHLIB)

$(SHLIB): mxlib
mxlib:
cd $(PKGROOT); make CXX="$(CXX)"; cd -
mkdir -p ../inst
mkdir -p ../inst/libs
cp $(PKGROOT)/lib/libmxnet.so ../inst/libs/libmxnet.so

PKG_CPPFLAGS = -I$(PKGROOT)/include -I$(PKGROOT)/dmlc-core/include
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) #$(FLIBS)
PKG_CPPFLAGS = -I../inst/include
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS)

0 comments on commit e00d03f

Please sign in to comment.