From e846d66706f807b465121a7a70f668a985a5d39d Mon Sep 17 00:00:00 2001 From: anastasisg Date: Tue, 11 Feb 2025 16:07:33 +0200 Subject: initial --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..82daebc --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +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 + -- cgit v1.2.3