-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathMakevars.in
More file actions
40 lines (31 loc) · 1.26 KB
/
Makevars.in
File metadata and controls
40 lines (31 loc) · 1.26 KB
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
# This needs to expand to something the shell will accept as '$ORIGIN',
# including a literal '$' (no variable expansion)
ORIGIN = \$$ORIGIN
CMAKE = @CMAKE@
R = @R@
TBB_LIB = @TBB_LIB@
TBB_INC = @TBB_INC@
TBB_NAME = @TBB_NAME@
TBB_MALLOC_NAME = @TBB_MALLOC_NAME@
PKG_CPPFLAGS = @PKG_CPPFLAGS@
PKG_CXXFLAGS = @PKG_CXXFLAGS@
PKG_LIBS = @PKG_LIBS@ @PKG_LIBS_EXTRA@
all: tbb $(SHLIB)
# TBB needs to be built before our C++ sources are built, so that
# headers are copied and available from the expected locations.
$(OBJECTS): tbb
# NOTE: TBB libraries are installed via install.libs.R.
# However, we need to copy headers here so that they are visible during compilation.
tbb: tbb-clean
@TBB_LIB="$(TBB_LIB)" TBB_INC="$(TBB_INC)" \
TBB_NAME="$(TBB_NAME)" TBB_MALLOC_NAME="$(TBB_MALLOC_NAME)" \
CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
CMAKE="$(CMAKE)" "@R@" -s -f install.libs.R --args build
# NOTE: we do not want to clean ../inst/lib or ../inst/libs here,
# as we may be writing to those locations in multiarch builds
tbb-clean:
@rm -rf ../inst/include/tbb
@rm -rf ../inst/include/oneapi
@rm -rf ../inst/include/tbb_local
@rm -rf ../inst/include/serial