mirror of
https://git.sr.ht/~leon_plickat/wlopm
synced 2025-07-15 21:39:46 +02:00
Implement everything
This commit is contained in:
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
SCANNER := wayland-scanner
|
||||
|
||||
PREFIX=/usr/local
|
||||
BINDIR=$(PREFIX)/bin
|
||||
MANDIR=$(PREFIX)/share/man
|
||||
|
||||
CFLAGS=-Wall -Werror -Wextra -Wpedantic -Wno-unused-parameter -Wconversion
|
||||
LIBS=-lwayland-client
|
||||
OBJ=wlopm.o wlr-output-power-management-unstable-v1.o xdg-output-unstable-v1.o
|
||||
GEN=wlr-output-power-management-unstable-v1.c wlr-output-power-management-unstable-v1.h xdg-output-unstable-v1.c xdg-output-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 wlopm $(DESTDIR)$(BINDIR)/wlopm
|
||||
install -D wlopm.1 $(DESTDIR)$(MANDIR)/man1/wlopm.1
|
||||
|
||||
uninstall:
|
||||
$(RM) $(DESTDIR)$(BINDIR)/wlopm
|
||||
$(RM) $(DESTDIR)$(MANDIR)/man1/wlopm.1
|
||||
|
||||
clean:
|
||||
$(RM) wlopm $(GEN) $(OBJ)
|
||||
|
||||
.PHONY: clean install
|
||||
|
Reference in New Issue
Block a user