wlopm/Makefile
Isaac Freund dffcf3d8fc Fix compatibility with FreeBSD coreutils
I needed to patch this to package wlopm for chimera linux, which uses
FreeBSD's coreutils. Apparently -D is not portable, it means something
different for FreeBSD install.
2024-02-12 05:24:11 +01:00

38 lines
916 B
Makefile

SCANNER := wayland-scanner
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
CFLAGS+=-Wall -Werror -Wextra -Wpedantic -Wno-unused-parameter -Wconversion -Wformat-security -Wformat -Wsign-conversion -Wfloat-conversion -Wunused-result -Wno-strict-prototypes
LIBS=-lwayland-client
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
wlopm: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
$(OBJ): $(GEN)
%.c: %.xml
$(SCANNER) private-code < $< > $@
%.h: %.xml
$(SCANNER) client-header < $< > $@
install: wlopm
install -d $(DESTDIR)$(BINDIR)
install wlopm $(DESTDIR)$(BINDIR)
install -d $(DESTDIR)$(MANDIR)/man1
install -m 644 wlopm.1 $(DESTDIR)$(MANDIR)/man1
uninstall:
$(RM) $(DESTDIR)$(BINDIR)/wlopm
$(RM) $(DESTDIR)$(MANDIR)/man1/wlopm.1
clean:
$(RM) wlopm $(GEN) $(OBJ)
.PHONY: clean install