nir: remove dependency on glsl
[mesa.git] / src / gallium / targets / haiku-softpipe / SConscript
index 72a5ba796270c94d8312c9ba3790cd060fc26163..210721c420fd6a1a19aca4be67c472a6de12e96f 100644 (file)
@@ -1,21 +1,48 @@
 Import('*')
 
+env.Prepend(LIBS = [
+    ws_haiku,
+    st_haiku,
+    trace,
+    rbug,
+    mesautil,
+    mesa,
+    glsl,
+    gallium
+])
+
 if True:
     env.Append(CPPDEFINES = [
         'GALLIUM_SOFTPIPE',
         'GALLIUM_RBUG',
         'GALLIUM_TRACE',
     ])
+    env.Prepend(LIBS = [softpipe])
+
+env.Prepend(LIBS = [libgl])
+
+env.Append(CPPPATH = [
+    '#/src/mapi',
+    '#/src/mesa',
+    '#/src/mesa/main',
+    '#/include/HaikuGL',
+    '#/src/gallium/winsys',
+    '#/src/gallium/state_trackers/hgl',
+    '/boot/system/develop/headers/private',
+])
 
 if env['llvm']:
-    env.Append(CPPDEFINES = 'HAVE_LLVMPIPE')
+    env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
+    env.Prepend(LIBS = [llvmpipe])
 
 softpipe_sources = [
-    'haiku-softpipe.c'
+    'GalliumContext.cpp',
+    'SoftwareRenderer.cpp'
 ]
 
-module = env.StaticLibrary(
-    target ='swpipe_haiku.a',
+# libswpipe gets turned into "Softpipe" by the haiku package system
+module = env.LoadableModule(
+    target ='swpipe',
     source = softpipe_sources,
-    SHLIBPREFIX = '',
 )
+