]>
Commit | Line | Data |
---|---|---|
b5d655f7 A |
1 | .include "Platforms/${RC_TARGET_CONFIG}/Makefile.inc" |
2 | ||
34e8f829 A |
3 | # Have to use || to avoid warning message if && is used |
4 | .ifdef CCARCH | |
5 | _BLOCKS != ${MYCC} -arch ${CCARCH} -E -dD -x c /dev/null | fgrep -q __BLOCKS__ || echo NO | |
6 | .if ${_BLOCKS} != NO | |
7 | FEATURE_BLOCKS = YES | |
8 | .endif # _BLOCKS | |
9 | .endif # CCARCH | |
1f2f436a A |
10 | _LIBCRASHREPORTERCLIENT_A = ${SDKROOT}/usr/local/lib/libCrashReporterClient.a |
11 | _LIBCRASHREPORTERCLIENT != test -f ${_LIBCRASHREPORTERCLIENT_A} || echo NO | |
12 | .if ${_LIBCRASHREPORTERCLIENT} == NO | |
13 | FEATURE_NO_LIBCRASHREPORTERCLIENT = YES | |
14 | .endif # !_LIBCRASHREPORTERCLIENT | |
34e8f829 | 15 | |
b5d655f7 | 16 | ${SYMROOTINC}/${MACHINE_ARCH}/libc-features.h: |
34e8f829 A |
17 | ${MKDIR} ${.TARGET:H} |
18 | ${ECHO} creating ${.TARGET} | |
b5d655f7 A |
19 | @echo '#ifndef _LIBC_FEATURES_H_' > ${.TARGET} |
20 | @echo '#define _LIBC_FEATURES_H_' >> ${.TARGET} | |
21 | @echo >> ${.TARGET} | |
22 | .ifdef FEATURE_LEGACY_RUNE_APIS | |
1f2f436a | 23 | @echo '#define UNIFDEF_LEGACY_RUNE_APIS 1' >> ${.TARGET} |
b5d655f7 | 24 | .else |
1f2f436a A |
25 | @echo '/* #undef UNIFDEF_LEGACY_RUNE_APIS */' >> ${.TARGET} |
26 | .endif | |
27 | .ifdef FEATURE_LEGACY_CRT1_ENVIRON | |
28 | @echo '#define LEGACY_CRT1_ENVIRON 1' >> ${.TARGET} | |
29 | .else | |
30 | @echo '/* #undef LEGACY_CRT1_ENVIRON */' >> ${.TARGET} | |
b5d655f7 A |
31 | .endif |
32 | .ifdef FEATURE_LEGACY_UTMP_APIS | |
1f2f436a | 33 | @echo '#define UNIFDEF_LEGACY_UTMP_APIS 1' >> ${.TARGET} |
b5d655f7 | 34 | .else |
1f2f436a | 35 | @echo '/* #undef UNIFDEF_LEGACY_UTMP_APIS */' >> ${.TARGET} |
b5d655f7 A |
36 | .endif |
37 | .ifdef FEATURE_MOVE_LOCALTIME | |
38 | @echo '#define UNIFDEF_MOVE_LOCALTIME 1' >> ${.TARGET} | |
39 | .else | |
40 | @echo '/* #undef UNIFDEF_MOVE_LOCALTIME */' >> ${.TARGET} | |
41 | .endif | |
42 | .ifdef FEATURE_ONLY_LONG_DOUBLE_IS_DOUBLE | |
43 | @echo '#if !__DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET} | |
44 | @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET} | |
45 | @echo '#endif /* !__DARWIN_LONG_DOUBLE_IS_DOUBLE */' >> ${.TARGET} | |
46 | @echo '#define LDBL_COMPAT 1' >> ${.TARGET} | |
47 | .else | |
48 | @echo '#if __DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET} | |
49 | @echo '# if !defined(LDBL_COMPAT)' >> ${.TARGET} | |
50 | @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 1' >> ${.TARGET} | |
51 | @echo '# endif /* !LDBL_COMPAT */' >> ${.TARGET} | |
52 | @echo '#elif defined(LDBL_COMPAT)' >> ${.TARGET} | |
53 | @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET} | |
54 | @echo '#endif /* LDBL_COMPAT */' >> ${.TARGET} | |
55 | .endif | |
56 | .ifdef FEATURE_ONLY_1050_VARIANTS | |
57 | @echo '#if !__DARWIN_ONLY_VERS_1050' >> ${.TARGET} | |
58 | @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 0' >> ${.TARGET} | |
59 | @echo '#endif /* !__DARWIN_ONLY_VERS_1050 */' >> ${.TARGET} | |
60 | .else | |
61 | @echo '#if __DARWIN_ONLY_VERS_1050' >> ${.TARGET} | |
62 | @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 1' >> ${.TARGET} | |
63 | @echo '#endif /* __DARWIN_ONLY_VERS_1050 */' >> ${.TARGET} | |
64 | .endif | |
65 | .ifdef FEATURE_ONLY_UNIX_CONFORMANCE | |
66 | @echo '#if !__DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET} | |
67 | @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 0' >> ${.TARGET} | |
68 | @echo '#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET} | |
69 | .else | |
70 | @echo '#if __DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET} | |
71 | @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 1' >> ${.TARGET} | |
72 | @echo '#endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET} | |
73 | .endif | |
74 | .ifdef FEATURE_ONLY_64_BIT_INO_T | |
75 | @echo '#if !__DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET} | |
76 | @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 0' >> ${.TARGET} | |
77 | @echo '#endif /* !__DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET} | |
78 | .else | |
79 | @echo '#if __DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET} | |
80 | @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 1' >> ${.TARGET} | |
81 | @echo '#endif /* __DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET} | |
82 | .endif | |
b5d655f7 A |
83 | .ifdef FEATURE_PATCH_3417676 |
84 | @echo '#define __APPLE_PR3417676_HACK__ 1' >> ${.TARGET} | |
85 | .else | |
86 | @echo '/* #undef __APPLE_PR3417676_HACK__ */' >> ${.TARGET} | |
87 | .endif | |
88 | .ifdef FEATURE_PATCH_5243343 | |
89 | @echo '#define PR_5243343 1' >> ${.TARGET} | |
90 | .else | |
91 | @echo '/* #undef PR_5243343 */' >> ${.TARGET} | |
92 | .endif | |
93 | .ifdef FEATURE_PLOCKSTAT | |
94 | @echo '#define PLOCKSTAT 1' >> ${.TARGET} | |
95 | .else | |
96 | @echo '/* #undef PLOCKSTAT */' >> ${.TARGET} | |
97 | .endif | |
98 | .ifdef FEATURE_TIMEZONE_CHANGE_NOTIFICATION | |
99 | @echo '#define NOTIFY_TZ 1' >> ${.TARGET} | |
100 | .else | |
101 | @echo '/* #undef NOTIFY_TZ */' >> ${.TARGET} | |
1f2f436a A |
102 | .endif |
103 | .ifdef FEATURE_NO_LIBCRASHREPORTERCLIENT | |
104 | @echo '#define LIBC_NO_LIBCRASHREPORTERCLIENT 1' >> ${.TARGET} | |
105 | .else | |
106 | @echo '/* #undef LIBC_NO_LIBCRASHREPORTERCLIENT */' >> ${.TARGET} | |
b5d655f7 A |
107 | .endif |
108 | @echo >> ${.TARGET} | |
109 | @echo '#endif /* _LIBC_FEATURES_H_ */' >> ${.TARGET} | |
110 | ||
34e8f829 A |
111 | .ifdef FEATURE_BLOCKS |
112 | UNIFDEFARGS += -DUNIFDEF_BLOCKS | |
113 | .else | |
114 | UNIFDEFARGS += -UUNIFDEF_BLOCKS | |
115 | .endif | |
b5d655f7 A |
116 | .ifdef FEATURE_LEGACY_64_APIS |
117 | UNIFDEFARGS += -DUNIFDEF_LEGACY_64_APIS | |
118 | .else | |
119 | UNIFDEFARGS += -UUNIFDEF_LEGACY_64_APIS | |
120 | .endif | |
121 | .ifdef FEATURE_LEGACY_RUNE_APIS | |
122 | UNIFDEFARGS += -DUNIFDEF_LEGACY_RUNE_APIS | |
123 | .else | |
124 | UNIFDEFARGS += -UUNIFDEF_LEGACY_RUNE_APIS | |
125 | .endif | |
126 | .ifdef FEATURE_LEGACY_UTMP_APIS | |
127 | UNIFDEFARGS += -DUNIFDEF_LEGACY_UTMP_APIS | |
128 | .else | |
129 | UNIFDEFARGS += -UUNIFDEF_LEGACY_UTMP_APIS | |
130 | .endif | |
131 | .ifdef FEATURE_MOVE_LOCALTIME | |
132 | UNIFDEFARGS += -DUNIFDEF_MOVE_LOCALTIME | |
133 | .else | |
134 | UNIFDEFARGS += -UUNIFDEF_MOVE_LOCALTIME | |
135 | .endif |