hybrid builds

This commit is contained in:
Thomas Nagy 2014-03-04 08:22:48 +01:00
parent 015ad7349b
commit 66c28e3578
4 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,5 @@
all:
touch ../build/just_make/foo.so
echo "int foo() {return 2;} " > ../build/just_make_mk.c
gcc -shared ../build/just_make_mk.c -o ../build/just_make/libfoo.so

View File

@ -0,0 +1,6 @@
int foo();
int main() {
return foo();
}

View File

@ -1,5 +1,6 @@
#! /usr/bin/env python
from waflib import Build
def build(bld):
# Call make for building, but keep waf for install/uninstall
@ -20,3 +21,9 @@ def build(bld):
# the make command will be called only once
bld(rule=make_all, always=True, name='call make')
# for a hybrid build...
bld.post_mode = Build.POST_LAZY
bld.add_group()
bld.read_shlib('foo', paths=[bld.path.get_bld().abspath()])
bld.program(source='main.c', target='a', use='foo')

View File

@ -2,6 +2,7 @@
def configure(conf):
conf.env.thecmd = 'all'
conf.load('gcc')
def build(bld):
bld(rule='touch ${TGT}', target='bar.txt')