-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile
69 lines (59 loc) · 1.46 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
57
58
59
60
61
62
63
64
65
66
67
68
69
#### Start of system configuration section. ####
RCMD = R CMD
MAKE = make
MOVE = mv
CSRC = ./C
DSRC = ./D
RDOC = ./Rctl/vignettes
RPDF = ./Rctl/inst/doc
#### End of system configuration section. ####
all: static shared installR versionC
# target: help - Display possible targets
help:
egrep "^# target:" [Mm]akefile
# target: versionC - Standalone version from C source code
versionC:
cd $(CSRC); \
$(MAKE); \
$(MOVE) mapctl ../mapctl
# target: versionD - Standalone version from D source code
versionD:
cd $(DSRC); \
$(MAKE); \
$(MOVE) mapctl ../mapctl
# target: static - Create the CTL static library
static:
cd $(CSRC); \
$(MAKE) static; \
$(MOVE) libctl.a ../libctl.a
# target: shared - Create the CTL shared library
shared:
cd $(CSRC); \
$(MAKE) shared; \
$(MOVE) libctl.so ../libctl.so
# target: checkR - Check the R version
checkR: clean
cd $(RDOC); \
$(RCMD) Sweave manual.Rnw; \
pdflatex manual.tex;\
rm -rf manual.aux manual.log manual.tex manual.aux.Rcheck
$(MOVE) $(RDOC)/manual.pdf $(RPDF)
$(RCMD) check --no-tests Rctl
$(MAKE) clean
# target: installR - Install the R version
installR: clean
$(RCMD) INSTALL Rctl
$(MAKE) clean
# target: buildR - Build the R version for CRAN submission
buildR: clean
$(RCMD) build Rctl
$(MAKE) clean
# target: clean - Cleanup
clean:
rm -f mapctl *a *.so q.log
rm -f C/*o C/summary.txt
rm -f $(RPDF)/manual.pdf
rm -rf Rctl/src/*o
rm -rf Rctl.Rcheck
cd $(RDOC); \
rm -f manual.aux manual.log manual.tex