support standard $PKG_CONFIG build setting

This allows people to set PKG_CONFIG to the right value for their
toolchain setup.  This matches upstream pkg-config build behavior.
This commit is contained in:
Mike Frysinger 2021-12-24 10:21:42 -05:00
parent c4a76314b8
commit e006406f1c

View File

@ -4,8 +4,9 @@ LIBDIR?=lib
PREFIX=/usr PREFIX=/usr
HFILES:=$(shell find src/ -type f -iname *.h -print) HFILES:=$(shell find src/ -type f -iname *.h -print)
CXXFILES:=$(shell find src/ -type f -iname *.cpp -print) CXXFILES:=$(shell find src/ -type f -iname *.cpp -print)
GTKFLAGS:=$(shell pkg-config gtkmm-3.0 --cflags) PKG_CONFIG?=pkg-config
GTKLIBS:=$(shell pkg-config gtkmm-3.0 --libs) GTKFLAGS:=$(shell $(PKG_CONFIG) gtkmm-3.0 --cflags)
GTKLIBS:=$(shell $(PKG_CONFIG) gtkmm-3.0 --libs)
# For now, leave it to the distro to provide preferred extra flags # For now, leave it to the distro to provide preferred extra flags
CXXFLAGS+=$(GTKFLAGS) -Wall CXXFLAGS+=$(GTKFLAGS) -Wall
LDLIBS+=$(GTKLIBS) -lsteam_api -lcurl -lyajl -ldl LDLIBS+=$(GTKLIBS) -lsteam_api -lcurl -lyajl -ldl