From 601498ae73e654c2de997ea75075613a694d604d Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 1 Nov 2010 13:30:22 +0000 Subject: scons: Revamp how to specify targets to build. Use scons target and dependency system instead of ad-hoc options. Now is simply a matter of naming what to build. For example: scons libgl-xlib scons libgl-gdi scons graw-progs scons llvmpipe and so on. And there is also the possibility of scepcified subdirs, e.g. scons src/gallium/drivers If nothing is specified then everything will be build. There might be some rough corners over the next days. Please bare with me. --- src/mapi/glapi/SConscript | 143 +++++++++++++++++++++++----------------------- src/mapi/vgapi/.gitignore | 1 + 2 files changed, 73 insertions(+), 71 deletions(-) create mode 100644 src/mapi/vgapi/.gitignore (limited to 'src/mapi') diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index 40db237fcb..77a5f9bd2e 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -6,77 +6,78 @@ Import('*') if env['platform'] != 'winddk': - env = env.Clone() - - env.Append(CPPDEFINES = [ - 'MAPI_GLAPI_CURRENT', - ]) + env = env.Clone() + + env.Append(CPPDEFINES = [ + 'MAPI_GLAPI_CURRENT', + ]) - if env['platform'] == 'windows': - env.Append(CPPDEFINES = [ - '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers - 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers - 'WIN32_THREADS', # use Win32 thread API - ]) + if env['platform'] == 'windows': + env.Append(CPPDEFINES = [ + '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers + 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers + 'WIN32_THREADS', # use Win32 thread API + ]) - env.Append(CPPPATH = [ - '#/src/mapi', - '#/src/mesa', - ]) - - glapi_sources = [ - 'glapi_dispatch.c', - 'glapi_entrypoint.c', - 'glapi_getproc.c', - 'glapi_nop.c', - 'glthread.c', - ] - - mapi_sources = [ - 'u_current.c', - 'u_execmem.c', - 'u_thread.c', - ] - for s in mapi_sources: - o = env.SharedObject(s[:-2], '../mapi/' + s) - glapi_sources.append(o) + env.Append(CPPPATH = [ + '#/src/mapi', + '#/src/mesa', + ]) + + glapi_sources = [ + 'glapi_dispatch.c', + 'glapi_entrypoint.c', + 'glapi_getproc.c', + 'glapi_nop.c', + 'glthread.c', + ] + + mapi_sources = [ + 'u_current.c', + 'u_execmem.c', + 'u_thread.c', + ] + for s in mapi_sources: + o = env.SharedObject(s[:-2], '../mapi/' + s) + glapi_sources.append(o) - # - # Assembly sources - # - if gcc and env['machine'] == 'x86': - env.Append(CPPDEFINES = [ - 'USE_X86_ASM', - 'USE_MMX_ASM', - 'USE_3DNOW_ASM', - 'USE_SSE_ASM', - ]) - glapi_sources += [ - 'glapi_x86.S', - ] - elif gcc and env['machine'] == 'x86_64': - env.Append(CPPDEFINES = [ - 'USE_X86_64_ASM', - ]) - glapi_sources += [ - 'glapi_x86-64.S' - ] - elif gcc and env['machine'] == 'ppc': - env.Append(CPPDEFINES = [ - 'USE_PPC_ASM', - 'USE_VMX_ASM', - ]) - glapi_sources += [ - ] - elif gcc and env['machine'] == 'sparc': - glapi_sources += [ - 'glapi_sparc.S' - ] - else: - pass - - glapi = env.ConvenienceLibrary( - target = 'glapi', - source = glapi_sources, - ) - Export('glapi') + # + # Assembly sources + # + if env['gcc'] and env['platform'] != 'windows': + if env['machine'] == 'x86': + env.Append(CPPDEFINES = [ + 'USE_X86_ASM', + 'USE_MMX_ASM', + 'USE_3DNOW_ASM', + 'USE_SSE_ASM', + ]) + glapi_sources += [ + 'glapi_x86.S', + ] + elif env['machine'] == 'x86_64': + env.Append(CPPDEFINES = [ + 'USE_X86_64_ASM', + ]) + glapi_sources += [ + 'glapi_x86-64.S' + ] + elif env['machine'] == 'ppc': + env.Append(CPPDEFINES = [ + 'USE_PPC_ASM', + 'USE_VMX_ASM', + ]) + glapi_sources += [ + ] + elif env['machine'] == 'sparc': + glapi_sources += [ + 'glapi_sparc.S' + ] + else: + pass + + glapi = env.ConvenienceLibrary( + target = 'glapi', + source = glapi_sources, + ) + Export('glapi') diff --git a/src/mapi/vgapi/.gitignore b/src/mapi/vgapi/.gitignore new file mode 100644 index 0000000000..5becb99386 --- /dev/null +++ b/src/mapi/vgapi/.gitignore @@ -0,0 +1 @@ +vgapi_tmp.h -- cgit v1.2.3