diff options
author | Mikhail Burakov <mburakov@mailbox.org> | 2020-06-29 19:02:09 +0200 |
---|---|---|
committer | Mikhail Burakov <mburakov@mailbox.org> | 2020-06-29 19:02:09 +0200 |
commit | 3261aee563ee7bb0cba7edf4e684ae9833fd9a3f (patch) | |
tree | dd354a1b6e65aa230b059dd8c3c093d30632b76a /makefile | |
parent | 3389b2ba80c60009fac91cece3241ec7b2b5b759 (diff) |
Import current pui code to git
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) |