about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile43
1 files changed, 33 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 9b658bb..84d83cc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,7 @@
 .POSIX:
 .SUFFIXES:
 
-BINDINGS_DIR = bindings
-CORE_MODULES = glib gobject gio gmodule atk gdkpixbuf freetype harfbuzz cairo pango xlib types/libc
-MODULES3 = $(CORE_MODULES) gdk gtk
-MODULES4 = $(CORE_MODULES) gdk4 gtk4 pangocairo graphene gsk
+all: hare-gi
 
 DESTDIR =
 PREFIX = /usr/local
@@ -12,31 +9,57 @@ SRCDIR = $(PREFIX)/src
 HARESRCDIR = $(SRCDIR)/hare
 THIRDPARTYDIR = $(HARESRCDIR)/third-party
 
-all:
-	@true
+BINDINGS_DIR = bindings
+MODULES_CORE = \
+	types/libc \
+	gi/glib \
+	gi/gobject \
+	gi/gio \
+	gi/gmodule
+MODULES_GTK_SHARED = \
+	gi/atk \
+	gi/gdkpixbuf \
+	gi/freetype \
+	gi/harfbuzz \
+	gi/cairo \
+	gi/pango \
+	gi/xlib
+MODULES_GTK3 = $(MODULES_CORE) $(MODULES_GTK_SHARED) \
+	gi/gdk \
+	gi/gtk
+MODULES_GTK4 = $(MODULES_CORE) $(MODULES_GTK_SHARED) \
+	gi/gdk4 \
+	gi/gtk4 \
+	gi/pangocairo \
+	gi/graphene \
+	gi/gsk
+
+hare-gi:
+	hare build -o $@ cmd/hare-gi/
+.PHONY: hare-gi
 
 install:
-	@for mod in $(MODULES3); do \
+	@for mod in $(MODULES_GTK3); do \
 		printf "installing %s\n" "$$mod"; \
 		mkdir -p "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \
 		install -m644 "$(BINDINGS_DIR)/$$mod"/* "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \
 	done
 
 install4:
-	@for mod in $(MODULES4); do \
+	@for mod in $(MODULES_GTK4); do \
 		printf "installing %s\n" "$$mod"; \
 		mkdir -p "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \
 		install -m644 "$(BINDINGS_DIR)/$$mod"/* "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \
 	done
 
 uninstall:
-	@for mod in $(MODULES3); do \
+	@for mod in $(MODULES_GTK3); do \
 		printf "uninstalling %s\n" "$$mod"; \
 		rm -r "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \
 	done
 
 uninstall4:
-	@for mod in $(MODULES4); do \
+	@for mod in $(MODULES_GTK4); do \
 		printf "uninstalling %s\n" "$$mod"; \
 		rm -r "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \
 	done