summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2021-01-03 11:34:42 +0100
committerAndrej Shadura <andrewsh@debian.org>2021-10-08 09:32:33 +0200
commit5dd3d3d586cb5d0bb1f128915db6547239dec974 (patch)
tree5625364c0bc6e10da5f604bc3946cdc7da39a8d8
parentd0d5cf86234859fdd7199226583d3539a99903b9 (diff)
Make pkg-config configurable
gdigi fails to cross build from source, because the upstream Makefile hard codes the build architecture pkg-config. Making it substitutable is sufficient to making gdigi cross buildable. Gbp-Pq: Name cross.patch
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a32e537..4799c10 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
CC ?= gcc
+PKG_CONFIG ?= pkg-config
EXTRA_CFLAGS ?=
EXTRA_LDFLAGS ?=
-CFLAGS := $(shell pkg-config --cflags glib-2.0 gio-2.0 gtk+-3.0 libxml-2.0) -Wall -g -ansi -std=c99 $(EXTRA_CFLAGS)
+CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0 gio-2.0 gtk+-3.0 libxml-2.0) -Wall -g -ansi -std=c99 $(EXTRA_CFLAGS)
LDFLAGS = $(EXTRA_LDFLAGS) -Wl,--as-needed
-LDADD := $(shell pkg-config --libs glib-2.0 gio-2.0 gtk+-3.0 gthread-2.0 alsa libxml-2.0) -lexpat -lm
+LDADD := $(shell $(PKG_CONFIG) --libs glib-2.0 gio-2.0 gtk+-3.0 gthread-2.0 alsa libxml-2.0) -lexpat -lm
OBJECTS = gdigi.o gui.o effects.o preset.o gtkknob.o preset_xml.o
DEPFILES = $(foreach m,$(OBJECTS:.o=),.$(m).m)