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.
[email protected]
     1
# vim: set sts=2 ts=8 sw=2 tw=99 et:
[email protected]
     2
import sys
[email protected]
     3
try:
[email protected]
     4
	from ambuild2 import run
[email protected]
     5
except:
[email protected]
     6
	try:
[email protected]
     7
		import ambuild
[email protected]
     8
		sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n')
[email protected]
     9
		sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n')
[email protected]
    10
	except:
[email protected]
    11
		sys.stderr.write('AMBuild must be installed to build this project.\n')
[email protected]
    12
		sys.stderr.write('http://www.alliedmods.net/ambuild\n')
[email protected]
    13
	sys.exit(1)
[email protected]
    14
[email protected]
    15
run = run.PrepareBuild(sourcePath=sys.path[0])
[email protected]
    16
run.default_build_folder = 'obj-' + run.target_platform
[email protected]
    17
run.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
[email protected]
    18
                       help='Enable debugging symbols')
[email protected]
    19
run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
[email protected]
    20
                       help='Enable optimization')
[email protected]
    21
run.options.add_option('-s', '--sdks', default='all', dest='sdks',
[email protected]
    22
                       help='Build against specified SDKs; valid args are "all", "present", or '
[email protected]
    23
                            'comma-delimited list of engine names (default: %default)')
dvan[email protected]
    24
run.Configure()