2004-05-16 13:07:20 +00:00
|
|
|
#!/usr/bin/python
|
2004-04-11 21:11:18 +00:00
|
|
|
import sys
|
2005-05-06 13:37:18 +00:00
|
|
|
import os
|
2004-04-11 21:11:18 +00:00
|
|
|
|
2006-02-04 14:15:10 +00:00
|
|
|
Import ('env')
|
|
|
|
|
cflags = ''
|
|
|
|
|
defines = []
|
|
|
|
|
root_build_dir=env['BF_BUILDDIR']
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2007-03-27 10:50:03 +00:00
|
|
|
source_files = ['makesdna.c']
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2006-02-04 14:15:10 +00:00
|
|
|
makesdna_tool = env.Copy()
|
|
|
|
|
dna = env.Copy()
|
2007-03-05 20:50:36 +00:00
|
|
|
makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2004-01-04 21:42:01 +00:00
|
|
|
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
|
2005-08-04 16:05:28 +00:00
|
|
|
'../../makesdna'])
|
2004-01-04 21:42:01 +00:00
|
|
|
|
2006-03-13 11:42:49 +00:00
|
|
|
if env['OURPLATFORM'] == 'linuxcross':
|
|
|
|
|
makesdna_tool.Replace(CC='gcc')
|
|
|
|
|
makesdna_tool.Replace(AR='ar')
|
|
|
|
|
makesdna_tool.Replace(LINK='gcc')
|
|
|
|
|
|
2004-04-11 21:11:18 +00:00
|
|
|
if sys.platform != 'cygwin':
|
2006-02-04 14:15:10 +00:00
|
|
|
makesdna_tool.Append (CCFLAGS = cflags)
|
2004-01-04 21:42:01 +00:00
|
|
|
makesdna_tool.Append (CPPDEFINES = defines)
|
2006-02-04 14:15:10 +00:00
|
|
|
makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib')
|
2006-03-13 11:42:49 +00:00
|
|
|
|
2007-03-05 06:38:30 +00:00
|
|
|
if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep:
|
2007-03-27 10:50:03 +00:00
|
|
|
makesdna = makesdna_tool.Program (target = root_build_dir+'/makesdna', source = source_files, LIBS=['bf_guardedalloc'])
|
2007-03-05 06:38:30 +00:00
|
|
|
else:
|
2007-03-27 10:50:03 +00:00
|
|
|
makesdna = makesdna_tool.Program (target = '#'+root_build_dir+'/makesdna', source = source_files, LIBS=['bf_guardedalloc'])
|
2004-01-04 21:11:59 +00:00
|
|
|
|
|
|
|
|
dna_dict = dna.Dictionary()
|
2007-03-05 06:38:30 +00:00
|
|
|
dna.Depends ('dna.c', makesdna)
|
2006-03-13 11:42:49 +00:00
|
|
|
if env['OURPLATFORM'] != 'linuxcross':
|
|
|
|
|
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
|
|
|
|
|
else:
|
|
|
|
|
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
|
2004-01-25 20:57:25 +00:00
|
|
|
obj = 'intern/dna.c'
|
2004-01-04 21:11:59 +00:00
|
|
|
Return ('obj')
|