This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/makesdna/intern/SConscript
Michel Selten c8d8b2c4de SCons update
* makesdna generates dna.c which in turn should be compiled with nice cflags,
  linkflags etc. But, a small error slipped in which caused the .c file to be
  compiled into a nice .o file without those flags.
  Thanks to Hos for pointing out the error and persisting there indeed was an
  error.
2004-01-25 20:57:25 +00:00

49 lines
1.8 KiB
Python

import sys
# Import the C flags set in the SConstruct file
Import ('cflags')
Import ('cxxflags')
Import ('defines')
Import ('platform_libs')
Import ('platform_libpath')
Import ('platform_linkflags')
if sys.platform=='win32':
platform_linkflags = ['/SUBSYSTEM:CONSOLE',
'/MACHINE:I386',
'/ENTRY:mainCRTStartup',
'/NODEFAULTLIB:"msvcprt.lib"',
'/NODEFAULTLIB:"glut32.lib"',
'/NODEFAULTLIB:"libcd.lib"',
#'/NODEFAULTLIB:"libc.lib"',
'/NODEFAULTLIB:"libcpd.lib"',
'/NODEFAULTLIB:"libcp.lib"',
'/NODEFAULTLIB:"libcmtd.lib"'
]
# TODO: make sure the makesdna program does not get installed on the system.
source_files = ['makesdna.c']
makesdna_tool = Environment (CCFLAGS='-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
'..'])
makesdna_tool.Append (CCFLAGS = cflags)
makesdna_tool.Append (CXXFLAGS = cxxflags)
makesdna_tool.Append (CPPDEFINES = defines)
makesdna_tool.Append (LINKFLAGS = platform_linkflags)
makesdna_tool.Append (LIBPATH = '#/lib')
makesdna_tool.Append (LIBS = 'blender_guardedalloc')
makesdna_tool.Program (target = 'makesdna', source = source_files)
dna = Environment ()
dna_dict = dna.Dictionary()
makesdna_name = 'makesdna' + dna_dict['PROGSUFFIX']
dna.Depends ('dna.c', makesdna_name)
if sys.platform=='win32':
dna.Command ('dna.c', '', "source\\blender\\makesdna\\intern\\makesdna $TARGET")
else:
dna.Command ('dna.c', '', "source/blender/makesdna/intern/makesdna $TARGET")
obj = 'intern/dna.c'
Return ('obj')