* add REL_CFLAGS and REL_CCFLAGS when not building debug. This adds NDEBUG to compile on Win32 * fix path to makesdna binary
32 lines
948 B
Python
32 lines
948 B
Python
#!/usr/bin/python
|
|
import sys
|
|
import os
|
|
|
|
Import ('env')
|
|
cflags = ''
|
|
defines = []
|
|
root_build_dir=env['BF_BUILDDIR']
|
|
|
|
source_files = ['makesdna.c']
|
|
|
|
makesdna_tool = env.Copy()
|
|
dna = env.Copy()
|
|
makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
|
|
|
|
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
|
|
'../../makesdna'])
|
|
|
|
if sys.platform != 'cygwin':
|
|
makesdna_tool.Append (CCFLAGS = cflags)
|
|
makesdna_tool.Append (CPPDEFINES = defines)
|
|
makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib')
|
|
makesdna_tool.Append (LIBS = 'blender_guardedalloc')
|
|
makesdna_tool.Program (target = '#'+root_build_dir+os.sep+'makesdna', source = source_files)
|
|
|
|
dna_dict = dna.Dictionary()
|
|
makesdna_name = root_build_dir+'/makesdna' + dna_dict['PROGSUFFIX']
|
|
dna.Depends ('dna.c', '#'+makesdna_name)
|
|
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
|
|
obj = 'intern/dna.c'
|
|
Return ('obj')
|