2008-11-08 23:39:41 +03:00
|
|
|
CFLAGS = -Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden
|
2008-09-30 17:46:10 +04:00
|
|
|
|
2008-11-08 23:30:41 +03:00
|
|
|
PKG_CONFIG_PATH ?= $(HOME)/install/lib/pkgconfig
|
|
|
|
|
|
|
|
EAGLE_CFLAGS = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags eagle)
|
|
|
|
EAGLE_LDLIBS = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs eagle)
|
2008-11-03 23:31:30 +03:00
|
|
|
|
2008-11-03 02:51:48 +03:00
|
|
|
clients = flower pointer background window
|
2008-11-06 18:38:17 +03:00
|
|
|
compositors = egl-compositor.so glx-compositor.so
|
2008-11-02 18:55:25 +03:00
|
|
|
|
2008-11-06 18:38:17 +03:00
|
|
|
all : wayland libwayland.so $(compositors) $(clients)
|
2008-09-30 17:46:10 +04:00
|
|
|
|
2008-11-06 18:38:17 +03:00
|
|
|
wayland_objs = \
|
|
|
|
wayland.o \
|
|
|
|
event-loop.o \
|
|
|
|
connection.o \
|
|
|
|
hash.o \
|
|
|
|
input.o
|
|
|
|
|
|
|
|
wayland : CFLAGS += $(shell pkg-config --cflags libffi)
|
|
|
|
wayland : LDLIBS += $(shell pkg-config --libs libffi) -ldl -rdynamic
|
2008-09-30 17:46:10 +04:00
|
|
|
|
|
|
|
wayland : $(wayland_objs)
|
2008-10-09 06:51:32 +04:00
|
|
|
gcc -o $@ $(LDLIBS) $(wayland_objs)
|
2008-09-30 17:46:10 +04:00
|
|
|
|
2008-10-08 21:32:07 +04:00
|
|
|
libwayland_objs = wayland-client.o connection.o
|
2008-10-07 18:10:36 +04:00
|
|
|
|
|
|
|
libwayland.so : $(libwayland_objs)
|
2008-11-06 18:38:17 +03:00
|
|
|
|
|
|
|
$(compositors) $(clients) : CFLAGS += $(shell pkg-config --cflags libdrm)
|
|
|
|
|
2008-11-22 03:25:44 +03:00
|
|
|
egl_compositor_objs = egl-compositor.o cairo-util.o
|
|
|
|
egl-compositor.so : CFLAGS += $(EAGLE_CFLAGS) $(shell pkg-config --cflags libpng cairo)
|
|
|
|
egl-compositor.so : LDLIBS += $(EAGLE_LDLIBS) $(shell pkg-config --libs libpng cairo) -rdynamic
|
2008-11-06 18:38:17 +03:00
|
|
|
|
|
|
|
egl-compositor.so : $(egl_compositor_objs)
|
|
|
|
|
|
|
|
glx_compositor_objs = glx-compositor.o
|
|
|
|
glx-compositor.so : LDLIBS += -lGL
|
|
|
|
|
|
|
|
glx-compositor.so : $(glx_compositor_objs)
|
|
|
|
|
|
|
|
|
|
|
|
libwayland.so $(compositors) :
|
|
|
|
gcc -o $@ $^ $(LDLIBS) -shared
|
2008-10-07 18:10:36 +04:00
|
|
|
|
2008-11-07 22:27:23 +03:00
|
|
|
flower_objs = flower.o wayland-glib.o
|
2008-11-09 06:46:30 +03:00
|
|
|
pointer_objs = pointer.o wayland-glib.o cairo-util.o
|
2008-11-07 23:54:48 +03:00
|
|
|
background_objs = background.o wayland-glib.o
|
2008-11-09 06:46:30 +03:00
|
|
|
window_objs = window.o gears.o wayland-glib.o cairo-util.o
|
2008-11-02 18:55:25 +03:00
|
|
|
|
2008-11-07 23:54:48 +03:00
|
|
|
$(clients) : CFLAGS += $(shell pkg-config --cflags cairo glib-2.0)
|
|
|
|
$(clients) : LDLIBS += $(shell pkg-config --libs cairo glib-2.0) -lrt
|
2008-11-03 01:11:51 +03:00
|
|
|
|
|
|
|
background : CFLAGS += $(shell pkg-config --cflags gdk-pixbuf-2.0)
|
|
|
|
background : LDLIBS += $(shell pkg-config --libs gdk-pixbuf-2.0)
|
2008-11-02 18:55:25 +03:00
|
|
|
|
2008-11-03 23:31:30 +03:00
|
|
|
window : CFLAGS += $(EAGLE_CFLAGS)
|
|
|
|
window : LDLIBS += $(EAGLE_LDLIBS)
|
|
|
|
|
2008-11-02 18:55:25 +03:00
|
|
|
define client_template
|
|
|
|
$(1): $$($(1)_objs) libwayland.so
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach c,$(clients),$(eval $(call client_template,$(c))))
|
2008-09-30 17:46:10 +04:00
|
|
|
|
2008-11-02 18:55:25 +03:00
|
|
|
$(clients) :
|
|
|
|
gcc -o $@ -L. -lwayland $(LDLIBS) $^
|
2008-09-30 17:46:10 +04:00
|
|
|
|
|
|
|
clean :
|
2008-11-06 18:38:17 +03:00
|
|
|
rm -f $(clients) wayland *.o *.so
|