[Mesa-dev] [PATCH] automake: add ARCH_FLAGS, OPT_FLAGS, PIC_FLAGS into AM_CFLAGS and AM_CXXFLAGS
Marek Olšák
maraeo at gmail.com
Fri Jul 20 16:37:10 PDT 2012
This fixes a build system regression after Makefile conversions
to automake.
I need only OPT_FLAGS to set -fno-omit-frame-pointer.
ARCH_FLAGS is for --enable-32-bit.
I am not sure what PIC_FLAGS is good for, but r600g uses it.
VISIBILITY_CFLAGS might be missing too.
---
src/egl/drivers/dri2/Makefile.am | 6 +++++-
src/egl/drivers/glx/Makefile.am | 5 ++++-
src/egl/main/Makefile.am | 6 +++++-
src/egl/wayland/wayland-drm/Makefile.am | 6 +++++-
src/egl/wayland/wayland-egl/Makefile.am | 5 ++++-
src/gallium/auxiliary/pipe-loader/Makefile.am | 5 ++++-
src/gallium/drivers/r600/Makefile.am | 5 ++++-
src/gbm/Makefile.am | 5 ++++-
src/glsl/Makefile.am | 5 ++++-
src/glsl/glcpp/Makefile.am | 5 ++++-
src/glx/Makefile.am | 5 ++++-
src/mesa/Makefile.am | 7 +++++--
src/mesa/drivers/dri/common/Makefile.am | 5 ++++-
src/mesa/drivers/dri/i915/Makefile.am | 5 ++++-
src/mesa/drivers/dri/i965/Makefile.am | 5 ++++-
src/mesa/drivers/dri/nouveau/Makefile.am | 5 ++++-
src/mesa/drivers/dri/r200/Makefile.am | 5 ++++-
src/mesa/drivers/dri/radeon/Makefile.am | 5 ++++-
src/mesa/drivers/dri/swrast/Makefile.am | 5 ++++-
src/mesa/drivers/osmesa/Makefile.am | 5 ++++-
src/mesa/libdricore/Makefile.am | 14 ++++++++++++--
21 files changed, 96 insertions(+), 23 deletions(-)
diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am
index 49ec06b..3e50b84 100644
--- a/src/egl/drivers/dri2/Makefile.am
+++ b/src/egl/drivers/dri2/Makefile.am
@@ -30,7 +30,11 @@ AM_CFLAGS = \
$(DEFINES) \
$(LIBDRM_CFLAGS) \
$(LIBUDEV_CFLAGS) \
- -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
+ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
+
noinst_LTLIBRARIES = libegl_dri2.la
diff --git a/src/egl/drivers/glx/Makefile.am b/src/egl/drivers/glx/Makefile.am
index 6bf67ea..fae7f6b 100644
--- a/src/egl/drivers/glx/Makefile.am
+++ b/src/egl/drivers/glx/Makefile.am
@@ -23,7 +23,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/egl/main \
$(X11_CFLAGS) \
- $(DEFINES)
+ $(DEFINES) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
noinst_LTLIBRARIES = libegl_glx.la
diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index ca5257a..83935aa 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -32,7 +32,11 @@ AM_CFLAGS = \
$(EGL_CFLAGS) \
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
- -D_EGL_OS_UNIX=1
+ -D_EGL_OS_UNIX=1 \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
+
lib_LTLIBRARIES = libEGL.la
diff --git a/src/egl/wayland/wayland-drm/Makefile.am b/src/egl/wayland/wayland-drm/Makefile.am
index 4b2aeb3..a675dd8 100644
--- a/src/egl/wayland/wayland-drm/Makefile.am
+++ b/src/egl/wayland/wayland-drm/Makefile.am
@@ -1,7 +1,11 @@
AM_CFLAGS = -I$(top_srcdir)/src/egl/main \
-I$(top_srcdir)/include \
$(DEFINES) \
- $(WAYLAND_CFLAGS)
+ $(WAYLAND_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
+
noinst_LTLIBRARIES = libwayland-drm.la
libwayland_drm_la_SOURCES = wayland-drm.c wayland-drm-protocol.c
diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am
index 7d20a1a..9533086 100644
--- a/src/egl/wayland/wayland-egl/Makefile.am
+++ b/src/egl/wayland/wayland-egl/Makefile.am
@@ -2,7 +2,10 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = wayland-egl.pc
AM_CFLAGS = $(DEFINES) \
- $(WAYLAND_CFLAGS)
+ $(WAYLAND_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
lib_LTLIBRARIES = libwayland-egl.la
noinst_HEADERS = wayland-egl-priv.h
diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am
index c63dce3..5971144 100644
--- a/src/gallium/auxiliary/pipe-loader/Makefile.am
+++ b/src/gallium/auxiliary/pipe-loader/Makefile.am
@@ -7,7 +7,10 @@ AM_CPPFLAGS = $(DEFINES) \
-I$(top_srcdir)/src/gallium/auxiliary \
-I$(top_srcdir)/src/gallium/winsys
-AM_CFLAGS = $(PIC_FLAGS)
+AM_CFLAGS = \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
noinst_LTLIBRARIES =
diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
index ed89d2a..c6ce376 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -36,7 +36,10 @@ AM_CFLAGS += \
-I$(top_srcdir)/src/gallium/drivers/radeon/
AM_CXXFLAGS= \
- $(LLVM_CXXFLAGS)
+ $(LLVM_CXXFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
else
libr600_a_AR = $(AR) $(ARFLAGS)
endif
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index 5ca2839..33d7c26 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -8,7 +8,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/gbm/main \
$(LIBUDEV_CFLAGS) \
$(DLOPEN_CFLAGS) \
- $(DEFINES)
+ $(DEFINES) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
lib_LTLIBRARIES = libgbm.la
include_HEADERS = main/gbm.h
diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
index d86153c..5abe088 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -33,7 +33,10 @@ AM_CFLAGS = \
$(LIBRARY_INCLUDES) \
$(DEFINES) \
$(LIBRARY_DEFINES) \
- $(API_DEFINES)
+ $(API_DEFINES) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
AM_CXXFLAGS = $(AM_CFLAGS)
diff --git a/src/glsl/glcpp/Makefile.am b/src/glsl/glcpp/Makefile.am
index e7d5d2c..ade5e0b 100644
--- a/src/glsl/glcpp/Makefile.am
+++ b/src/glsl/glcpp/Makefile.am
@@ -33,7 +33,10 @@ AM_CFLAGS = \
$(LIBRARY_INCLUDES) \
$(DEFINES) \
$(LIBRARY_DEFINES) \
- $(API_DEFINES)
+ $(API_DEFINES) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
AM_YFLAGS = -v -d
AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index bb23998..2b53bac 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -45,7 +45,10 @@ AM_CFLAGS = \
$(LIBDRM_CFLAGS) \
$(DRI2PROTO_CFLAGS) \
$(GLPROTO_CFLAGS) \
- $(X11_INCLUDES)
+ $(X11_INCLUDES) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
if HAVE_MANGLED_GL
MANGLED_GL_LIB = libMangledGL.la
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 2b023d7..5e546da 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -99,8 +99,11 @@ SRCDIR = $(top_srcdir)/src/mesa
include sources.mak
AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
-AM_CFLAGS = $(LLVM_CFLAGS)
-AM_CXXFLAGS = $(LLVM_CFLAGS)
+AM_CFLAGS = $(LLVM_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
+AM_CXXFLAGS = $(AM_CFLAGS)
# cannot just add $(MESA_ASM_FILES) to libmesa_la_SOURCES as it contains a configure substitution
MESA_ASM_FILES_FOR_ARCH =
diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am
index d81bc0e..541d41d 100644
--- a/src/mesa/drivers/dri/common/Makefile.am
+++ b/src/mesa/drivers/dri/common/Makefile.am
@@ -26,7 +26,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
$(DEFINES) \
$(API_DEFINES) \
- $(LIBDRM_CFLAGS)
+ $(LIBDRM_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
noinst_LTLIBRARIES = libdricommon.la
diff --git a/src/mesa/drivers/dri/i915/Makefile.am b/src/mesa/drivers/dri/i915/Makefile.am
index 7ec4c22..b41b3c1 100644
--- a/src/mesa/drivers/dri/i915/Makefile.am
+++ b/src/mesa/drivers/dri/i915/Makefile.am
@@ -37,7 +37,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/drivers/dri/intel/server \
$(DEFINES) \
$(API_DEFINES) \
- $(INTEL_CFLAGS)
+ $(INTEL_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
dridir = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index c1526ae..c9667be 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -36,7 +36,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/drivers/dri/intel/server \
$(DEFINES) \
$(API_DEFINES) \
- $(INTEL_CFLAGS)
+ $(INTEL_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
AM_CXXFLAGS = $(AM_CFLAGS)
diff --git a/src/mesa/drivers/dri/nouveau/Makefile.am b/src/mesa/drivers/dri/nouveau/Makefile.am
index 82d3804..f0e021d 100644
--- a/src/mesa/drivers/dri/nouveau/Makefile.am
+++ b/src/mesa/drivers/dri/nouveau/Makefile.am
@@ -34,7 +34,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
$(DEFINES) \
$(API_DEFINES) \
- $(NOUVEAU_CFLAGS)
+ $(NOUVEAU_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
dridir = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/src/mesa/drivers/dri/r200/Makefile.am b/src/mesa/drivers/dri/r200/Makefile.am
index 5ec53de..b3cf76f 100644
--- a/src/mesa/drivers/dri/r200/Makefile.am
+++ b/src/mesa/drivers/dri/r200/Makefile.am
@@ -36,7 +36,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/drivers/dri/r200/server \
$(DEFINES) \
$(API_DEFINES) \
- $(RADEON_CFLAGS)
+ $(RADEON_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
dridir = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/src/mesa/drivers/dri/radeon/Makefile.am b/src/mesa/drivers/dri/radeon/Makefile.am
index ec2d42e..7860cf6 100644
--- a/src/mesa/drivers/dri/radeon/Makefile.am
+++ b/src/mesa/drivers/dri/radeon/Makefile.am
@@ -36,7 +36,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/drivers/dri/radeon/server \
$(DEFINES) \
$(API_DEFINES) \
- $(RADEON_CFLAGS)
+ $(RADEON_CFLAGS) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
dridir = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/src/mesa/drivers/dri/swrast/Makefile.am b/src/mesa/drivers/dri/swrast/Makefile.am
index 16a3441..afa4335 100644
--- a/src/mesa/drivers/dri/swrast/Makefile.am
+++ b/src/mesa/drivers/dri/swrast/Makefile.am
@@ -34,7 +34,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
$(DEFINES) \
- $(API_DEFINES)
+ $(API_DEFINES) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
dridir = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am
index 7c151bf..20f0353 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -29,7 +29,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa/ \
$(DEFINES) \
- $(API_DEFINES)
+ $(API_DEFINES) \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
if HAVE_OSMESA_DRIVER
lib_LTLIBRARIES = lib at OSMESA_LIB@.la
diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am
index 26d8a88..afc3eb1 100644
--- a/src/mesa/libdricore/Makefile.am
+++ b/src/mesa/libdricore/Makefile.am
@@ -32,8 +32,18 @@ AM_CPPFLAGS = \
$(API_DEFINES) \
$(DEFINES)
-AM_CFLAGS = $(CFLAGS_NOVISIBILITY) -DUSE_DRICORE
-AM_CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE
+AM_CFLAGS = $(CFLAGS_NOVISIBILITY) \
+ -DUSE_DRICORE \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
+
+AM_CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) \
+ -DUSE_DRICORE \
+ $(ARCH_FLAGS) \
+ $(OPT_FLAGS) \
+ $(PIC_FLAGS)
+
AM_CCASFLAGS = $(CFLAGS_NOVISIBILITY) -DUSE_DRICORE
libdricore at VERSION@_la_SOURCES = \
--
1.7.9.5
More information about the mesa-dev
mailing list