You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
694 B
33 lines
694 B
.PHONY: all clean
|
|
|
|
CC = gcc
|
|
CLIBS = -lwayland-client
|
|
CFLAGS = $(CLIBS)
|
|
|
|
DESTDIR ?= /usr/bin
|
|
|
|
WLR_PROTOCOL_IMPL = wlr-screencopy-protocol.c
|
|
WLR_PROTOCOL_HEADER = wlr-screencopy-client-protocol.h
|
|
|
|
SRC = main.c
|
|
OUT = screencopy
|
|
|
|
all: $(OUT)
|
|
|
|
clean:
|
|
rm -f $(OUT)
|
|
rm -f $(WLR_PROTOCOL_IMPL)
|
|
rm -f $(WLR_PROTOCOL_HEADER)
|
|
|
|
install: all
|
|
cp $(OUT) $(DESTDIR)/
|
|
|
|
$(OUT): $(WLR_PROTOCOL_IMPL) $(WLR_PROTOCOL_HEADER) $(SRC)
|
|
$(CC) $(WLR_PROTOCOL_IMPL) $(SRC) $(CFLAGS) -o $(OUT)
|
|
|
|
$(WLR_PROTOCOL_IMPL):
|
|
wayland-scanner private-code ./wlr-screencopy-unstable-v1.xml $(WLR_PROTOCOL_IMPL)
|
|
|
|
$(WLR_PROTOCOL_HEADER):
|
|
wayland-scanner client-header ./wlr-screencopy-unstable-v1.xml $(WLR_PROTOCOL_HEADER)
|