weston/Makefile

80 lines
1.9 KiB
Makefile
Raw Normal View History

2010-06-05 05:46:50 +04:00
include config.mk
subdirs = clients spec data
libs = libwayland-server.so libwayland-client.so
2010-06-05 05:46:50 +04:00
all : $(libs) compositor subdirs-all scanner
2010-06-05 05:46:50 +04:00
headers = \
wayland-util.h \
wayland-server-protocol.h \
wayland-server.h \
wayland-client-protocol.h \
wayland-client.h \
2010-06-05 05:46:50 +04:00
libwayland-server.so : \
wayland-protocol.o \
wayland-server.o \
2010-06-05 05:46:50 +04:00
event-loop.o \
connection.o \
wayland-util.o \
wayland-hash.o
2010-06-05 05:46:50 +04:00
libwayland-client.so : \
wayland-protocol.o \
2010-06-05 05:46:50 +04:00
wayland-client.o \
connection.o \
wayland-util.o \
wayland-hash.o
wayland-server.o : wayland-server-protocol.h
wayland-client.o : wayland-client-protocol.h
wayland-protocol.c : protocol.xml scanner
./scanner code < $< > $@
wayland-server-protocol.h : protocol.xml scanner
./scanner server-header < $< > $@
wayland-client-protocol.h : protocol.xml scanner
./scanner client-header < $< > $@
2010-06-05 05:46:50 +04:00
$(libs) : CFLAGS += -fPIC $(FFI_CFLAGS)
$(libs) : LDLIBS += $(FFI_LIBS)
$(libs) :
gcc -shared $^ $(LDLIBS) -o $@
compositor : \
compositor.o \
compositor-drm.o \
compositor-x11.o \
screenshooter.o \
drm.o
2010-06-05 05:46:50 +04:00
compositor : CFLAGS += $(COMPOSITOR_CFLAGS)
compositor : LDLIBS += ./libwayland-server.so $(COMPOSITOR_LIBS) -rdynamic -lrt -lEGL -lm
2010-06-05 05:46:50 +04:00
scanner : \
scanner.o \
wayland-util.o
scanner : LDLIBS += $(EXPAT_LIBS)
subdirs-all subdirs-clean subdirs-install:
2010-06-05 05:46:50 +04:00
for f in $(subdirs); do $(MAKE) -C $$f $(@:subdirs-%=%); done
install : $(libs) compositor subdirs-install
2010-06-05 05:46:50 +04:00
install -d $(libdir) $(libdir)/pkgconfig ${udev_rules_dir}
install $(libs) $(libdir)
install wayland-server.pc wayland-client.pc $(libdir)/pkgconfig
install $(headers) $(includedir)
2010-06-05 05:46:50 +04:00
install 70-wayland.rules ${udev_rules_dir}
clean : subdirs-clean
rm -f compositor scanner *.o *.so
rm -f wayland-protocol.c \
wayland-server-protocol.h wayland-client-protocol.h
2010-06-05 05:46:50 +04:00
config.mk : config.mk.in
./config.status