Debian Codegraph @

inst/examples/threads/GNUmakefile

raw symbols SCIP
1
2 ## This Makefile is __very__ barebones
3 ##
4 ## It works on Debian/Ubuntu. On other systems, add -I and -L flags as needed.
5
6
7 ## comment this out if you need a different version of R,
8 ## and set set R_HOME accordingly as an environment variable
9 R_HOME := $(shell R RHOME)
10
11 ## include headers and libraries for R
12 RCPPFLAGS := $(shell $(R_HOME)/bin/R CMD config --cppflags)
13 RLDFLAGS := $(shell $(R_HOME)/bin/R CMD config --ldflags)
14 RBLAS := $(shell $(R_HOME)/bin/R CMD config BLAS_LIBS)
15 RLAPACK := $(shell $(R_HOME)/bin/R CMD config LAPACK_LIBS)
16
17 ## if you need to set an rpath to R itself, also uncomment
18 #RRPATH := -Wl,-rpath,$(R_HOME)/lib
19
20 ## include headers and libraries for Rcpp interface classes
21 RCPPINCL := $(shell echo 'Rcpp:::CxxFlags()' | $(R_HOME)/bin/R --vanilla --slave)
22 RCPPLIBS := $(shell echo 'Rcpp:::LdFlags()' | $(R_HOME)/bin/R --vanilla --slave)
23
24 ## include headers and libraries for RInside embedding classes
25 RINSIDEINCL := $(shell echo 'RInside:::CxxFlags()' | $(R_HOME)/bin/R --vanilla --slave)
26 RINSIDELIBS := $(shell echo 'RInside:::LdFlags()' | $(R_HOME)/bin/R --vanilla --slave)
27
28
29 ## minimal Boost libs -- works for me on Ubuntu, may need -L switches elsewhere...
30 BOOSTLIBS := -lboost_thread
31
32
33 ## compiler etc settings used in default make rules
34 CXX := $(shell $(R_HOME)/bin/R CMD config CXX)
35 CPPFLAGS := -Wall $(shell $(R_HOME)/bin/R CMD config CPPFLAGS)
36 CXXFLAGS := $(RCPPFLAGS) $(RCPPINCL) $(RINSIDEINCL) $(shell $(R_HOME)/bin/R CMD config CXXFLAGS)
37 LDLIBS := $(RLDFLAGS) $(RRPATH) $(RBLAS) $(RLAPACK) $(RCPPLIBS) $(RINSIDELIBS) $(BOOSTLIBS)
38
39
40
41 all: boostEx
42
43 boostEx: boostEx.cpp
44 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDLIBS)
45 strip $@
46
47 clean:
48 rm -f boostEx