st/egl: consolidate C sources lists into Makefile.sources
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
This commit is contained in:
committed by
Tom Stellard
parent
edd11ece38
commit
4e9028b638
@@ -23,16 +23,8 @@
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
common_SOURCES := \
|
||||
common/egl_g3d.c \
|
||||
common/egl_g3d_api.c \
|
||||
common/egl_g3d_image.c \
|
||||
common/egl_g3d_st.c \
|
||||
common/egl_g3d_sync.c \
|
||||
common/native_helper.c
|
||||
|
||||
android_SOURCES := \
|
||||
android/native_android.cpp
|
||||
# get common_SOURCES, android_SOURCES
|
||||
include $(LOCAL_PATH)/Makefile.sources
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
include Makefile.sources
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
AM_CFLAGS = $(GALLIUM_CFLAGS)
|
||||
@@ -31,23 +32,10 @@ AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include
|
||||
|
||||
noinst_LTLIBRARIES = libegl.la
|
||||
libegl_la_SOURCES = \
|
||||
common/egl_g3d_api.c \
|
||||
common/egl_g3d.c \
|
||||
common/egl_g3d_image.c \
|
||||
common/egl_g3d_st.c \
|
||||
common/egl_g3d_sync.c \
|
||||
common/native_helper.c \
|
||||
common/native_wayland_drm_bufmgr.c
|
||||
libegl_la_SOURCES = $(common_SOURCES)
|
||||
|
||||
if HAVE_EGL_PLATFORM_X11
|
||||
libegl_la_SOURCES += \
|
||||
x11/glxinit.c \
|
||||
x11/native_dri2.c \
|
||||
x11/native_x11.c \
|
||||
x11/native_ximage.c \
|
||||
x11/x11_screen.c \
|
||||
x11/dri2.c
|
||||
libegl_la_SOURCES += $(x11_SOURCES) $(x11_drm_SOURCES)
|
||||
AM_CFLAGS += \
|
||||
$(X11_CFLAGS) \
|
||||
$(LIBDRM_CFLAGS) \
|
||||
@@ -61,10 +49,7 @@ AM_CPPFLAGS += \
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_WAYLAND
|
||||
libegl_la_SOURCES += \
|
||||
wayland/native_drm.c \
|
||||
wayland/native_shm.c \
|
||||
wayland/native_wayland.c
|
||||
libegl_la_SOURCES += $(wayland_SOURCES)
|
||||
AM_CFLAGS += \
|
||||
$(LIBDRM_CFLAGS) \
|
||||
$(WAYLAND_CFLAGS)
|
||||
@@ -77,9 +62,7 @@ AM_CPPFLAGS += \
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_DRM
|
||||
libegl_la_SOURCES += \
|
||||
drm/modeset.c \
|
||||
drm/native_drm.c
|
||||
libegl_la_SOURCES += $(drm_SOURCES)
|
||||
AM_CFLAGS += \
|
||||
$(LIBDRM_CFLAGS)
|
||||
AM_CPPFLAGS += \
|
||||
@@ -90,14 +73,14 @@ AM_CPPFLAGS += \
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_FBDEV
|
||||
libegl_la_SOURCES += fbdev/native_fbdev.c
|
||||
libegl_la_SOURCES += $(fbdev_SOURCES)
|
||||
AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/src/gallium/winsys/sw \
|
||||
-DHAVE_FBDEV_BACKEND
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_NULL
|
||||
libegl_la_SOURCES += null/native_null.c
|
||||
libegl_la_SOURCES += $(null_SOURCES)
|
||||
AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/src/gallium/winsys/sw \
|
||||
-DHAVE_NULL_BACKEND
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
common_SOURCES := \
|
||||
common/egl_g3d_api.c \
|
||||
common/egl_g3d.c \
|
||||
common/egl_g3d_image.c \
|
||||
common/egl_g3d_st.c \
|
||||
common/egl_g3d_sync.c \
|
||||
common/native_helper.c \
|
||||
common/native_wayland_drm_bufmgr.c
|
||||
|
||||
android_SOURCES := \
|
||||
android/native_android.cpp
|
||||
|
||||
drm_SOURCES := \
|
||||
drm/modeset.c \
|
||||
drm/native_drm.c
|
||||
|
||||
fbdev_SOURCES := \
|
||||
fbdev/native_fbdev.c
|
||||
|
||||
gdi_SOURCES := \
|
||||
gdi/native_gdi.c
|
||||
|
||||
null_SOURCES := \
|
||||
null/native_null.c
|
||||
|
||||
x11_SOURCES := \
|
||||
x11/glxinit.c \
|
||||
x11/native_dri2.c \
|
||||
x11/native_x11.c \
|
||||
x11/native_ximage.c
|
||||
|
||||
x11_drm_SOURCES := \
|
||||
x11/x11_screen.c \
|
||||
x11/dri2.c
|
||||
|
||||
wayland_SOURCES := \
|
||||
wayland/native_drm.c \
|
||||
wayland/native_shm.c \
|
||||
wayland/native_wayland.c
|
||||
@@ -11,18 +11,11 @@ env.Append(CPPPATH = [
|
||||
'.',
|
||||
])
|
||||
|
||||
sources = [
|
||||
'common/egl_g3d.c',
|
||||
'common/egl_g3d_api.c',
|
||||
'common/egl_g3d_image.c',
|
||||
'common/egl_g3d_st.c',
|
||||
'common/egl_g3d_sync.c',
|
||||
'common/native_helper.c',
|
||||
]
|
||||
sources = env.ParseSourceList('Makefile.sources', 'common_SOURCES')
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
|
||||
sources.append('gdi/native_gdi.c')
|
||||
sources.append(env.ParseSourceList('Makefile.sources', 'gdi_SOURCES'))
|
||||
else:
|
||||
if env['drm']:
|
||||
env.PkgUseModules('DRM')
|
||||
@@ -32,17 +25,10 @@ else:
|
||||
'#/src/glx',
|
||||
'#/src/mapi',
|
||||
])
|
||||
sources.append([
|
||||
'x11/native_x11.c',
|
||||
'x11/native_dri2.c',
|
||||
'x11/native_ximage.c',
|
||||
'x11/glxinit.c'])
|
||||
sources.append(env.ParseSourceList('Makefile.sources', 'x11_SOURCES'))
|
||||
if env['drm']:
|
||||
env.Append(CPPDEFINES = ['GLX_DIRECT_RENDERING'])
|
||||
sources.append([
|
||||
'#/src/glx/dri2.c',
|
||||
'x11/x11_screen.c',
|
||||
])
|
||||
sources.append(env.ParseSourceList('Makefile.sources', 'x11_drm_SOURCES'))
|
||||
if env['drm'] and False:
|
||||
# XXX: Disabled as it depends on gbm, which is not yet built with scons
|
||||
env.Append(CPPDEFINES = ['HAVE_DRM_BACKEND'])
|
||||
@@ -50,7 +36,7 @@ else:
|
||||
'#/src/gbm/main',
|
||||
'#/src/gallium/state_trackers/gbm',
|
||||
])
|
||||
sources.append(['drm/native_drm.c', 'drm/modeset.c'])
|
||||
sources.append(env.ParseSourceList('Makefile.sources', 'drm_SOURCES'))
|
||||
|
||||
st_egl = env.ConvenienceLibrary(
|
||||
target = 'st_egl',
|
||||
|
||||
Reference in New Issue
Block a user