Use pkgconf to determine system jemalloc's cflags and libs

Signed-off-by: Maytham Alsudany <maytha8thedev@gmail.com>
This commit is contained in:
Maytham Alsudany 2024-04-14 05:45:45 +03:00
parent 940b0fab03
commit a7654a251b
No known key found for this signature in database
GPG Key ID: D597897206C5F07F

View File

@ -268,8 +268,8 @@ endif
ifeq ($(MALLOC),jemalloc)
FINAL_CFLAGS+= -DUSE_JEMALLOC
ifeq ($(USE_SYSTEM_JEMALLOC),yes)
FINAL_CFLAGS+= -DUSE_SYSTEM_JEMALLOC -I/usr/include/jemalloc/include
FINAL_LIBS := -ljemalloc $(FINAL_LIBS)
FINAL_CFLAGS+= -DUSE_SYSTEM_JEMALLOC $(shell pkgconf --cflags jemalloc)
FINAL_LIBS := $(shell pkgconf --libs jemalloc) $(FINAL_LIBS)
else
DEPENDENCY_TARGETS+= jemalloc
FINAL_CFLAGS+= -I../deps/jemalloc/include