PKG_CONFIG ?= pkg-config SCANNER := wayland-scanner PREFIX=/usr/local BINDIR=$(PREFIX)/bin MANDIR=$(PREFIX)/share/man # original #CFLAGS=-Wall -Werror -Wextra -Wpedantic -Wno-unused-parameter -Wconversion -Wformat-security -Wformat -Wsign-conversion -Wfloat-conversion -Wunused-result $(shell pkg-config --cflags pixman-1) CFLAGS=-Wall -Werror $(shell $(PKG_CONFIG) --cflags gtk4) #-Wextra -Wno-unused-parameter LIBS=-lwayland-client $(shell $(PKG_CONFIG) --libs gtk4) -pthread OBJ=rwm-mode-popup.o river-status-unstable-v1.o wlr-layer-shell-unstable-v1.o xdg-shell.o GEN=river-status-unstable-v1.c river-status-unstable-v1.h wlr-layer-shell-unstable-v1.c wlr-layer-shell-unstable-v1.h xdg-shell.c xdg-shell.h rwm-mode-popup: $(OBJ) $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(OBJ): $(GEN) %.c: %.xml $(SCANNER) private-code < $< > $@ %.h: %.xml $(SCANNER) client-header < $< > $@ install: rwm-mode-popup # install -D rwm-mode-popup $(DESTDIR)$(BINDIR)/rwm-mode-popup # install -m 644 -D rwm-mode-popup.1 $(DESTDIR)$(MANDIR)/man1/rwm-mode-popup.1 uninstall: # $(RM) $(DESTDIR)$(BINDIR)/rwm-mode-popup # $(RM) $(DESTDIR)$(MANDIR)/man1/rwm-mode-popup.1 clean: $(RM) rwm-mode-popup $(GEN) $(OBJ) .PHONY: clean install