]> git.saurik.com Git - apple/libc.git/blob - Makefile.features
Libc-583.tar.gz
[apple/libc.git] / Makefile.features
1 .include "Platforms/${RC_TARGET_CONFIG}/Makefile.inc"
2
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
10
11 ${SYMROOTINC}/${MACHINE_ARCH}/libc-features.h:
12 ${MKDIR} ${.TARGET:H}
13 ${ECHO} creating ${.TARGET}
14 @echo '#ifndef _LIBC_FEATURES_H_' > ${.TARGET}
15 @echo '#define _LIBC_FEATURES_H_' >> ${.TARGET}
16 @echo >> ${.TARGET}
17 .ifdef FEATURE_LEGACY_RUNE_APIS
18 @echo '#define LEGACY_RUNE_APIS 1' >> ${.TARGET}
19 .else
20 @echo '/* #undef LEGACY_RUNE_APIS */' >> ${.TARGET}
21 .endif
22 .ifdef FEATURE_LEGACY_UTMP_APIS
23 @echo '#define LEGACY_UTMP_APIS 1' >> ${.TARGET}
24 .else
25 @echo '/* #undef LEGACY_UTMP_APIS */' >> ${.TARGET}
26 .endif
27 .ifdef FEATURE_MOVE_LOCALTIME
28 @echo '#define UNIFDEF_MOVE_LOCALTIME 1' >> ${.TARGET}
29 .else
30 @echo '/* #undef UNIFDEF_MOVE_LOCALTIME */' >> ${.TARGET}
31 .endif
32 .ifdef FEATURE_ONLY_LONG_DOUBLE_IS_DOUBLE
33 @echo '#if !__DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET}
34 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET}
35 @echo '#endif /* !__DARWIN_LONG_DOUBLE_IS_DOUBLE */' >> ${.TARGET}
36 @echo '#define LDBL_COMPAT 1' >> ${.TARGET}
37 .else
38 @echo '#if __DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET}
39 @echo '# if !defined(LDBL_COMPAT)' >> ${.TARGET}
40 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 1' >> ${.TARGET}
41 @echo '# endif /* !LDBL_COMPAT */' >> ${.TARGET}
42 @echo '#elif defined(LDBL_COMPAT)' >> ${.TARGET}
43 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET}
44 @echo '#endif /* LDBL_COMPAT */' >> ${.TARGET}
45 .endif
46 .ifdef FEATURE_ONLY_1050_VARIANTS
47 @echo '#if !__DARWIN_ONLY_VERS_1050' >> ${.TARGET}
48 @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 0' >> ${.TARGET}
49 @echo '#endif /* !__DARWIN_ONLY_VERS_1050 */' >> ${.TARGET}
50 .else
51 @echo '#if __DARWIN_ONLY_VERS_1050' >> ${.TARGET}
52 @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 1' >> ${.TARGET}
53 @echo '#endif /* __DARWIN_ONLY_VERS_1050 */' >> ${.TARGET}
54 .endif
55 .ifdef FEATURE_ONLY_UNIX_CONFORMANCE
56 @echo '#if !__DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET}
57 @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 0' >> ${.TARGET}
58 @echo '#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET}
59 .else
60 @echo '#if __DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET}
61 @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 1' >> ${.TARGET}
62 @echo '#endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET}
63 .endif
64 .ifdef FEATURE_ONLY_64_BIT_INO_T
65 @echo '#if !__DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET}
66 @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 0' >> ${.TARGET}
67 @echo '#endif /* !__DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET}
68 .else
69 @echo '#if __DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET}
70 @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 1' >> ${.TARGET}
71 @echo '#endif /* __DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET}
72 .endif
73 .ifdef FEATURE_PATCH_3375657
74 @echo '#define __APPLE_PR3375657_HACK__ 1' >> ${.TARGET}
75 .else
76 @echo '/* #undef __APPLE_PR3375657_HACK__ */' >> ${.TARGET}
77 .endif
78 .ifdef FEATURE_PATCH_3417676
79 @echo '#define __APPLE_PR3417676_HACK__ 1' >> ${.TARGET}
80 .else
81 @echo '/* #undef __APPLE_PR3417676_HACK__ */' >> ${.TARGET}
82 .endif
83 .ifdef FEATURE_PATCH_5243343
84 @echo '#define PR_5243343 1' >> ${.TARGET}
85 .else
86 @echo '/* #undef PR_5243343 */' >> ${.TARGET}
87 .endif
88 .ifdef FEATURE_PLOCKSTAT
89 @echo '#define PLOCKSTAT 1' >> ${.TARGET}
90 .else
91 @echo '/* #undef PLOCKSTAT */' >> ${.TARGET}
92 .endif
93 .ifdef FEATURE_TIMEZONE_CHANGE_NOTIFICATION
94 @echo '#define NOTIFY_TZ 1' >> ${.TARGET}
95 .else
96 @echo '/* #undef NOTIFY_TZ */' >> ${.TARGET}
97 .endif
98 @echo >> ${.TARGET}
99 @echo '#endif /* _LIBC_FEATURES_H_ */' >> ${.TARGET}
100
101 .ifdef FEATURE_BLOCKS
102 UNIFDEFARGS += -DUNIFDEF_BLOCKS
103 .else
104 UNIFDEFARGS += -UUNIFDEF_BLOCKS
105 .endif
106 .ifdef FEATURE_LEGACY_64_APIS
107 UNIFDEFARGS += -DUNIFDEF_LEGACY_64_APIS
108 .else
109 UNIFDEFARGS += -UUNIFDEF_LEGACY_64_APIS
110 .endif
111 .ifdef FEATURE_LEGACY_RUNE_APIS
112 UNIFDEFARGS += -DUNIFDEF_LEGACY_RUNE_APIS
113 .else
114 UNIFDEFARGS += -UUNIFDEF_LEGACY_RUNE_APIS
115 .endif
116 .ifdef FEATURE_LEGACY_UTMP_APIS
117 UNIFDEFARGS += -DUNIFDEF_LEGACY_UTMP_APIS
118 .else
119 UNIFDEFARGS += -UUNIFDEF_LEGACY_UTMP_APIS
120 .endif
121 .ifdef FEATURE_MOVE_LOCALTIME
122 UNIFDEFARGS += -DUNIFDEF_MOVE_LOCALTIME
123 .else
124 UNIFDEFARGS += -UUNIFDEF_MOVE_LOCALTIME
125 .endif