From e8bf87bf857ffa68e18137cd08943a3208382feb Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 21 May 2024 23:42:28 +0300 Subject: [PATCH] Add recipe for oneTBB --- libs/recipes/oneTBB/rules.mk | 29 +++++++++++++++++++++++++++++ libs/recipes/oneTBB/targets.mk | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 libs/recipes/oneTBB/rules.mk create mode 100644 libs/recipes/oneTBB/targets.mk diff --git a/libs/recipes/oneTBB/rules.mk b/libs/recipes/oneTBB/rules.mk new file mode 100644 index 00000000..44cd67e1 --- /dev/null +++ b/libs/recipes/oneTBB/rules.mk @@ -0,0 +1,29 @@ +ONETBB_VERSION = 2021.12.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 \ + .. && \ + 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)