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.
QuickScreencopy/Makefile

31 lines
678 B

.PHONY: all clean
CC = gcc
CLIBS = -lwayland-client
CFLAGS = $(CLIBS)
SRC = main.c
OUT = screencap
PROTOCOL_NAMES = $(foreach proto, $(wildcard protocols/*), $(notdir $(basename $(proto))))
PROTOCOL_IMPLS = $(foreach proto, $(PROTOCOL_NAMES), $(addsuffix .prot.c,$(proto)))
PROTOCOL_HEADERS = $(foreach proto, $(PROTOCOL_NAMES), $(addsuffix .prot.h,$(proto)))
PROTOCOLS = $(PROTOCOL_IMPLS) $(PROTOCOL_HEADERS)
%.prot.c: protocols/%.xml
wayland-scanner private-code $< $@
%.prot.h: protocols/%.xml
wayland-scanner client-header $< $@
all: $(OUT)
clean:
rm -f $(OUT)
rm -f $(PROTOCOLS)
$(OUT): $(PROTOCOLS) $(SRC)
$(CC) $(PROTOCOL_IMPLS) $(SRC) $(CFLAGS) -o $(OUT)