From 3261aee563ee7bb0cba7edf4e684ae9833fd9a3f Mon Sep 17 00:00:00 2001 From: Mikhail Burakov Date: Mon, 29 Jun 2020 19:02:09 +0200 Subject: Import current pui code to git --- makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..b954d99 --- /dev/null +++ b/makefile @@ -0,0 +1,32 @@ +target:=pui +objects:=main.o pui.o xdg-shell.o +protocols:=/usr/share/wayland-protocols +wl_headers:=xdg-shell.h + +CFLAGS:=-O3 -Wall -Wextra -Werror -pedantic +LDFLAGS:=-O3 -s -lwayland-client -lrt + +all: $(target) sample.pui + +sample.pui: convert sample.bmp sample.ini + $^ > $@ + +convert: convert.c + $(CC) $(CFLAGS) -s $< -o $@ + +$(target): $(objects) + $(CC) $(LDFLAGS) $^ -o $@ + +%.o: %.c *.h $(wl_headers) + $(CC) $(CFLAGS) -c $< -o $@ + +%.c: $(protocols)/*/*/%.xml + wayland-scanner private-code $< $@ + +%.h: $(protocols)/*/*/%.xml + wayland-scanner client-header $< $@ + +clean: + rm $(target) $(objects) $(wl_headers) convert sample.pui + +.PRECIOUS: $(wl_headers) -- cgit v1.2.3