blob: c4698e910a4323e441b1f2062951c6b77f8aee35 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001# avoids build breaks when using no-static-libs.inc
2DISABLE_STATIC = ""
3
Brad Bishop6e60e8b2018-02-01 10:27:11 -05004EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
5
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05006def get_waf_parallel_make(d):
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007 pm = d.getVar('PARALLEL_MAKE')
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05008 if pm:
9 # look for '-j' and throw other options (e.g. '-l') away
10 # because they might have different meaning in bjam
11 pm = pm.split()
12 while pm:
13 v = None
14 opt = pm.pop(0)
15 if opt == '-j':
16 v = pm.pop(0)
17 elif opt.startswith('-j'):
18 v = opt[2:].strip()
19 else:
20 v = None
21
22 if v:
23 v = min(64, int(v))
24 return '-j' + str(v)
25
26 return ""
27
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028waf_do_configure() {
29 ${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF}
30}
31
32waf_do_compile() {
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050033 ${S}/waf build ${@get_waf_parallel_make(d)}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034}
35
36waf_do_install() {
37 ${S}/waf install --destdir=${D}
38}
39
40EXPORT_FUNCTIONS do_configure do_compile do_install