| 1 |
# List of files to generate |
| 2 |
GEN_XML = protocols/ext-data-control-v1.xml \ |
| 3 |
protocols/wlr-data-control-unstable-v1.xml |
| 4 |
GEN_SRC = ext-data-control-v1.c \ |
| 5 |
wlr-data-control-unstable-v1.c |
| 6 |
GEN_INCLUDE = ext-data-control-v1.h \ |
| 7 |
wlr-data-control-unstable-v1.h |
| 8 |
|
| 9 |
# Default target |
| 10 |
all: $(GEN_SRC) $(GEN_INCLUDE) |
| 11 |
@if ! command -v wayland-scanner 2>&1 > /dev/null ; then \ |
| 12 |
echo "wayland-scanner not available, cannot generate protocol files"; \ |
| 13 |
false; \ |
| 14 |
fi |
| 15 |
|
| 16 |
ext-data-control-v1.c: |
| 17 |
wayland-scanner private-code protocols/ext-data-control-v1.xml $@ |
| 18 |
ext-data-control-v1.h: |
| 19 |
wayland-scanner client-header protocols/ext-data-control-v1.xml $@ |
| 20 |
|
| 21 |
wlr-data-control-unstable-v1.c: |
| 22 |
wayland-scanner private-code protocols/wlr-data-control-unstable-v1.xml $@ |
| 23 |
wlr-data-control-unstable-v1.h: |
| 24 |
wayland-scanner client-header protocols/wlr-data-control-unstable-v1.xml $@ |
| 25 |
|
| 26 |
$(GEN_SRC) $(GEN_INCLUDE): $(GEN_XML) |
| 27 |
|
| 28 |
$(GEN_XML): |
| 29 |
|
| 30 |
# Clean rule |
| 31 |
clean: |
| 32 |
rm -f *.c *.h |
| 33 |
|
| 34 |
.PHONY: all clean |
| 35 |
|
| 36 |
# vim:ts=8:sw=8:tw=78 |