fix build for --disable-clients --enable-simple-clients
authorPekka Paalanen <ppaalanen@gmail.com>
Tue, 17 Apr 2012 13:49:12 +0000 (16:49 +0300)
committerPekka Paalanen <ppaalanen@gmail.com>
Thu, 26 Apr 2012 12:50:12 +0000 (15:50 +0300)
Simple clients were relying on AM_CFLAGS and AM_CPPFLAGS set for
toytoolkit clients. With toytoolkit clients disabled, the build fails
with missing wayland-client.h.

Move AM_CFLAGS and AM_CPPFLAGS outside of conditional sections, since
they are meant to be global settings.

Let simple clients override AM_CPPFLAGS with their own
SIMPLE_CLIENT_CFLAGS, which the configure script already sets up for us,
but was unused until now.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
clients/Makefile.am

index dd11382..2377189 100644 (file)
@@ -11,6 +11,12 @@ libexec_PROGRAMS =                           \
        $(tablet_shell)                         \
        $(screenshooter)
 
+AM_CFLAGS = $(GCC_CFLAGS)
+AM_CPPFLAGS =                                  \
+       -DDATADIR='"$(datadir)"'                \
+       -DBINDIR='"$(bindir)"'                  \
+       $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
+
 if BUILD_SIMPLE_CLIENTS
 simple_clients_programs =                      \
        simple-egl                              \
@@ -18,12 +24,15 @@ simple_clients_programs =                   \
        simple-touch
 
 simple_egl_SOURCES = simple-egl.c
+simple_egl_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
 simple_egl_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
 
 simple_shm_SOURCES = simple-shm.c
+simple_shm_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
 simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
 
 simple_touch_SOURCES = simple-touch.c
+simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
 simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
 endif
 
@@ -46,12 +55,6 @@ screenshooter = weston-screenshooter
 
 noinst_LIBRARIES = libtoytoolkit.a
 
-AM_CFLAGS = $(GCC_CFLAGS)
-AM_CPPFLAGS =                                  \
-       -DDATADIR='"$(datadir)"'                \
-       -DBINDIR='"$(bindir)"'                  \
-       $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
-
 libtoytoolkit_a_SOURCES =                      \
        window.c                                \
        window.h                                \