3 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
6 from waflib import Utils,Build
7 from waflib.Configure import conf
8 def get_extensions(lst):
10 for x in Utils.to_list(lst):
12 if not isinstance(x,str):
14 ret.append(x[x.rfind('.')+1:])
18 def sniff_features(**kw):
19 exts=get_extensions(kw['source'])
22 if'cxx'in exts or'cpp'in exts or'c++'in exts or'cc'in exts or'C'in exts:
24 if'c'in exts or'vala'in exts:
32 if type in['program','shlib','stlib']:
34 if x in['cxx','d','c']:
37 def set_features(kw,_type):
39 kw['features']=Utils.to_list(kw.get('features',[]))+Utils.to_list(sniff_features(**kw))
41 def program(bld,*k,**kw):
42 set_features(kw,'program')
45 def shlib(bld,*k,**kw):
46 set_features(kw,'shlib')
49 def stlib(bld,*k,**kw):
50 set_features(kw,'stlib')
53 def objects(bld,*k,**kw):
54 set_features(kw,'objects')