diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/Makefile b/Makefile index 1456f25..9338dff 100644 --- a/Makefile +++ b/Makefile @@ -24,10 +24,10 @@ MODULES_GTK_SHARED = \ gi/cairo \ gi/pango \ gi/xlib -MODULES_GTK3 = $(MODULES_CORE) $(MODULES_GTK_SHARED) \ +MODULES_GTK3 = \ gi/gdk \ gi/gtk -MODULES_GTK4 = $(MODULES_CORE) $(MODULES_GTK_SHARED) \ +MODULES_GTK4 = \ gi/gdk4 \ gi/gtk4 \ gi/pangocairo \ @@ -49,36 +49,34 @@ hare-gi: $(HARE_GI_SRC) $(GIR_SRC) $(FORMAT_FASTXML_SRC) ./scripts/generate4 touch .gen -install: hare-gi install-gtk3 install-gtk4 +install: hare-gi install-core install-gtk-shared install-gtk3 install-gtk4 install -Dm755 hare-gi "$(DESTDIR)$(BINDIR)"/hare-gi +install-core: .gen + @./scripts/install-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_CORE) + +install-gtk-shared: .gen + @./scripts/install-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_GTK_SHARED) + install-gtk3: .gen - @for mod in $(MODULES_GTK3); do \ - printf "installing %s\n" "$$mod"; \ - mkdir -p "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \ - install -m644 "$$mod"/* "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \ - done + @./scripts/install-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_GTK3) install-gtk4: .gen - @for mod in $(MODULES_GTK4); do \ - printf "installing %s\n" "$$mod"; \ - mkdir -p "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \ - install -m644 "$$mod"/* "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \ - done - -uninstall: uninstall3 uninstall4 - -uninstall3: - @for mod in $(MODULES_GTK3); do \ - printf "uninstalling %s\n" "$$mod"; \ - rm -r "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \ - done - -uninstall4: - @for mod in $(MODULES_GTK4); do \ - printf "uninstalling %s\n" "$$mod"; \ - rm -r "$(DESTDIR)$(THIRDPARTYDIR)/$$mod"; \ - done + @./scripts/install-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_GTK4) + +uninstall: uninstall-core uninstall-gtk-shared uninstall-gtk3 uninstall-gtk4 + +uninstall-core: + @./scripts/uninstall-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_CORE) + +uninstall-gtk-shared: + @./scripts/uninstall-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_GTK_SHARED) + +uninstall-gtk3: + @./scripts/uninstall-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_GTK3) + +uninstall-gtk4: + @./scripts/uninstall-modules "$(DESTDIR)$(THIRDPARTYDIR)" $(MODULES_GTK4) demo3: .gen hare build $(LIBS_3) -o demo3 cmd/demo3 @@ -90,6 +88,6 @@ clean: rm -f hare-gi xmltree demo3 demo4 gi/*/_generate.ha .PHONY: all clean -.PHONY: install install-gtk3 install-gtk4 -.PHONY: uninstall uninstall3 uninstall4 +.PHONY: install install-core install-gtk-shared install-gtk3 install-gtk4 +.PHONY: uninstall uninstall-core uninstall-gtk-shared uninstall-gtk3 uninstall-gtk4 .PHONY: demo3 demo4 |