diff --git a/libs/recipes/oneTBB/rules.mk b/libs/recipes/oneTBB/rules.mk new file mode 100644 index 00000000..af5e27c7 --- /dev/null +++ b/libs/recipes/oneTBB/rules.mk @@ -0,0 +1,30 @@ +ONETBB_VERSION = 2021.13.0 +ONETBB_TARBALL = $(DOWNLOAD)/oneTBB-$(ONETBB_VERSION).tar.gz +ONETBB_URL = https://github.com/oneapi-src/oneTBB/archive/refs/tags/v$(ONETBB_VERSION).tar.gz + +.PHONY: oneTBB +oneTBB: $(ONETBB_WASM_LIB) + +$(ONETBB_TARBALL): + mkdir -p $(DOWNLOAD) + wget $(ONETBB_URL) -O $@ + +$(ONETBB_WASM_LIB): $(ONETBB_TARBALL) + mkdir -p $(BUILD)/oneTBB-$(ONETBB_VERSION)/build + tar -C $(BUILD) -xf $(ONETBB_TARBALL) + cd $(BUILD)/oneTBB-$(ONETBB_VERSION)/build && \ + emcmake cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_FIND_ROOT_PATH=$(WASM) \ + -DCMAKE_INSTALL_PREFIX:PATH=$(WASM) \ + -DTBB_STRICT=OFF \ + -DCMAKE_CXX_FLAGS=-Wno-unused-command-line-argument \ + -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON \ + -DBUILD_SHARED_LIBS=OFF \ + -DTBB_EXAMPLES=OFF \ + -DTBB_TEST=OFF \ + -DEMSCRIPTEN_WITHOUT_PTHREAD=true \ + -DTBB_COMMON_COMPILE_FLAGS="-U__TBB_USE_ITT_NOTIFY" \ + .. && \ + cmake --build . && \ + cmake --install . diff --git a/libs/recipes/oneTBB/targets.mk b/libs/recipes/oneTBB/targets.mk new file mode 100644 index 00000000..ba77e173 --- /dev/null +++ b/libs/recipes/oneTBB/targets.mk @@ -0,0 +1,2 @@ +ONETBB_WASM_LIB = $(WASM)/lib/libtbb.a $(WASM)/lib/libtbbmalloc.a +OPTIONAL_WASM_LIBS += $(ONETBB_WASM_LIB)