restricted parsing of sdl-config to *NIX and Mac builds as it's static on Win32 anyways; added verbosebuild as SCons option to print out all compiler/linker messages

This commit is contained in:
zicodxx 2010-07-30 07:34:33 +00:00
parent 7b1bfbbf2c
commit 48b60f63a8
2 changed files with 16 additions and 11 deletions

View file

@ -3,6 +3,7 @@ D2X-Rebirth Changelog
20100730 20100730
-------- --------
main/game.c: Removed leftover of mouse grabbing from set_screen_mode - forgot to do this in rev1192 main/game.c: Removed leftover of mouse grabbing from set_screen_mode - forgot to do this in rev1192
SConstruct: restricted parsing of sdl-config to *NIX and Mac builds as it's static on Win32 anyways; added verbosebuild as SCons option to print out all compiler/linker messages
20100729 20100729
-------- --------

View file

@ -32,6 +32,7 @@ arm = int(ARGUMENTS.get('arm', 0))
ipv6 = int(ARGUMENTS.get('ipv6', 0)) ipv6 = int(ARGUMENTS.get('ipv6', 0))
use_udp = int(ARGUMENTS.get('use_udp', 1)) use_udp = int(ARGUMENTS.get('use_udp', 1))
use_ipx = int(ARGUMENTS.get('use_ipx', 1)) use_ipx = int(ARGUMENTS.get('use_ipx', 1))
verbosebuild = int(ARGUMENTS.get('verbosebuild', 0))
print '\n===== ' + PROGRAM_NAME + VERSION_STRING + ' =====\n' print '\n===== ' + PROGRAM_NAME + VERSION_STRING + ' =====\n'
@ -269,21 +270,19 @@ noasm_sources = [
env = Environment(ENV = os.environ) env = Environment(ENV = os.environ)
# Prettier build messages...... # Prettier build messages......
env["CCCOMSTR"] = "Compiling $SOURCE ..." if (verbosebuild == 0):
env["CXXCOMSTR"] = "Compiling $SOURCE ..." env["CCCOMSTR"] = "Compiling $SOURCE ..."
env["LINKCOMSTR"] = "Linking $TARGET ..." env["CXXCOMSTR"] = "Compiling $SOURCE ..."
env["ARCOMSTR"] = "Archiving $TARGET ..." env["LINKCOMSTR"] = "Linking $TARGET ..."
env["RANLIBCOMSTR"] = "Indexing $TARGET ..." env["ARCOMSTR"] = "Archiving $TARGET ..."
env["RANLIBCOMSTR"] = "Indexing $TARGET ..."
# flags and stuff for all platforms # flags and stuff for all platforms
env.ParseConfig('sdl-config --cflags')
env.ParseConfig('sdl-config --libs')
env.Append(CPPFLAGS = ['-Wall', '-funsigned-char']) env.Append(CPPFLAGS = ['-Wall', '-funsigned-char'])
env.Append(CPPDEFINES = [('PROGRAM_NAME', '\\"' + str(PROGRAM_NAME) + '\\"'), ('D2XMAJOR', '\\"' + str(D2XMAJOR) + '\\"'), ('D2XMINOR', '\\"' + str(D2XMINOR) + '\\"'), ('D2XMICRO', '\\"' + str(D2XMICRO) + '\\"')]) env.Append(CPPDEFINES = [('PROGRAM_NAME', '\\"' + str(PROGRAM_NAME) + '\\"'), ('D2XMAJOR', '\\"' + str(D2XMAJOR) + '\\"'), ('D2XMINOR', '\\"' + str(D2XMINOR) + '\\"'), ('D2XMICRO', '\\"' + str(D2XMICRO) + '\\"')])
env.Append(CPPDEFINES = ['NETWORK', '_REENTRANT']) env.Append(CPPDEFINES = ['NETWORK', '_REENTRANT'])
env.Append(CPPPATH = ['include', 'main', 'arch/include']) env.Append(CPPPATH = ['include', 'main', 'arch/include'])
libs = env['LIBS'] libs = ['physfs']
libs += ['physfs']
# Get traditional compiler environment variables # Get traditional compiler environment variables
if os.environ.has_key('CC'): if os.environ.has_key('CC'):
@ -317,6 +316,8 @@ elif sys.platform == 'darwin':
sharepath = '' sharepath = ''
env.Append(CPPDEFINES = ['HAVE_STRUCT_TIMESPEC', 'HAVE_STRUCT_TIMEVAL', '__unix__']) env.Append(CPPDEFINES = ['HAVE_STRUCT_TIMESPEC', 'HAVE_STRUCT_TIMEVAL', '__unix__'])
asm = 0 asm = 0
env.ParseConfig('sdl-config --cflags')
env.ParseConfig('sdl-config --libs')
env.Append(CPPPATH = ['arch/linux/include']) env.Append(CPPPATH = ['arch/linux/include'])
ogldefines = ['OGL'] ogldefines = ['OGL']
common_sources += 'arch/cocoa/SDLMain.m' common_sources += 'arch/cocoa/SDLMain.m'
@ -341,6 +342,8 @@ else:
osdef = '__LINUX__' osdef = '__LINUX__'
osasmdef = 'elf' osasmdef = 'elf'
sharepath += '/' sharepath += '/'
env.ParseConfig('sdl-config --cflags')
env.ParseConfig('sdl-config --libs')
env.Append(CPPDEFINES = ['__LINUX__', 'HAVE_STRUCT_TIMESPEC', 'HAVE_STRUCT_TIMEVAL']) env.Append(CPPDEFINES = ['__LINUX__', 'HAVE_STRUCT_TIMESPEC', 'HAVE_STRUCT_TIMEVAL'])
env.Append(CPPPATH = ['arch/linux/include']) env.Append(CPPPATH = ['arch/linux/include'])
ogldefines = ['OGL'] ogldefines = ['OGL']
@ -455,8 +458,9 @@ Help(PROGRAM_NAME + ', SConstruct file help:' +
'editor=1' build editor !EXPERIMENTAL! 'editor=1' build editor !EXPERIMENTAL!
'arm=1' compile for ARM architecture 'arm=1' compile for ARM architecture
'ipv6=1' enables IPv6 copability 'ipv6=1' enables IPv6 copability
'use_udp=0' disable UDP support 'use_udp=0' disable UDP support
'use_ipx=0' disable IPX support (IPX available on Linux and Windows, only) 'use_ipx=0' disable IPX support (IPX available on Linux and Windows, only)
'verbosebuild=1' print out all compiler/linker messages during building
Default values: Default values:
""" + ' sharepath = ' + DATA_DIR + """ """ + ' sharepath = ' + DATA_DIR + """