32 lines
755 B
Makefile
32 lines
755 B
Makefile
PROJECT_NAME = dorood
|
|
BUILD_DIR = build
|
|
PREFIX = /usr
|
|
BINDIR = $(PREFIX)/bin
|
|
|
|
.PHONY: all clean install uninstall
|
|
|
|
all: $(BUILD_DIR)
|
|
ninja -C $(BUILD_DIR)
|
|
|
|
$(BUILD_DIR):
|
|
meson setup $(BUILD_DIR) --prefix=$(PREFIX) --libexecdir=lib --sbindir=$(BINDIR) --buildtype=release
|
|
|
|
clean:
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
install: all
|
|
meson install -C $(BUILD_DIR)
|
|
chmod +x $(BINDIR)/$(PROJECT_NAME)
|
|
@if [ -d "/usr/share/glib-2.0/schemas" ]; then \
|
|
glib-compile-schemas /usr/share/glib-2.0/schemas; \
|
|
fi
|
|
@if [ -d "/usr/share/icons/hicolor" ]; then \
|
|
gtk4-update-icon-cache -q -t -f /usr/share/icons/hicolor; \
|
|
fi
|
|
@if [ -d "/usr/share/applications" ]; then \
|
|
update-desktop-database -q /usr/share/applications; \
|
|
fi
|
|
|
|
uninstall:
|
|
ninja -C $(BUILD_DIR) uninstall
|