summaryrefslogtreecommitdiff
path: root/src/mapi/glapi/SConscript
blob: 1ace2e6b2cdc1b839d986f96fc59c1ec409d88e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#######################################################################
# SConscript for Mesa


Import('*')

if env['platform'] != 'winddk':

	env = env.Clone()
	
	env.Append(CPPPATH = [
		'#/src/mapi',
		'#/src/mesa',
	])
	
	glapi_sources = [
		'glapi.c',
		'glapi_dispatch.c',
		'glapi_entrypoint.c',
		'glapi_execmem.c',
		'glapi_getproc.c',
		'glapi_nop.c',
		'glthread.c',
	]
	
	#
	# 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')