[Mesa-dev] [PATCH v2] egl/gallium: Set defines for supported APIs when using automake

Emil Velikov emil.l.velikov at gmail.com
Thu Jun 12 10:08:41 PDT 2014


On 11/06/14 22:13, Niels Ole Salscheider wrote:
> This fixes automake builds which are broken since
> b52a530ce2aada1967bc8fefa83ab53e6a737dae.
> 
> v2: This patch also adds the FEATURE_* defines back to targets/egl-static for
> Android and Scons that have been removed in the mentioned commit.
> 
> Signed-off-by: Niels Ole Salscheider <niels_ole at salscheider-online.de>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79885
Pushed to master.

Thanks again
Emil
> ---
>  src/gallium/state_trackers/egl/Makefile.am | 20 ++++++++++++++++++++
>  src/gallium/targets/egl-static/Android.mk  |  2 ++
>  src/gallium/targets/egl-static/SConscript  |  6 ++++++
>  3 files changed, 28 insertions(+)
> 
> diff --git a/src/gallium/state_trackers/egl/Makefile.am b/src/gallium/state_trackers/egl/Makefile.am
> index b7dcdab..828bf13 100644
> --- a/src/gallium/state_trackers/egl/Makefile.am
> +++ b/src/gallium/state_trackers/egl/Makefile.am
> @@ -88,3 +88,23 @@ AM_CPPFLAGS += \
>  	-I$(top_srcdir)/src/gallium/winsys/sw \
>  	-DHAVE_NULL_BACKEND
>  endif
> +
> +if HAVE_OPENGL
> +AM_CPPFLAGS += \
> +	-DFEATURE_GL=1
> +endif
> +
> +if HAVE_OPENGL_ES1
> +AM_CPPFLAGS += \
> +	-DFEATURE_ES1=1
> +endif
> +
> +if HAVE_OPENGL_ES2
> +AM_CPPFLAGS += \
> +	-DFEATURE_ES2=1
> +endif
> +
> +if HAVE_OPENVG
> +AM_CPPFLAGS += \
> +	-DFEATURE_VG=1
> +endif
> diff --git a/src/gallium/targets/egl-static/Android.mk b/src/gallium/targets/egl-static/Android.mk
> index 01408a7..37244b5 100644
> --- a/src/gallium/targets/egl-static/Android.mk
> +++ b/src/gallium/targets/egl-static/Android.mk
> @@ -31,6 +31,8 @@ LOCAL_SRC_FILES := \
>  	egl_st.c
>  
>  LOCAL_CFLAGS := \
> +	-DFEATURE_ES1=1 \
> +	-DFEATURE_ES2=1 \
>  	-D_EGL_MAIN=_eglBuiltInDriverGALLIUM
>  
>  LOCAL_C_INCLUDES := \
> diff --git a/src/gallium/targets/egl-static/SConscript b/src/gallium/targets/egl-static/SConscript
> index 7d8d4d2..afb5c11 100644
> --- a/src/gallium/targets/egl-static/SConscript
> +++ b/src/gallium/targets/egl-static/SConscript
> @@ -63,6 +63,11 @@ if env['platform'] == 'windows':
>  
>  # OpenGL ES and OpenGL
>  if env['gles']:
> +    env.Append(CPPDEFINES = [
> +        'FEATURE_GL=1',
> +        'FEATURE_ES1=1',
> +        'FEATURE_ES2=1'
> +    ])
>      env.Prepend(LIBPATH = [shared_glapi.dir])
>      # manually add LIBPREFIX on windows
>      glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
> @@ -70,6 +75,7 @@ if env['gles']:
>  
>  # OpenVG
>  if True:
> +    env.Append(CPPDEFINES = ['FEATURE_VG=1'])
>      env.Prepend(LIBPATH = [openvg.dir])
>      # manually add LIBPREFIX on windows
>      openvg_name = 'OpenVG' if env['platform'] != 'windows' else 'libOpenVG'
> 



More information about the mesa-dev mailing list