build/${build_target}/${your_binary}
- unless you overwrite some default value
Update#1
A cut down thing that should keep you going, especially the derival of build targets, also be sure to check the waf book which includes a lot of examples.
def configure(ctx):
ctx.load(...)
ctx.env.appname = APPNAME
ctx.env.version = VERSION
ctx.define(...)
ctx.check_cc(...)
ctx.setenv('debug', env=ctx.env.derive())
ctx.env.CFLAGS = ['-ggdb', '-Wall']
ctx.define('DEBUG',1)
ctx.setenv('release', env=ctx.env.derive())
ctx.env.CFLAGS = ['-O2', '-Wall']
ctx.define('RELEASE',1)
def build(bld):
### subdirs :) under build are usually related to build variant or command
print (">>>>> "+bld.cmd)
print (">>>>> "+bld.variant)
bin = bld.program(...)
from waflib.Build import BuildContext
class release(BuildContext):
cmd = 'release'
variant = 'release'
class debug(BuildContext):
cmd = 'debug'
variant = 'debug'