-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (47 loc) · 1.89 KB
/
Makefile
File metadata and controls
62 lines (47 loc) · 1.89 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.POSIX:
VERSION = 0
PREFIX = /usr/local
PKG_CONFIG = pkg-config
PKGS = wayland-client fcft pixman-1
INCS != $(PKG_CONFIG) --cflags $(PKGS)
LIBS != $(PKG_CONFIG) --libs $(PKGS)
CPPFLAGS += -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE
CFLAGS += -pedantic -Wall -Wno-unused-function -Wno-strict-prototypes $(INCS)
LDLIBS = $(LIBS)
PROTO = xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h \
river-control-unstable-v1-protocol.h river-status-unstable-v1-protocol.h
SRC = dam.c $(PROTO:.h=.c)
OBJ = $(SRC:.c=.o)
all: dam
config.h:
cp config.def.h $@
dam: $(OBJ)
$(OBJ): config.h $(PROTO)
WAYLAND_SCANNER != $(PKG_CONFIG) --variable=wayland_scanner wayland-scanner
WAYLAND_PROTOCOLS != $(PKG_CONFIG) --variable=pkgdatadir wayland-protocols
xdg-shell-protocol.c:
$(WAYLAND_SCANNER) private-code $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.h:
$(WAYLAND_SCANNER) client-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
wlr-layer-shell-unstable-v1-protocol.c:
$(WAYLAND_SCANNER) private-code wlr-layer-shell-unstable-v1.xml $@
wlr-layer-shell-unstable-v1-protocol.h:
$(WAYLAND_SCANNER) client-header wlr-layer-shell-unstable-v1.xml $@
wlr-layer-shell-unstable-v1-protocol.o: xdg-shell-protocol.o
river-control-unstable-v1-protocol.c:
$(WAYLAND_SCANNER) private-code river-control-unstable-v1.xml $@
river-control-unstable-v1-protocol.h:
$(WAYLAND_SCANNER) client-header river-control-unstable-v1.xml $@
river-status-unstable-v1-protocol.c:
$(WAYLAND_SCANNER) private-code river-status-unstable-v1.xml $@
river-status-unstable-v1-protocol.h:
$(WAYLAND_SCANNER) client-header river-status-unstable-v1.xml $@
clean:
rm -f dam $(OBJ) $(PROTO:.h=.c) $(PROTO)
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f dam $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/dam
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/dam
.PHONY: all clean install uninstall