2
2
PKG_CXXFLAGS = @CXX11STD@
3
3
4
4
ifdef TBB_INC
5
- PKG_CPPFLAGS = -I../inst/include -I$(TBB_INC)
5
+ PKG_CPPFLAGS = -I../inst/include -I$(TBB_INC)
6
6
else
7
- PKG_CPPFLAGS = -I../inst/include
7
+ PKG_CPPFLAGS = -I../inst/include
8
8
endif
9
9
10
10
ifdef TBB_LIB
11
- PKG_LIBS = -Wl,-L,"$(TBB_LIB)" -Wl,-rpath,"$(TBB_LIB)" -ltbb -ltbbmalloc
11
+ PKG_LIBS = -Wl,-L,"$(TBB_LIB)" -Wl,-rpath,"$(TBB_LIB)" -ltbb -ltbbmalloc
12
12
endif
13
13
14
14
ifeq ($(OS), Windows_NT)
15
15
16
16
USE_TBB=Windows
17
17
TBB_COPY_PATTERN=tbb*.dll
18
-
18
+
19
19
MAKE = make
20
20
MAKEFLAGS = -e -s -j1
21
21
MAKE_CMD = \
45
45
endif
46
46
endif
47
47
48
- MAKEFLAGS = -e -s
48
+ MAKEFLAGS + = -e -s
49
49
MAKE_CMD = \
50
50
CONLY="@CC@ $(PKG_CPPFLAGS) @CPPFLAGS@" \
51
51
CPLUS="@CXX11@ $(PKG_CPPFLAGS) @CPPFLAGS@" \
@@ -83,18 +83,18 @@ endif
83
83
84
84
# For Solaris detect if this is 32-bit R on x86 and if so forward that to TBB
85
85
ifeq ($(USE_TBB), SunOS)
86
- R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
87
- ifeq ($(R_32BIT), TRUE)
88
- MAKE_ARGS += arch=ia32
89
- endif
86
+ R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
87
+ ifeq ($(R_32BIT), TRUE)
88
+ MAKE_ARGS += arch=ia32
89
+ endif
90
90
endif
91
91
92
92
# Silence some compilation warnings. This is a dirty trick, but is necessary
93
93
# as TBB uses a number of #pragmas and compiler-specific switches depending
94
94
# on the compiler and machine being compiled for, and it selects and activates
95
95
# those switches only after confirming the specific compiler features it needs.
96
96
ifneq ($(OS), Windows_NT)
97
- MAKE_ARGS += >/dev/null 2>&1
97
+ MAKE_ARGS += >/dev/null 2>&1
98
98
endif
99
99
100
100
.PHONY: all tbb
@@ -108,13 +108,18 @@ ifdef TBB_LIB
108
108
mkdir -p ../inst/lib/$(ARCH_DIR); \
109
109
cp $(TBB_LIB)/libtbb.so ../inst/lib/$(ARCH_DIR)/libtbb.so 2>/dev/null || :; \
110
110
cp $(TBB_LIB)/libtbbmalloc.so ../inst/lib/$(ARCH_DIR)/libtbbmalloc.so 2>/dev/null || :; \
111
+ rm -Rf ../inst/include/serial/; \
112
+ rm -Rf ../inst/include/tbb/; \
113
+ rm -Rf ../inst/include/tbb_local/; \
111
114
mkdir -p ../inst/include; \
112
115
cp -R $(TBB_INC)/serial ../inst/include/ 2>/dev/null || :; \
113
116
cp -R $(TBB_INC)/oneapi ../inst/include/ 2>/dev/null || :; \
114
117
cp -R $(TBB_INC)/tbb ../inst/include/ 2>/dev/null || :
115
118
else
116
119
echo "Using bundled TBB library ..."; \
117
- mkdir -p ../inst/lib/$(ARCH_DIR); \
120
+ rm -Rf ../inst/include/serial/; \
121
+ rm -Rf ../inst/include/tbb/; \
122
+ rm -Rf ../inst/include/tbb_local/; \
118
123
cp -R tbb/include/* ../inst/include/; \
119
124
cd tbb/src; \
120
125
if [ -n "$(shell echo $(CC) | grep clang)" ]; then \
125
130
$(MAKE_CMD) stdver=@STDVER@ $(MAKE_ARGS); \
126
131
fi; \
127
132
cd ../..; \
133
+ mkdir -p ../inst/lib/$(ARCH_DIR); \
128
134
cp tbb/build/lib_release/$(TBB_COPY_PATTERN) ../inst/lib/$(ARCH_DIR)
129
135
endif
130
136
0 commit comments