diff options
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 32 |
1 files changed, 32 insertions, 0 deletions
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) |