automake: loader: rework the CPPFLAGS
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 19 Nov 2015 15:31:06 +0000 (15:31 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 20 Nov 2015 10:40:11 +0000 (10:40 +0000)
Rather than duplicating things, just use the generic AM_CPPFLAGS. This
has the fortunate side-effect of adding VISIBILITY_CFLAGS for the dri3
helper. The latter of which was erroneously exposing some internal
symbols.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reported-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/loader/Makefile.am

index c0f79475361e9238cf68430c95cb0024de7999cd..67ed776b0c3b7089fa80daf6729df5feec42251a 100644 (file)
@@ -25,18 +25,20 @@ EXTRA_DIST = SConscript
 
 noinst_LTLIBRARIES = libloader.la libloader_dri3_helper.la
 
-libloader_la_CPPFLAGS = \
+AM_CPPFLAGS = \
        $(DEFINES) \
        -I$(top_srcdir)/include \
        -I$(top_srcdir)/src \
        $(VISIBILITY_CFLAGS) \
+       $(LIBDRM_CFLAGS) \
        $(LIBUDEV_CFLAGS)
 
 libloader_la_SOURCES = $(LOADER_C_FILES)
 libloader_la_LIBADD =
 
 if HAVE_DRICOMMON
-libloader_la_CPPFLAGS += \
+libloader_la_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
        -I$(top_srcdir)/src/mesa/drivers/dri/common/ \
        -I$(top_builddir)/src/mesa/drivers/dri/common/ \
        -I$(top_srcdir)/src/mesa/ \
@@ -49,20 +51,11 @@ libloader_la_CPPFLAGS += \
 endif
 
 if HAVE_LIBDRM
-libloader_la_CPPFLAGS += \
-       $(LIBDRM_CFLAGS)
-
 libloader_la_LIBADD += \
        $(LIBDRM_LIBS)
 endif
 
 if HAVE_DRI3
-libloader_dri3_helper_la_CPPFLAGS = \
-       $(DEFINES) \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src \
-       $(LIBDRM_CFLAGS)
-
 libloader_dri3_helper_la_SOURCES = \
        loader_dri3_helper.c \
        loader_dri3_helper.h