-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile
47 lines (32 loc) · 1.17 KB
/
Makefile
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
36
37
38
39
40
41
42
43
44
45
46
47
WAYLAND_PROTOCOLS_DIR != pkg-config --variable=pkgdatadir wayland-protocols
WAYLAND_SCANNER := wayland-scanner
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
VERSION="0.6.0"
CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-format-overflow
override CFLAGS += -DVERSION=\"$(VERSION)\"
VPATH = $(WAYLAND_PROTOCOLS_DIR)/stable/xdg-shell \
$(WAYLAND_PROTOCOLS_DIR)/unstable/xdg-decoration \
$(WAYLAND_PROTOCOLS_DIR)/unstable/primary-selection
GEN = xdg-shell.h xdg-shell.c \
xdg-decoration-unstable-v1.h xdg-decoration-unstable-v1.c \
primary-selection-unstable-v1.h primary-selection-unstable-v1.c
LIBS=-lrt -lm -lutil -lwayland-client -lwayland-cursor -lxkbcommon -Ltsm -lhtsm
OBJ=xdg-shell.o xdg-decoration-unstable-v1.o primary-selection-unstable-v1.o glyph.o main.o
havoc: tsm $(OBJ)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
install: havoc
install -D -t $(DESTDIR)$(BINDIR) havoc
uninstall:
rm -f $(DESTDIR)$(BINDIR)/havoc
clean:
$(MAKE) -C tsm clean
rm -f havoc $(GEN) $(OBJ)
$(OBJ): $(GEN)
%.c: %.xml
$(WAYLAND_SCANNER) private-code < $< > $@
%.h: %.xml
$(WAYLAND_SCANNER) client-header < $< > $@
tsm:
$(MAKE) -C $@
.PHONY: install uninstall clean tsm