wscript_build (531B)
1 #! /usr/bin/env python 2 3 bld.stlib( 4 source = 'test_staticlib.c', 5 target = 'my_static_lib') 6 7 bld.program( 8 source = 'main.c', 9 target = 'test_static_link', 10 includes = '.', 11 use = 'my_static_lib') 12 13 def r1(self): 14 import time 15 time.sleep(1) 16 self.outputs[0].write('\n') 17 bld(rule=r1, target='foo.h', before=['c']) 18 19 # the default scanner may enforce the build order on generated headers, but it is just 20 # better and faster to set before=['c', 'cxx'] explicitly 21 # the dependency processing for 'gccdeps' also requires it 22