scons: rework the EGL build
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 14 Jul 2015 01:04:30 +0000 (02:04 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 22 Jul 2015 15:35:27 +0000 (16:35 +0100)
The scons equivalent of the previous commit - just fold the almost
identical driver + main Sconscripts.

Cc: Alexander von Gluck IV <kallisti5@unixzen.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
src/SConscript
src/egl/Makefile.am
src/egl/SConscript [new file with mode: 0644]
src/egl/drivers/haiku/SConscript [deleted file]
src/egl/main/SConscript [deleted file]

index 46482fbd62e2a1d19c2cd213ab7707b8d14e3105..106b87d42512fbfbef73d62291ccdfdd64f1ab61 100644 (file)
@@ -32,8 +32,7 @@ if not env['embedded']:
     if env['platform'] not in ('cygwin', 'darwin', 'freebsd', 'haiku', 'windows'):
         SConscript('glx/SConscript')
     if env['platform'] == 'haiku':
-        SConscript('egl/drivers/haiku/SConscript')
-        SConscript('egl/main/SConscript')
+        SConscript('egl/SConscript')
 
     if env['gles']:
         SConscript('mapi/shared-glapi/SConscript')
index 6f9abcefc38fa71e88ca8b333c78e1fbe9317e27..10eb1d56bdde988904aef147492574dbed1a1433 100644 (file)
@@ -111,10 +111,9 @@ egl_HEADERS = \
        $(top_srcdir)/include/EGL/eglplatform.h
 
 EXTRA_DIST = \
+       SConscript \
        drivers/haiku \
        docs \
        main/egl.def \
        main/README.txt \
-       main/SConscript \
-       main/Makefile.sources \
-       drivers/dri2/SConscript
+       main/Makefile.sources
diff --git a/src/egl/SConscript b/src/egl/SConscript
new file mode 100644 (file)
index 0000000..a7f6282
--- /dev/null
@@ -0,0 +1,33 @@
+#######################################################################
+# SConscript for EGL
+
+
+Import('*')
+
+env = env.Clone()
+
+env.Append(CPPPATH = [
+    '#/include',
+    '#/src/egl/main',
+])
+
+
+# parse Makefile.sources
+egl_sources = env.ParseSourceList('Makefile.sources', 'LIBEGL_C_FILES')
+egl_sources.append(env.ParseSourceList('Makefile.sources', 'dri2_backend_core_FILES'))
+
+env.Append(CPPDEFINES = [
+    '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_HAIKU',
+    '_EGL_BUILT_IN_DRIVER_HAIKU',
+    'HAVE_HAIKU_PLATFORM',
+])
+egl_sources.append('drivers/haiku/egl_haiku.cpp')
+
+egl = env.SharedLibrary(
+    target = 'EGL',
+    source = egl_sources,
+)
+
+egl = env.InstallSharedLibrary(egl, version=(1, 0, 0))
+
+env.Alias('egl', egl)
diff --git a/src/egl/drivers/haiku/SConscript b/src/egl/drivers/haiku/SConscript
deleted file mode 100644 (file)
index 9db7ecf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Import('*')
-
-env = env.Clone()
-
-env.Append(CPPPATH = [
-       '#/include',
-       '#/src/egl/main',
-])
-
-sources = [
-       'egl_haiku.cpp'
-]
-
-if env['platform'] == 'haiku':
-       env.Append(CPPDEFINES = [
-               'HAVE_HAIKU_PLATFORM',
-               '_EGL_NATIVE_PLATFORM=haiku',
-       ])
-
-egl_haiku = env.ConvenienceLibrary(
-       target = 'egl_haiku',
-       source = sources,
-)
-
-Export('egl_haiku')
diff --git a/src/egl/main/SConscript b/src/egl/main/SConscript
deleted file mode 100644 (file)
index 631ba20..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#######################################################################
-# SConscript for EGL
-
-
-Import('*')
-
-env = env.Clone()
-
-env.Append(CPPDEFINES = [
-    '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_HAIKU',
-    '_EGL_BUILT_IN_DRIVER_HAIKU',
-])
-env.Prepend(LIBS = [
-    egl_haiku,
-])
-
-env.Append(CPPPATH = [
-    '#/include',
-])
-
-
-# parse Makefile.sources
-egl_sources = env.ParseSourceList('Makefile.sources', 'LIBEGL_C_FILES')
-
-egl = env.SharedLibrary(
-    target = 'EGL',
-    source = egl_sources,
-)
-
-egl = env.InstallSharedLibrary(egl, version=(1, 0, 0))
-
-env.Alias('egl', egl)