2021-06-14 23:35:52 +02:00
|
|
|
SCANNER := wayland-scanner
|
|
|
|
|
|
|
|
PREFIX=/usr/local
|
|
|
|
BINDIR=$(PREFIX)/bin
|
|
|
|
MANDIR=$(PREFIX)/share/man
|
2024-03-28 19:11:46 +01:00
|
|
|
BASHCOMPDIR=$(PREFIX)/share/bash-completion/completions
|
2021-06-14 23:35:52 +02:00
|
|
|
|
2023-11-17 07:05:36 +01:00
|
|
|
CFLAGS+=-Wall -Werror -Wextra -Wpedantic -Wno-unused-parameter -Wconversion -Wformat-security -Wformat -Wsign-conversion -Wfloat-conversion -Wunused-result -Wno-strict-prototypes
|
2021-06-14 23:35:52 +02:00
|
|
|
LIBS=-lwayland-client
|
2022-01-30 01:45:25 +01:00
|
|
|
OBJ=wlopm.o wlr-output-power-management-unstable-v1.o
|
|
|
|
GEN=wlr-output-power-management-unstable-v1.c wlr-output-power-management-unstable-v1.h
|
2021-06-14 23:35:52 +02:00
|
|
|
|
|
|
|
wlopm: $(OBJ)
|
2021-06-15 16:59:46 +02:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
|
2021-06-14 23:35:52 +02:00
|
|
|
|
|
|
|
$(OBJ): $(GEN)
|
|
|
|
|
|
|
|
%.c: %.xml
|
|
|
|
$(SCANNER) private-code < $< > $@
|
|
|
|
|
|
|
|
%.h: %.xml
|
|
|
|
$(SCANNER) client-header < $< > $@
|
|
|
|
|
|
|
|
install: wlopm
|
2024-02-11 22:40:04 +01:00
|
|
|
install -d $(DESTDIR)$(BINDIR)
|
|
|
|
install wlopm $(DESTDIR)$(BINDIR)
|
|
|
|
install -d $(DESTDIR)$(MANDIR)/man1
|
|
|
|
install -m 644 wlopm.1 $(DESTDIR)$(MANDIR)/man1
|
2024-03-28 19:11:46 +01:00
|
|
|
install bash-completion $(DESTDIR)$(BASHCOMPDIR)/wlopm
|
2021-06-14 23:35:52 +02:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
$(RM) $(DESTDIR)$(BINDIR)/wlopm
|
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/man1/wlopm.1
|
2024-03-28 19:11:46 +01:00
|
|
|
$(RM) $(DESTDIR)$(BASHCOMPDIR)/wlopm
|
2021-06-14 23:35:52 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) wlopm $(GEN) $(OBJ)
|
|
|
|
|
|
|
|
.PHONY: clean install
|