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
|
|
|
|
2009-03-30 07:28:37 +00:00
|
|
|
def normpath(path):
|
2010-08-29 20:52:05 +00:00
|
|
|
return os.path.abspath(os.path.normpath(path))
|
2009-03-30 07:28:37 +00:00
|
|
|
|
2006-02-04 14:15:10 +00:00
|
|
|
Import ('env')
|
|
|
|
cflags = ''
|
|
|
|
defines = []
|
2009-03-30 07:28:37 +00:00
|
|
|
root_build_dir=normpath(env['BF_BUILDDIR'])
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2007-03-27 10:50:03 +00:00
|
|
|
source_files = ['makesdna.c']
|
2008-10-31 23:50:02 +00:00
|
|
|
header_files = env.Glob('../*.h')
|
2004-01-04 21:11:59 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
makesdna_tool = env.Clone()
|
|
|
|
dna = env.Clone()
|
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',
|
2011-02-27 06:19:40 +00:00
|
|
|
<<<<<<< .working
|
2009-10-22 23:22:05 +00:00
|
|
|
'../../makesdna', '../', '../../bmesh'])
|
2011-02-27 06:19:40 +00:00
|
|
|
=======
|
2011-02-21 12:35:04 +00:00
|
|
|
'../../makesdna', '../../blenloader'])
|
2011-02-27 06:19:40 +00:00
|
|
|
>>>>>>> .merge-right.r35190
|
2004-01-04 21:42:01 +00:00
|
|
|
|
2006-03-13 11:42:49 +00:00
|
|
|
if env['OURPLATFORM'] == 'linuxcross':
|
2010-08-29 20:52:05 +00:00
|
|
|
USE_WINE = True # when cross compiling on linux 64bit this is useful
|
2008-12-14 17:32:24 +00:00
|
|
|
else:
|
2010-08-29 20:52:05 +00:00
|
|
|
USE_WINE = False
|
2008-12-14 17:32:24 +00:00
|
|
|
|
|
|
|
if not USE_WINE:
|
2010-08-29 20:52:05 +00:00
|
|
|
if env['OURPLATFORM'] == 'linuxcross':
|
|
|
|
makesdna_tool.Replace(CC='gcc')
|
|
|
|
makesdna_tool.Replace(AR='ar')
|
|
|
|
makesdna_tool.Replace(LINK='gcc')
|
2006-03-13 11:42:49 +00:00
|
|
|
|
2004-04-11 21:11:18 +00:00
|
|
|
if sys.platform != 'cygwin':
|
2010-08-29 20:52:05 +00:00
|
|
|
makesdna_tool.Append (CCFLAGS = cflags)
|
2004-01-04 21:42:01 +00:00
|
|
|
makesdna_tool.Append (CPPDEFINES = defines)
|
2009-09-16 17:43:09 +00:00
|
|
|
makesdna_tool.Append( CFLAGS = env['CFLAGS'])
|
|
|
|
makesdna_tool.Append( CCFLAGS = env['CCFLAGS'])
|
|
|
|
makesdna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS'])
|
2009-03-30 07:28:37 +00:00
|
|
|
targetdir = normpath(root_build_dir+'/lib')
|
|
|
|
|
2008-11-11 21:37:53 +00:00
|
|
|
if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
|
2010-08-29 20:52:05 +00:00
|
|
|
targetdir = '#'+targetdir
|
2008-11-11 21:37:53 +00:00
|
|
|
makesdna_tool.Append (LIBPATH = targetdir)
|
2008-10-31 23:50:02 +00:00
|
|
|
if env['BF_PROFILE']:
|
2010-08-29 20:52:05 +00:00
|
|
|
makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_LINKFLAGS'])
|
2006-03-13 11:42:49 +00:00
|
|
|
|
2009-03-30 07:28:37 +00:00
|
|
|
targetdir = normpath(root_build_dir + '/makesdna')
|
2008-11-11 20:26:53 +00:00
|
|
|
|
2008-11-11 21:37:53 +00:00
|
|
|
if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
|
2010-08-29 20:52:05 +00:00
|
|
|
targetdir = '#' + targetdir
|
2009-03-08 07:15:41 +00:00
|
|
|
#root_build_dir = "#"
|
2008-11-11 20:26:53 +00:00
|
|
|
|
2010-09-07 05:47:34 +00:00
|
|
|
makesdna = makesdna_tool.Program (target = targetdir, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_blenlib'])
|
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)
|
2008-10-31 23:50:02 +00:00
|
|
|
dna.Depends ('dna.c', header_files)
|
2009-03-08 07:15:41 +00:00
|
|
|
|
|
|
|
ap = os.path.abspath
|
|
|
|
|
2006-03-13 11:42:49 +00:00
|
|
|
if env['OURPLATFORM'] != 'linuxcross':
|
2010-08-29 20:52:05 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
|
|
|
|
dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET")
|
|
|
|
else:
|
|
|
|
dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET")
|
2010-02-01 18:39:41 +00:00
|
|
|
else:
|
2011-02-27 06:19:40 +00:00
|
|
|
<<<<<<< .working
|
2008-12-14 17:32:24 +00:00
|
|
|
if USE_WINE:
|
2009-03-08 07:15:41 +00:00
|
|
|
dna.Command ('dna.c', '', 'wine ' + ap(root_build_dir+os.sep+"makesdna $TARGET"))
|
2008-12-14 17:32:24 +00:00
|
|
|
else:
|
2009-05-23 03:24:15 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
|
|
|
|
dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET")
|
|
|
|
else:
|
|
|
|
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
|
2011-02-27 06:19:40 +00:00
|
|
|
=======
|
2010-08-29 20:52:05 +00:00
|
|
|
if USE_WINE:
|
|
|
|
dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET")
|
|
|
|
else:
|
|
|
|
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
|
2011-02-27 06:19:40 +00:00
|
|
|
>>>>>>> .merge-right.r35190
|
2010-02-01 18:39:41 +00:00
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
obj = ['intern/dna.c', 'intern/dna_genfile.c']
|
2004-01-04 21:11:59 +00:00
|
|
|
Return ('obj')
|