summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authoranastasisg <anastasis@learnworlds.com>2025-02-11 16:07:33 +0200
committeranastasisg <anastasis@learnworlds.com>2025-02-11 16:20:39 +0200
commite846d66706f807b465121a7a70f668a985a5d39d (patch)
tree4813da9ba86f3038cb2d4cae2c6468050e388005 /Makefile
downloadrwm-gtk-goodies-main.tar.gz
rwm-gtk-goodies-main.tar.bz2
rwm-gtk-goodies-main.zip
initialmain
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
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
+