From: José Fonseca Date: Thu, 25 Oct 2007 14:46:40 +0000 (+0100) Subject: Expand pkg-config flags before invoking the compiler. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d2ff452d4dd8fb7f2f5e53b360b29254fc4db41;p=mesa.git Expand pkg-config flags before invoking the compiler. This allows IDEs such as Eclipse to get the correct c-preprocessor flags used from the build output. --- diff --git a/configs/linux-dri b/configs/linux-dri index 63e065a40fa..936fce99829 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -38,8 +38,8 @@ ASM_SOURCES = # Library/program dependencies EXTRA_LIB_PATH=-L/usr/X11R6/lib -LIBDRM_CFLAGS = `pkg-config --cflags libdrm` -LIBDRM_LIB = `pkg-config --libs libdrm` +LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) +LIBDRM_LIB = $(shell pkg-config --libs libdrm) DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ -lm -lpthread -ldl \ diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb index 5620fe58e70..aa292a13ec1 100644 --- a/configs/linux-dri-xcb +++ b/configs/linux-dri-xcb @@ -25,7 +25,7 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \ -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN -X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I x11-xcb` `pkg-config --cflags-only-I xcb-glx` +X11_INCLUDES = $(shell pkg-config --cflags-only-I x11) $(shell pkg-config --cflags-only-I xcb) $(shell pkg-config --cflags-only-I x11-xcb) $(shell pkg-config --cflags-only-I xcb-glx) CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ $(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math @@ -36,13 +36,13 @@ CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) ASM_SOURCES = # Library/program dependencies -EXTRA_LIB_PATH=`pkg-config --libs-only-L x11` +EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11) -LIBDRM_CFLAGS = `pkg-config --cflags libdrm` -LIBDRM_LIB = `pkg-config --libs libdrm` +LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) +LIBDRM_LIB = $(shell pkg-config --libs libdrm) DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ - $(LIBDRM_LIB) `pkg-config --libs xcb` `pkg-config --libs x11-xcb` `pkg-config --libs xcb-glx` + $(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx) # This is now 0 by default since it seems to confuse the hell out of people diff --git a/configs/linux-solo b/configs/linux-solo index 2d0817dfb75..220fe58b9a4 100644 --- a/configs/linux-solo +++ b/configs/linux-solo @@ -16,10 +16,10 @@ PIC_FLAGS = -fPIC ARCH_FLAGS ?= # DRM and pciaccess -LIBDRM_CFLAGS = `pkg-config --cflags libdrm` -LIBDRM_LIB = `pkg-config --libs libdrm` -PCIACCESS_CFLAGS = `pkg-config --cflags pciaccess` -PCIACCESS_LIB = `pkg-config --libs pciaccess` +LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) +LIBDRM_LIB = $(shell pkg-config --libs libdrm) +PCIACCESS_CFLAGS = $(shell pkg-config --cflags pciaccess) +PCIACCESS_LIB = $(shell pkg-config --libs pciaccess) DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \