diff options
author | Chris Johns <chrisj@rtems.org> | 2015-05-20 17:45:16 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2015-05-20 17:45:16 +1000 |
commit | 5ba69495784a29ebc21811aedd37186556b263d0 (patch) | |
tree | 4a0c10b2703c6a1702c4e3672e74a58ebccc4ec6 /builder.py | |
parent | Makefile: Regenerate (diff) | |
download | rtems-libbsd-5ba69495784a29ebc21811aedd37186556b263d0.tar.bz2 |
Add support to build using waf.
Diffstat (limited to 'builder.py')
-rwxr-xr-x | builder.py | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -52,6 +52,58 @@ isDryRun = False isDiffMode = False filesProcessed = 0 +class error(Exception): + """Base class for exceptions.""" + def __init(self, msg): + self.msg = 'error: %s' % (msg) + def set_output(self, msg): + self.msg = msg + def __str__(self): + return self.msg + +def common_flags(): + return ['-O', + '-g', + '-fno-strict-aliasing', + '-ffreestanding', + '-fno-common'] + +def common_warnings(): + return ['-Wall', + '-Wno-format'] + +def common_no_warnings(): + return ['-Wno-implicit-function-declaration'] + +def includes(): + return ['-Irtemsbsd/include', + '-Ifreebsd/sys', + '-Ifreebsd/sys/contrib/altq', + '-Ifreebsd/sys/contrib/pf', + '-Ifreebsd/include', + '-Ifreebsd/lib/libc/include', + '-Ifreebsd/lib/libc/isc/include', + '-Ifreebsd/lib/libc/resolv', + '-Ifreebsd/lib/libutil', + '-Ifreebsd/lib/libkvm', + '-Ifreebsd/lib/libmemstat', + '-Ifreebsd/lib/libipsec', + '-Irtemsbsd/sys', + '-ImDNSResponder/mDNSCore', + '-ImDNSResponder/mDNSShared', + '-ImDNSResponder/mDNSPosix', + '-Itestsuite/include'] + +def cpu_includes(): + return ['-Irtemsbsd/@CPU@/include', + '-Ifreebsd/sys/@CPU@/include'] + +def cflags(): + return ['-std=gnu11'] + +def cxxflags(): + return ['-std=gnu++11'] + # compare and process file only if different # + copy or diff depending on execution mode def processIfDifferent(new, old, src): |