Merge branch '7.8'
[mesa.git] / src / gallium / state_trackers / python / SConscript
index 1581182aec2f8788a0c6ef912e087cecfe36e14d..aadeaa0a35918dd9fb7fb6cfabbd58d98252581f 100644 (file)
@@ -15,20 +15,45 @@ if 'python' in env['statetrackers']:
     
     env.Append(CPPPATH = '.')
 
-    pyst = env.ConvenienceLibrary(
-        target = 'pyst',
-        source = [
-            'gallium.i',
-            'st_device.c',
-            'st_sample.c',
-            'st_softpipe_winsys.c',
-        ],
-    )
+    if env['platform'] == 'windows':
+        env.Append(LIBS = [
+            'opengl32',
+            'gdi32',
+            'user32',
+            'kernel32',
+            'ws2_32',
+        ])
+    else:
+        env.Append(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
+        env.Append(LIBS = [
+               'GL',
+            'X11',
+        ])
+
+    sources = [
+        'gallium.i',
+        'st_device.c',
+        'st_sample.c',
+        'st_hardpipe_winsys.c',
+        'st_softpipe_winsys.c',
+    ]
+
+    env.Prepend(LIBS = [
+        ws_null,
+        trace,
+        gallium,
+    ])
+
+    if env['llvm']:
+        env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
+        env.Prepend(LIBS = [llvmpipe])
+    if True:
+        env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
+        env.Prepend(LIBS = [softpipe])
+
+    env['no_import_lib'] = 1
 
     env.SharedLibrary(
         target = '_gallium',
-        source = [
-            'st_hardpipe_winsys.c',
-        ],
-        LIBS = [pyst, softpipe, trace] + auxiliaries + env['LIBS'],
+        source = sources,
     )