From: Kristian Høgsberg Date: Sun, 2 Nov 2008 15:55:25 +0000 (-0500) Subject: Rename client, prepare Makefile for more clients. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e120a4b1ee1ea7e153280340f4f68ce61fcedd5c;p=profile%2Fivi%2Fweston.git Rename client, prepare Makefile for more clients. --- diff --git a/Makefile b/Makefile index 72e3f4d..42d6765 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ CFLAGS += -Wall -g $(shell pkg-config --cflags libffi libdrm) LDLIBS += $(shell pkg-config --libs libffi libdrm) -all : wayland client +clients = flower + +all : wayland $(clients) wayland_objs = wayland.o event-loop.o connection.o hash.o input.o egl-compositor.o wayland : CFLAGS += -I../eagle @@ -15,12 +17,19 @@ libwayland_objs = wayland-client.o connection.o libwayland.so : $(libwayland_objs) gcc -o $@ $(libwayland_objs) -shared -client_objs = client.o -client : CFLAGS += $(shell pkg-config --cflags cairo) -client : LDLIBS += $(shell pkg-config --libs cairo) +flower_objs = flower.o + +$(clients) : CFLAGS += $(shell pkg-config --cflags cairo) +$(clients) : LDLIBS += $(shell pkg-config --libs cairo) + +define client_template +$(1): $$($(1)_objs) libwayland.so +endef + +$(foreach c,$(clients),$(eval $(call client_template,$(c)))) -client : $(client_objs) libwayland.so - gcc -o $@ -L. -lwayland $(LDLIBS) $(client_objs) +$(clients) : + gcc -o $@ -L. -lwayland $(LDLIBS) $^ clean : - rm -f client wayland *.o libwayland.so \ No newline at end of file + rm -f $(clients) wayland *.o libwayland.so \ No newline at end of file diff --git a/client.c b/flower.c similarity index 100% rename from client.c rename to flower.c