~leon_plickat/wlopm

wlopm/Makefile -rw-r--r-- 914 bytes
06ae5c5fLeon Henrik Plickat Only include execinfo.h when glibc is used a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
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