2020-03-27 10:08:22 +01:00
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
2020-05-30 20:50:44 +02:00
|
|
|
{ genodeSources, symlinkJoin }:
|
2020-03-27 10:08:22 +01:00
|
|
|
|
2020-05-27 14:23:50 +02:00
|
|
|
symlinkJoin {
|
2020-05-07 21:33:26 +02:00
|
|
|
name = "posix";
|
2020-05-27 14:23:50 +02:00
|
|
|
paths = map genodeSources.depot [ "libc" "posix" ];
|
|
|
|
postBuild = ''
|
2020-05-07 21:33:26 +02:00
|
|
|
local headerDir="''${!outputDev}/include"
|
|
|
|
mkdir -p "$headerDir"
|
|
|
|
pushd ${genodeSources.ports.libc}/*
|
2020-03-27 10:08:22 +01:00
|
|
|
cp -r \
|
|
|
|
include/libc/* \
|
|
|
|
include/openlibm/* \
|
2020-05-27 14:23:50 +02:00
|
|
|
${genodeSources}/repos/libports/include/libc \
|
2020-05-07 21:33:26 +02:00
|
|
|
"$headerDir"
|
2020-03-27 10:08:22 +01:00
|
|
|
for spec in ${toString genodeSources.specs}; do
|
|
|
|
dir=include/spec/$spec/libc
|
|
|
|
if [ -d $dir ]; then
|
2020-05-07 21:33:26 +02:00
|
|
|
cp -r $dir/* "$headerDir"
|
2020-03-27 10:08:22 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
popd
|
2020-03-24 13:47:30 +01:00
|
|
|
'';
|
2020-03-27 10:08:22 +01:00
|
|
|
}
|