scons: Revamp how to specify targets to build.
[mesa.git] / src / gallium / targets / egl-gdi / SConscript
index 8f8b28ef67bf9bc199ad2d7dcbe6230a7a2677ca..d52eeb70fd5c81d2d2b2510ead93cec2e6f55441 100644 (file)
@@ -3,45 +3,53 @@
 
 Import('*')
 
-if env['platform'] == 'windows':
-
-    env = env.Clone()
-
-    env.Append(CPPPATH = [
-            '#/src/gallium/state_trackers/egl',
-            '#/src/gallium/state_trackers/vega',
-            '#/src/egl/main',
-            '#/src/mesa',
-    ])
-
-    env.Append(CPPDEFINES = [
-            'FEATURE_VG=1',
-            'GALLIUM_SOFTPIPE',
-            'GALLIUM_RBUG',
-            'GALLIUM_TRACE',
-    ])
-
-    env.Append(LIBS = [
-        'gdi32',
-        'user32',
-        'kernel32',
-        'ws2_32',
-    ])
-
-    env['no_import_lib'] = 1
-
-    drivers = [softpipe]
-    if env['llvm']:
-        env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
-        drivers += [llvmpipe]
-    drivers += [identity, trace, rbug]
-
-    apis = [vgapi, st_vega]
-
-    egl_gallium = env.SharedLibrary(
-        target ='egl_gallium',
-        source = 'egl-static.c',
-        LIBS = st_egl_gdi + ws_gdi + drivers + apis + gallium + egl + env['LIBS'],
-    )
-
-    env.InstallSharedLibrary(egl_gallium)
+env = env.Clone()
+
+env.Append(CPPPATH = [
+        '#/src/gallium/state_trackers/egl',
+        '#/src/gallium/state_trackers/vega',
+        '#/src/egl/main',
+        '#/src/mesa',
+])
+
+env.Append(CPPDEFINES = [
+        'FEATURE_VG=1',
+        'GALLIUM_SOFTPIPE',
+        'GALLIUM_RBUG',
+        'GALLIUM_TRACE',
+])
+
+env.Append(LIBS = [
+    'gdi32',
+    'user32',
+    'kernel32',
+    'ws2_32',
+])
+
+env.Prepend(LIBS = [
+    st_egl_gdi,
+    ws_gdi,
+    identity,
+    trace,
+    rbug,
+    softpipe,
+    vgapi,
+    st_vega,
+    gallium,
+    egl,
+])
+
+if env['llvm']:
+    env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+    env.Prepend(LIBS = [llvmpipe])
+
+egl_gallium = env.SharedLibrary(
+    target ='egl_gallium',
+    source = 'egl-static.c',
+)
+
+env['no_import_lib'] = 1
+
+egl_gdi = env.InstallSharedLibrary(egl_gallium)
+
+env.Alias('egl-gdi', egl_gdi)