3 subdirs = compositor clients spec data
4 libs = libwayland-server.so libwayland-client.so
6 all : $(libs) subdirs-all scanner
10 wayland-server-protocol.h \
12 wayland-client-protocol.h \
15 libwayland-server.so : \
23 libwayland-client.so : \
30 wayland-server.o : wayland-server-protocol.h
31 wayland-client.o : wayland-client-protocol.h
33 wayland-protocol.c : protocol.xml scanner
34 ./scanner code < $< > $@
36 wayland-server-protocol.h : protocol.xml scanner
37 ./scanner server-header < $< > $@
39 wayland-client-protocol.h : protocol.xml scanner
40 ./scanner client-header < $< > $@
42 $(libs) : CFLAGS += -fPIC $(FFI_CFLAGS)
43 $(libs) : LDLIBS += $(FFI_LIBS)
45 gcc -shared $^ $(LDLIBS) -o $@
51 scanner : LDLIBS += $(EXPAT_LIBS)
53 subdirs-all subdirs-clean subdirs-install:
54 for f in $(subdirs); do $(MAKE) -C $$f $(@:subdirs-%=%); done
56 install : $(libs) compositor subdirs-install
57 install -d $(libdir) $(libdir)/pkgconfig ${udev_rules_dir}
58 install $(libs) $(libdir)
59 install wayland-server.pc wayland-client.pc $(libdir)/pkgconfig
60 install $(headers) $(includedir)
61 install 70-wayland.rules ${udev_rules_dir}
64 rm -f scanner *.o *.so .*.deps
65 rm -f wayland-protocol.c \
66 wayland-server-protocol.h wayland-client-protocol.h
68 config.mk : config.mk.in