Rather than having the sources list duplicated across all three
build systems, define it once and use it whenever needed.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
LOCAL_PATH := $(call my-dir)
-# from Makefile
-SOURCES = \
- eglapi.c \
- eglarray.c \
- eglconfig.c \
- eglcontext.c \
- eglcurrent.c \
- egldisplay.c \
- egldriver.c \
- eglfallbacks.c \
- eglglobals.c \
- eglimage.c \
- egllog.c \
- eglmisc.c \
- eglmode.c \
- eglscreen.c \
- eglstring.c \
- eglsurface.c \
- eglsync.c
+include $(LOCAL_PATH)/Makefile.sources
+
+SOURCES := \
+ ${LIBEGL_C_FILES}
# ---------------------------------------
# Build libGLES_mesa
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
+include Makefile.sources
+
AM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gbm/main \
lib_LTLIBRARIES = libEGL.la
libEGL_la_SOURCES = \
- eglapi.c \
- eglapi.h \
- eglarray.c \
- eglarray.h \
- eglcompiler.h \
- eglconfig.c \
- eglconfig.h \
- eglcontext.c \
- eglcontext.h \
- eglcurrent.c \
- eglcurrent.h \
- egldefines.h \
- egldisplay.c \
- egldisplay.h \
- egldriver.c \
- egldriver.h \
- eglfallbacks.c \
- eglglobals.c \
- eglglobals.h \
- eglimage.c \
- eglimage.h \
- egllog.c \
- egllog.h \
- eglmisc.c \
- eglmisc.h \
- eglmode.c \
- eglmode.h \
- eglmutex.h \
- eglscreen.c \
- eglscreen.h \
- eglstring.c \
- eglstring.h \
- eglsurface.c \
- eglsurface.h \
- eglsync.c \
- eglsync.h \
- egltypedefs.h
+ ${LIBEGL_C_FILES}
libEGL_la_LIBADD = \
$(EGL_LIB_DEPS)
--- /dev/null
+LIBEGL_C_FILES := \
+ eglapi.c \
+ eglapi.h \
+ eglarray.c \
+ eglarray.h \
+ eglcompiler.h \
+ eglconfig.c \
+ eglconfig.h \
+ eglcontext.c \
+ eglcontext.h \
+ eglcurrent.c \
+ eglcurrent.h \
+ egldefines.h \
+ egldisplay.c \
+ egldisplay.h \
+ egldriver.c \
+ egldriver.h \
+ eglfallbacks.c \
+ eglglobals.c \
+ eglglobals.h \
+ eglimage.c \
+ eglimage.h \
+ egllog.c \
+ egllog.h \
+ eglmisc.c \
+ eglmisc.h \
+ eglmode.c \
+ eglmode.h \
+ eglmutex.h \
+ eglscreen.c \
+ eglscreen.h \
+ eglstring.c \
+ eglstring.h \
+ eglsurface.c \
+ eglsurface.h \
+ eglsync.c \
+ eglsync.h \
+ egltypedefs.h
'#/include',
])
-egl_sources = [
- 'eglapi.c',
- 'eglarray.c',
- 'eglconfig.c',
- 'eglcontext.c',
- 'eglcurrent.c',
- 'egldisplay.c',
- 'egldriver.c',
- 'eglfallbacks.c',
- 'eglglobals.c',
- 'eglimage.c',
- 'egllog.c',
- 'eglmisc.c',
- 'eglmode.c',
- 'eglscreen.c',
- 'eglstring.c',
- 'eglsurface.c',
- 'eglsync.c',
-]
+# parse Makefile.sources
+egl_sources = env.ParseSourceList('Makefile.sources', 'LIBEGL_C_FILES')
egl = env.ConvenienceLibrary(
target = 'egl',