blob: 6fd608ab164b21f38435288a6a6a77c7a2566e46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
target:=pui
objects:=\
font.o \
font_cp00.o \
font_cp04.o \
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)
|