configure.py
author Scott Ehlert <ds@alliedmods.net>
Sat May 17 16:19:00 2014 -0500 (2014-05-17)
changeset 914 d0ea7151b71d
parent 821 b589eb17e403
permissions -rw-r--r--
Sync changes from SourceMod's bootstrap script.
     1 # vim: set sts=2 ts=8 sw=2 tw=99 et:
     2 import sys
     3 try:
     4 	from ambuild2 import run
     5 except:
     6 	try:
     7 		import ambuild
     8 		sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n')
     9 		sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n')
    10 	except:
    11 		sys.stderr.write('AMBuild must be installed to build this project.\n')
    12 		sys.stderr.write('http://www.alliedmods.net/ambuild\n')
    13 	sys.exit(1)
    14 
    15 run = run.PrepareBuild(sourcePath=sys.path[0])
    16 run.default_build_folder = 'obj-' + run.target_platform
    17 run.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
    18                        help='Enable debugging symbols')
    19 run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
    20                        help='Enable optimization')
    21 run.options.add_option('-s', '--sdks', default='all', dest='sdks',
    22                        help='Build against specified SDKs; valid args are "all", "present", or '
    23                             'comma-delimited list of engine names (default: %default)')
    24 run.Configure()