-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
57 lines (45 loc) · 1.83 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
SHELL := /bin/bash
ALL:
make compile
make nocompile
nocompile:
make prepare
make rcpp
make roxygen
make clean
make build
make check
make install
docs:
make compile
make prepare
make rcpp
make roxygen
compile: inst/ADMB/src/densfuns.cpp inst/ADMB/src/detfuns.cpp inst/ADMB/src/secr.tpl
if [ $(shell hostname) == "twiga" ]; then cd inst/ADMB/src; LDFLAGS=-static admb -f secr.tpl; rm -rfv secr.cpp secr.htp secr.o secr.obj; cd ../bin/linux; rm -rfv secr; mv ../../src/secr ./secr; fi
if [ $(shell hostname) == "darwen" ]; then cd inst/ADMB/src; LDFLAGS=-static admb -f secr.tpl; rm -rfv secr.cpp secr.htp secr.o secr.obj; cd ../bin/linux; rm -rfv secr; mv ../../src/secr ./secr; fi
if [ $(shell hostname) == "darwen-win" ]; then export OLDPATH=$$PATH; export PATH=/c/admb:/c/admb/utilities/mingw64/bin:$$PATH; echo $$PATH; cd inst/ADMB/src; cmd //c admb -f secr.tpl; rm -rfv secr.cpp secr.htp secr.o secr.obj; cd ../bin/windows; rm -rfv secr.exe; mv ../../src/secr.exe ./secr.exe; export PATH=$$OLDPATH; fi
if [ $(shell hostname) == "albatross.mcs.st-and.ac.uk" ]; then cd inst/ADMB/src; admb -f secr.tpl; rm -rfv secr.cpp secr.htp secr.o secr.obj; cd ../bin/mac; rm -rfv secr; mv ../../src/secr ./secr; fi
prepare:
rm -rfv man
rm -fv NAMESPACE src/*.o src/RcppExports.cpp src/admbsecr.so src/symbols.rds R/RcppExports.R
rcpp:
R --slave -e "library(Rcpp); compileAttributes()"
roxygen:
R --slave -e "library(roxygen2); roxygenise('.')"
build:
R CMD build --resave-data .
mkdir -p package-build
mv admbsecr_1.2.3.tar.gz package-build/
check:
R CMD check package-build/admbsecr_1.2.3.tar.gz --no-tests
install:
R CMD INSTALL package-build/admbsecr_1.2.3.tar.gz --install-tests
pdf:
R CMD Rd2pdf --pdf . &
rm ..pdf
clean:
rm -rfv ..Rcheck/ ..pdf
rm -rfv src/*.o src/*.so src/*.rds
rm -rfv src-i386/ src-x64/
rm -rfv admbsecr.Rcheck