]>
Commit | Line | Data |
---|---|---|
2fbbb8fa | 1 | #!/bin/bash -x |
bdffa7b9 A |
2 | |
3 | if [ $# -ne 3 ]; then | |
4 | echo "Usage: $0 <dstroot> <action> <variants>" 1>&2 | |
5 | exit 1 | |
6 | fi | |
7 | ||
b8ce8438 A |
8 | if [[ "${DRIVERKIT}" == "1" ]]; then exit 0; fi; # No compatibility symlinks in DriverKit SDK |
9 | ||
2fbbb8fa | 10 | DSTROOT="$1${INSTALL_PATH_PREFIX}" |
bdffa7b9 A |
11 | ACTION="$2" |
12 | VARIANTS="$3" | |
13 | ||
14 | BSD_LIBS="c info m pthread dbm poll dl rpcsvc proc" | |
15 | ||
a85a94cf A |
16 | if [[ "${PLATFORM_NAME}" =~ macosx ]]; then |
17 | BSD_LIBS="${BSD_LIBS} gcc_s.1" | |
18 | fi | |
19 | ||
bdffa7b9 A |
20 | mkdir -p "${DSTROOT}/usr/lib" || exit 1 |
21 | ||
22 | if [ "${ACTION}" != "installhdrs" ]; then | |
23 | for variant in ${VARIANTS}; do | |
24 | suffix="" | |
25 | if [ ${variant} != "normal" ]; then | |
26 | suffix="_${variant}" | |
27 | fi | |
28 | ||
a85a94cf | 29 | ln -sf "libSystem.B${suffix}.dylib" "${DSTROOT}/usr/lib/libSystem${suffix}.dylib" || exit 1 |
2fbbb8fa | 30 | |
bdffa7b9 A |
31 | for i in ${BSD_LIBS}; do |
32 | ln -sf "libSystem.dylib" "${DSTROOT}/usr/lib/lib${i}.dylib" || exit 1 | |
33 | done | |
34 | done | |
35 | fi |