1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Factor out makefile TBB detection, apply to all tools.

This commit is contained in:
Jim Blandy
2020-07-31 09:14:12 -07:00
parent a12bf2d753
commit 652582b119
6 changed files with 32 additions and 37 deletions
+16
View File
@@ -0,0 +1,16 @@
# Common code needed by most Tracy Unix Makefiles.
# Ensure LIBS is a simply-substituted variable, without changing its value.
LIBS := $(LIBS)
# Tracy does not use TBB directly, but the implementation of parallel algorithms
# in some versions of libstdc++ depends on TBB. When it does, you must
# explicitly link against -ltbb.
#
# Some distributions have pgk-config files for TBB, others don't.
ifeq (0,$(shell pkg-config --libs tbb >/dev/null 2>&1; echo $$?))
LIBS += $(shell pkg-config --libs tbb)
else ifeq (0,$(shell ld -ltbb -o /dev/null 2>/dev/null; echo $$?))
LIBS += -ltbb
endif