SDOCM00104913: Warnings when DRM_PREFIX not set
authorArnie Reynoso <arnier@ti.com>
Thu, 7 Nov 2013 16:06:32 +0000 (08:06 -0800)
committerChris Ring <cring@ti.com>
Fri, 8 Nov 2013 18:40:01 +0000 (10:40 -0800)
When DRM_PREFIX isn't set, the Linux test examples issue warnings of
unsafe cross-compilation.  This is due to the Makefile setting include
paths based on a non-existent DRM_PREFIX path. The Makefile now
conditionally sets include paths when autotools config variables are
set.

linux/src/tests/Makefile.am
linux/src/tests/Makefile.in

index b064b6b846b3aca203989540f4fab4c792ba994b..28894b99df8d623c23215fd6da8b6926113eead4 100644 (file)
 ##
 
 # additional include paths necessary to compile the program
 ##
 
 # additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
-        -I$(top_srcdir)/packages -I$(CMEM_INSTALL_DIR)/include \
+AM_CFLAGS = -I$(top_srcdir)/linux/include \
+        -I$(top_srcdir)/hlos_common/include \
+        -I$(top_srcdir)/packages \
         -I$(KERNEL_INSTALL_DIR)/include/generated/uapi \
         -I$(KERNEL_INSTALL_DIR)/include/generated/uapi \
+        -D_GNU_SOURCE -Wall @AM_CFLAGS@
+
+if DRM
+AM_CFLAGS += \
         -I$(DRM_PREFIX)/usr/include \
         -I$(DRM_PREFIX)/usr/include/libdrm \
         -I$(DRM_PREFIX)/usr/include \
         -I$(DRM_PREFIX)/usr/include/libdrm \
-        -I$(DRM_PREFIX)/usr/include/omap \
-        -D_GNU_SOURCE -Wall @AM_CFLAGS@
+        -I$(DRM_PREFIX)/usr/include/omap
+endif
+
+if CMEM
+AM_CFLAGS += \
+        -I$(CMEM_INSTALL_DIR)/include
+endif
+
 VPATH = ../../../packages/ti/ipc/tests
 
 ###############################################################################
 VPATH = ../../../packages/ti/ipc/tests
 
 ###############################################################################
index ab106ae019b9724493e4aa97312f4c0a07a8fae1..e707bff0764880e5965656b42afedd3a702ec8aa 100644 (file)
@@ -35,6 +35,14 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
+@DRM_TRUE@am__append_1 = \
+@DRM_TRUE@        -I$(DRM_PREFIX)/usr/include \
+@DRM_TRUE@        -I$(DRM_PREFIX)/usr/include/libdrm \
+@DRM_TRUE@        -I$(DRM_PREFIX)/usr/include/omap
+
+@CMEM_TRUE@am__append_2 = \
+@CMEM_TRUE@        -I$(CMEM_INSTALL_DIR)/include
+
 bin_PROGRAMS = ping_rpmsg$(EXEEXT) MessageQApp$(EXEEXT) \
        MessageQBench$(EXEEXT) MessageQMulti$(EXEEXT) \
        NameServerApp$(EXEEXT) Msgq100$(EXEEXT) $(am__EXEEXT_1) \
 bin_PROGRAMS = ping_rpmsg$(EXEEXT) MessageQApp$(EXEEXT) \
        MessageQBench$(EXEEXT) MessageQMulti$(EXEEXT) \
        NameServerApp$(EXEEXT) Msgq100$(EXEEXT) $(am__EXEEXT_1) \
@@ -44,23 +52,23 @@ bin_PROGRAMS = ping_rpmsg$(EXEEXT) MessageQApp$(EXEEXT) \
        $(am__EXEEXT_6)
 
 # Add platform specific bin application's here
        $(am__EXEEXT_6)
 
 # Add platform specific bin application's here
-@OMAP54XX_SMP_TRUE@am__append_1 = 
-@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_TRUE@am__append_2 = mmrpc_test
+@OMAP54XX_SMP_TRUE@am__append_3 = 
+@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_TRUE@am__append_4 = mmrpc_test
 # Add platform specific bin application's here
 # Add platform specific bin application's here
-@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_3 = 
-@DRA7XX_TRUE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@am__append_4 = mmrpc_test
+@DRA7XX_TRUE@@OMAP54XX_SMP_FALSE@am__append_5 = 
+@DRA7XX_TRUE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@am__append_6 = mmrpc_test
 # Add platform specific bin application's here
 # Add platform specific bin application's here
-@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_5 = 
-@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_6 = nano_test
+@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_7 = 
+@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_TRUE@am__append_8 = nano_test
 # Add platform specific bin application's here
 # Add platform specific bin application's here
-@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_TRUE@am__append_7 = 
+@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_TRUE@am__append_9 = 
 # Add platform specific bin application's here
 # Add platform specific bin application's here
-@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_TRUE@am__append_8 = 
+@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_TRUE@am__append_10 = 
 # Add platform specific bin application's here
 # Add platform specific bin application's here
-@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_FALSE@@TCI6638_TRUE@am__append_9 = 
+@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_FALSE@@TCI6638_TRUE@am__append_11 = 
 # Add platform independent apps here or above in bin_PROGRAMS
 # Add platform independent apps here or above in bin_PROGRAMS
-@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_10 = nano_test
-@DRA7XX_FALSE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_11 = mmrpc_test
+@CMEM_TRUE@@DRA7XX_FALSE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_12 = nano_test
+@DRA7XX_FALSE@@DRM_TRUE@@KDIR_TRUE@@OMAP54XX_SMP_FALSE@@OMAPL138_FALSE@@TCI6614_FALSE@@TCI6636_FALSE@@TCI6638_FALSE@am__append_13 = mmrpc_test
 subdir = linux/src/tests
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 subdir = linux/src/tests
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -145,14 +153,10 @@ AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 
 # additional include paths necessary to compile the program
 AMTAR = @AMTAR@
 
 # additional include paths necessary to compile the program
-AM_CFLAGS = -I$(top_srcdir)/linux/include -I$(top_srcdir)/hlos_common/include \
-        -I$(top_srcdir)/packages -I$(CMEM_INSTALL_DIR)/include \
-        -I$(KERNEL_INSTALL_DIR)/include/generated/uapi \
-        -I$(DRM_PREFIX)/usr/include \
-        -I$(DRM_PREFIX)/usr/include/libdrm \
-        -I$(DRM_PREFIX)/usr/include/omap \
-        -D_GNU_SOURCE -Wall @AM_CFLAGS@
-
+AM_CFLAGS = -I$(top_srcdir)/linux/include \
+       -I$(top_srcdir)/hlos_common/include -I$(top_srcdir)/packages \
+       -I$(KERNEL_INSTALL_DIR)/include/generated/uapi -D_GNU_SOURCE \
+       -Wall @AM_CFLAGS@ $(am__append_1) $(am__append_2)
 AM_LDFLAGS = @AM_LDFLAGS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AM_LDFLAGS = @AM_LDFLAGS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@