From 2241e79e435d93f7bbf3c8a4595f3f1767ce080c Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Tue, 12 Jul 2022 10:25:25 -0500 Subject: Ensure that liblwip.a and headers get installed --- lwip.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lwip.py b/lwip.py index d22c03a..f565deb 100644 --- a/lwip.py +++ b/lwip.py @@ -137,6 +137,20 @@ def build(bld): target = 'lwip', cflags='-g -Wall -O0', use=['lwip_obj', 'driver_obj']) + bld.install_files("${PREFIX}/" + arch_lib_path, ["liblwip.a"]) + + def install_headers(root_path): + for root, dirs, files in os.walk(root_path): + for name in files: + ext = os.path.splitext(name)[1] + src_root = os.path.split(root) + path = os.path.join(src_root[0], src_root[1]) + if ext == '.h': + subpath = path.removeprefix(root_path).removeprefix("/") + bld.install_files("${PREFIX}/" + arch_lib_path + "/include/" + subpath, + os.path.join(path,name)) + + [install_headers(path) for path in (drv_incl + common_includes).split(' ')[:-1]] bld.program(features='c', target='networking01.exe', -- cgit v1.2.3