]>
Commit | Line | Data |
---|---|---|
ebf6f434 A |
1 | #!/bin/bash |
2 | ||
3 | echo "" > ${DERIVED_FILE_DIR}/configure.h | |
4 | ||
5 | if [ -n "${IPHONEOS_DEPLOYMENT_TARGET}" ]; then | |
6 | echo "#define DEFAULT_IPHONEOS_MIN_VERSION \"${IPHONEOS_DEPLOYMENT_TARGET}\"" >> ${DERIVED_FILE_DIR}/configure.h | |
7 | else | |
8 | if [ -n "${MACOSX_DEPLOYMENT_TARGET}" ]; then | |
9 | echo "#define DEFAULT_MACOSX_MIN_VERSION \"${MACOSX_DEPLOYMENT_TARGET}\"" >> ${DERIVED_FILE_DIR}/configure.h | |
10 | fi | |
11 | fi | |
12 | ||
13 | if [ -z "${RC_SUPPORTED_ARCHS}" ]; then | |
ba348e21 | 14 | RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64" |
ebf6f434 A |
15 | fi |
16 | ||
17 | for ANARCH in ${RC_SUPPORTED_ARCHS} | |
18 | do | |
0a8dc3df A |
19 | KNOWN_ARCHS=",armv4t,armv5,armv6,armv7,armv7f,armv7k,armv7s,armv6m,armv7m,armv7em,armv8,arm64,arm64v8,i386,x86_64,x86_64h," |
20 | FOUND=`echo "$KNOWN_ARCHS" | grep ",$ANARCH,"` | |
ebf6f434 A |
21 | if [ $FOUND ]; then |
22 | echo "#define SUPPORT_ARCH_$ANARCH 1" >> ${DERIVED_FILE_DIR}/configure.h | |
23 | else | |
f80fe69f | 24 | echo "#error unknown architecture: $ANARCH" >> ${DERIVED_FILE_DIR}/configure.h |
ebf6f434 A |
25 | fi |
26 | done | |
27 | ||
eaf282aa A |
28 | if [ -n "${RC_HIDE_TIDE}" ]; then |
29 | echo "#define ALL_SUPPORTED_ARCHS \"${RC_SUPPORTED_ARCHS}\"" >> ${DERIVED_FILE_DIR}/configure.h | |
30 | echo "#define SUPPORT_APPLE_TV 0" >> ${DERIVED_FILE_DIR}/configure.h | |
31 | else | |
32 | if [ -n "${DT_VARIANT}" -a "${DT_VARIANT}" != "PONDEROSA" ]; then | |
33 | echo "#define ALL_SUPPORTED_ARCHS \"${RC_SUPPORTED_ARCHS}\"" >> ${DERIVED_FILE_DIR}/configure.h | |
34 | echo "#define SUPPORT_APPLE_TV 0" >> ${DERIVED_FILE_DIR}/configure.h | |
35 | else | |
36 | echo "#define ALL_SUPPORTED_ARCHS \"${RC_SUPPORTED_ARCHS} (tvOS)\"" >> ${DERIVED_FILE_DIR}/configure.h | |
37 | echo "#define SUPPORT_APPLE_TV 1" >> ${DERIVED_FILE_DIR}/configure.h | |
38 | fi | |
39 | fi | |
ebf6f434 | 40 | |
eaf282aa A |
41 | if [ -f "${DT_TOOLCHAIN_DIR}/usr/lib/libswiftDemangle.dylib" ]; then |
42 | echo "-Wl,-lazy_library,${DT_TOOLCHAIN_DIR}/usr/lib/libswiftDemangle.dylib" > ${DERIVED_FILE_DIR}/linkExtras | |
43 | echo "#define DEMANGLE_SWIFT 1" >> ${DERIVED_FILE_DIR}/configure.h | |
44 | else | |
45 | echo "" > ${DERIVED_FILE_DIR}/linkExtras | |
46 | fi | |
ebf6f434 | 47 | |
eaf282aa | 48 | echo "#define BITCODE_XAR_VERSION \"1.0\"" >> ${DERIVED_FILE_DIR}/configure.h |
bee7e226 A |
49 | |
50 | if [ -n "${RC_ProjectSourceVersion}" ]; then | |
51 | echo "#define LD64_VERSION_NUM ${RC_ProjectSourceVersion}" >> ${DERIVED_FILE_DIR}/configure.h | |
52 | else | |
53 | echo "#define LD64_VERSION_NUM 0" >> ${DERIVED_FILE_DIR}/configure.h | |
54 | fi |