8 root_build_dir=env['BF_BUILDDIR']
10 source_files = ['makesdna.c']
11 header_files = env.Glob('../*.h')
13 makesdna_tool = env.Clone()
15 makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
17 makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
20 if env['OURPLATFORM'] == 'linuxcross':
21 makesdna_tool.Replace(CC='gcc')
22 makesdna_tool.Replace(AR='ar')
23 makesdna_tool.Replace(LINK='gcc')
25 if sys.platform != 'cygwin':
26 makesdna_tool.Append (CCFLAGS = cflags)
27 makesdna_tool.Append (CPPDEFINES = defines)
28 targetdir = root_build_dir+'/lib'
29 if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
30 targetdir = '#'+targetdir
31 makesdna_tool.Append (LIBPATH = targetdir)
33 makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS'])
35 targetdir = root_build_dir + '/makesdna'
37 if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
38 targetdir = '#' + targetdir
40 makesdna = makesdna_tool.Program (target = targetdir, source = source_files, LIBS=['bf_guardedalloc'])
42 dna_dict = dna.Dictionary()
43 dna.Depends ('dna.c', makesdna)
44 dna.Depends ('dna.c', header_files)
45 if env['OURPLATFORM'] != 'linuxcross':
46 dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
48 dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")