From 00a005f485a8ef110a292a134f537fc7d27e5d56 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Wed, 29 Mar 2023 19:26:15 +0100 Subject: [PATCH] Don't hard-code pkg-config --- src/Makefile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Makefile b/src/Makefile index 75ac350..70a1308 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,18 +1,20 @@ # CFLAGS = -g #-DMONDEBUG +PKG_CONFIG ?= pkg-config + # # undefine HI_INTS if not on x86 SMP or alpha # CFLAGS += -W -Wall -pedantic -DHI_INTS \ - $(shell pkg-config dockapp --cflags) \ - $(shell pkg-config x11 --cflags) \ - $(shell pkg-config xext --cflags) \ - $(shell pkg-config xpm --cflags) - -LIBS += $(shell pkg-config dockapp --libs) \ - $(shell pkg-config x11 --libs) \ - $(shell pkg-config xext --libs) \ - $(shell pkg-config xpm --libs) \ + $(shell $(PKG_CONFIG) dockapp --cflags) \ + $(shell $(PKG_CONFIG) x11 --cflags) \ + $(shell $(PKG_CONFIG) xext --cflags) \ + $(shell $(PKG_CONFIG) xpm --cflags) + +LIBS += $(shell $(PKG_CONFIG) dockapp --libs) \ + $(shell $(PKG_CONFIG) x11 --libs) \ + $(shell $(PKG_CONFIG) xext --libs) \ + $(shell $(PKG_CONFIG) xpm --libs) \ -lm PREFIX = /usr