about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHugo Osvaldo Barrera <hugo@whynothugo.nl>2025-08-01 20:42:26 +0200
committerAlexey Yerin <yyp@disroot.org>2025-08-02 12:18:27 +0300
commit677d08ddeff8bde164fd01f7a6d19ec4bb42adcf (patch)
treeafcf3222d1f4feeece16e4d04daea47e5c4dc95a
parent907bd0c617b0d3bf635f5748ed582cebf68fdf71 (diff)
Inline calls only required for demos
LIB_3 and LIB_4 are only used to build the demos, but are initialised
unconditionally. This requires pkg-config, gtk+3.0-dev and gtk4.0-dev.

Inline this initialisation, so that pkg-config, gtk3 and gtk4 are only
required when building the demos (or gtk bindings), but not for building
hare-gi itself.
-rw-r--r--Makefile7
1 files changed, 2 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 473649f..3b58a17 100644
--- a/Makefile
+++ b/Makefile
@@ -34,9 +34,6 @@ MODULES_GTK4 = \
 	gi/graphene \
 	gi/gsk
 
-LIBS_3 != pkg-config --libs-only-l gtk+-3.0
-LIBS_4 != pkg-config --libs-only-l gtk4
-
 HARE_GI_SRC != find cmd/hare-gi/ -name '*.ha'
 GIR_SRC != find gir/ -name '*.ha'
 FORMAT_FASTXML_SRC != find format/fastxml/ -name '*.ha'
@@ -79,10 +76,10 @@ uninstall-gtk4:
 	@./scripts/uninstall-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_GTK4)
 
 demo-gtk3: .gen
-	hare build $(LIBS_3) -o demo-gtk3 cmd/demo-gtk3
+	hare build $(shell pkg-config --libs-only-l gtk+-3.0) -o demo-gtk3 cmd/demo-gtk3
 
 demo-gtk4: .gen
-	hare build $(LIBS_4) -o demo-gtk4 cmd/demo-gtk4
+	hare build $(shell pkg-config --libs-only-l gtk4) -o demo-gtk4 cmd/demo-gtk4
 
 clean:
 	rm -f hare-gi xmltree demo-gtk3 demo-gtk4 gi/*/_generate.ha