summaryrefslogtreecommitdiff
path: root/mnv/src/auto/wayland/Makefile
blob: 77dbbbc96c8569e0cb7b3b0a49f103fcf48097fb (plain)
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
# List of files to generate
GEN_XML = protocols/ext-data-control-v1.xml \
	    protocols/primary-selection-unstable-v1.xml \
	    protocols/wlr-data-control-unstable-v1.xml \
	    protocols/xdg-shell.xml
GEN_SRC = ext-data-control-v1.c \
	    primary-selection-unstable-v1.c \
	    wlr-data-control-unstable-v1.c \
	    xdg-shell.c
GEN_INCLUDE = ext-data-control-v1.h \
	    primary-selection-unstable-v1.h \
	    wlr-data-control-unstable-v1.h \
	    xdg-shell.h

# Default target
all: $(GEN_SRC) $(GEN_INCLUDE)
	@if ! command -v wayland-scanner 2>&1 > /dev/null ; then \
		echo "wayland-scanner not available, cannot generate protocol files"; \
		false; \
	fi

ext-data-control-v1.c:
	wayland-scanner private-code protocols/ext-data-control-v1.xml $@
ext-data-control-v1.h:
	wayland-scanner client-header protocols/ext-data-control-v1.xml $@

wlr-data-control-unstable-v1.c:
	wayland-scanner private-code protocols/wlr-data-control-unstable-v1.xml $@
wlr-data-control-unstable-v1.h:
	wayland-scanner client-header protocols/wlr-data-control-unstable-v1.xml $@

primary-selection-unstable-v1.c:
	wayland-scanner private-code protocols/primary-selection-unstable-v1.xml $@
primary-selection-unstable-v1.h:
	wayland-scanner client-header protocols/primary-selection-unstable-v1.xml $@

xdg-shell.c:
	wayland-scanner private-code protocols/xdg-shell.xml $@
xdg-shell.h:
	wayland-scanner client-header protocols/xdg-shell.xml $@

$(GEN_SRC) $(GEN_INCLUDE): $(GEN_XML)

$(GEN_XML):

# Clean rule
clean:
	rm -f *.c *.h

.PHONY: all clean

# mnv:ts=8:sw=8:tw=78