From d4bb3873c92b0a4d046277f3d5362196e145be8c Mon Sep 17 00:00:00 2001 From: orbea Date: Tue, 7 Jan 2025 08:00:04 -0800 Subject: [PATCH 1/2] build: don't hardcode pkg-config --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index daf1321..e3364ce 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ FNAME_cli := flips CXX ?= g++ CFLAGS ?= -g +PKG_CONFIG ?= pkg-config XFILES := @@ -69,12 +70,12 @@ endif ifeq ($(TARGET),gtk) ifeq ($(GTKFLAGS),) - GTKFLAGS := $(shell pkg-config --cflags --libs gtk+-3.0) + GTKFLAGS := $(shell $(PKG_CONFIG) --cflags --libs gtk+-3.0) endif ifeq ($(GTKFLAGS),) - $(warning pkg-config can't find gtk+-3.0, or pkg-config itself can't be found) + $(warning $(PKG_CONFIG) can't find gtk+-3.0, or $(PKG_CONFIG) itself can't be found) $(warning if you have the needed files installed, specify their locations and names with `make GTKFLAGS='-I/usr/include' GTKLIBS='-L/usr/lib -lgtk'`) - $(warning if not, the package names under Debian and derivates are 'pkg-config libgtk-3-dev'; for other distros, consult a search engine) + $(warning if not, the package names under Debian and derivates are '$(PKG_CONFIG) libgtk-3-dev'; for other distros, consult a search engine) $(warning If you instead want to build the CLI version, set the TARGET environment variable like so:) $(warning TARGET=cli make) $(error Can't build gtk target without gtk dependencies) From d430baa5cae18f0cadbb9a15c50912fa4ef5b46c Mon Sep 17 00:00:00 2001 From: Alcaro Date: Tue, 7 Jan 2025 17:08:13 +0100 Subject: [PATCH 2/2] build: don't mix up package and executable names --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e3364ce..b3880f3 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ ifeq ($(TARGET),gtk) ifeq ($(GTKFLAGS),) $(warning $(PKG_CONFIG) can't find gtk+-3.0, or $(PKG_CONFIG) itself can't be found) $(warning if you have the needed files installed, specify their locations and names with `make GTKFLAGS='-I/usr/include' GTKLIBS='-L/usr/lib -lgtk'`) - $(warning if not, the package names under Debian and derivates are '$(PKG_CONFIG) libgtk-3-dev'; for other distros, consult a search engine) + $(warning if not, the package names under Debian and derivates are 'pkg-config libgtk-3-dev'; for other distros, consult a search engine) $(warning If you instead want to build the CLI version, set the TARGET environment variable like so:) $(warning TARGET=cli make) $(error Can't build gtk target without gtk dependencies)