summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-02-28 10:55:10 +0000
committerRobin Watts <robin.watts@artifex.com>2013-02-28 10:55:10 +0000
commit61c1f80d36bf1d946ce26d39f9afb99897fc9923 (patch)
treec7d1aebbbad808cab1561b0a14e497bba3f54532 /Makerules
parent2f8c9375dc0624aff0bac7f5efe4dcbee78453a4 (diff)
downloadmupdf-61c1f80d36bf1d946ce26d39f9afb99897fc9923.tar.xz
Bug 693596: Speed compilation on unix based systems.
Use $(shell xxxx) rather than `xxxx` for pkg-config lines to avoid repeated reevaluation. Also get X libs from pkg-config too. Thanks to Michael Weber.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules16
1 files changed, 8 insertions, 8 deletions
diff --git a/Makerules b/Makerules
index 244744b8..4ff99e6d 100644
--- a/Makerules
+++ b/Makerules
@@ -24,21 +24,21 @@ $(error unknown build setting: '$(build)')
endif
ifeq "$(OS)" "Linux"
-SYS_FREETYPE_INC := `pkg-config --cflags freetype2`
-SYS_OPENJPEG_INC := `pkg-config --cflags libopenjpeg`
-X11_LIBS := -lX11 -lXext
+SYS_FREETYPE_INC := $(shell pkg-config --cflags freetype2)
+SYS_OPENJPEG_INC := $(shell pkg-config --cflags libopenjpeg)
+X11_LIBS := $(shell pkg-config --libs x11 xext)
endif
ifeq "$(OS)" "FreeBSD"
-SYS_FREETYPE_INC := `pkg-config --cflags freetype2`
+SYS_FREETYPE_INC := $(shell pkg-config --cflags freetype2)
LDFLAGS += -L/usr/local/lib
-X11_LIBS := -lX11 -lXext
+X11_LIBS := $(shell pkg-config --libs x11 xext)
endif
ifeq "$(OS)" "SunOS"
-SYS_FREETYPE_INC := `pkg-config --cflags freetype2`
+SYS_FREETYPE_INC := $(shell pkg-config --cflags freetype2)
LDFLAGS += -L/usr/local/lib
-X11_LIBS := -lX11 -lXext
+X11_LIBS := $(shell pkg-config --libs x11 xext)
endif
# Mac OS X build depends on some thirdparty libs
@@ -47,7 +47,7 @@ SYS_FREETYPE_INC := -I/usr/X11R6/include/freetype2
CFLAGS += -I/usr/X11R6/include
LDFLAGS += -L/usr/X11R6/lib
RANLIB_CMD = ranlib $@
-X11_LIBS := -lX11 -lXext
+X11_LIBS := $(shell pkg-config --libs x11 xext)
ifeq "$(arch)" "amd64"
CFLAGS += -m64
LDFLAGS += -m64