X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/b5d655f7532a546b54809da387f7467d128a756b..7b00c0c43f52e9d27168e67a26aac19065cdb40c:/Makefile.features diff --git a/Makefile.features b/Makefile.features index 19c7d29..56906a2 100644 --- a/Makefile.features +++ b/Makefile.features @@ -1,20 +1,38 @@ .include "Platforms/${RC_TARGET_CONFIG}/Makefile.inc" +# Have to use || to avoid warning message if && is used +.ifdef CCARCH +_BLOCKS != ${MYCC} -arch ${CCARCH} -E -dD -x c /dev/null | fgrep -q __BLOCKS__ || echo NO +.if ${_BLOCKS} != NO +FEATURE_BLOCKS = YES +.endif # _BLOCKS +.endif # CCARCH +_LIBCRASHREPORTERCLIENT_A = ${SDKROOT}/usr/local/lib/libCrashReporterClient.a +_LIBCRASHREPORTERCLIENT != test -f ${_LIBCRASHREPORTERCLIENT_A} || echo NO +.if ${_LIBCRASHREPORTERCLIENT} == NO +FEATURE_NO_LIBCRASHREPORTERCLIENT = YES +.endif # !_LIBCRASHREPORTERCLIENT + ${SYMROOTINC}/${MACHINE_ARCH}/libc-features.h: - mkdir -p ${.TARGET:H} - echo creating ${.TARGET} + ${MKDIR} ${.TARGET:H} + ${ECHO} creating ${.TARGET} @echo '#ifndef _LIBC_FEATURES_H_' > ${.TARGET} @echo '#define _LIBC_FEATURES_H_' >> ${.TARGET} @echo >> ${.TARGET} .ifdef FEATURE_LEGACY_RUNE_APIS - @echo '#define LEGACY_RUNE_APIS 1' >> ${.TARGET} + @echo '#define UNIFDEF_LEGACY_RUNE_APIS 1' >> ${.TARGET} +.else + @echo '/* #undef UNIFDEF_LEGACY_RUNE_APIS */' >> ${.TARGET} +.endif +.ifdef FEATURE_LEGACY_CRT1_ENVIRON + @echo '#define LEGACY_CRT1_ENVIRON 1' >> ${.TARGET} .else - @echo '/* #undef LEGACY_RUNE_APIS */' >> ${.TARGET} + @echo '/* #undef LEGACY_CRT1_ENVIRON */' >> ${.TARGET} .endif .ifdef FEATURE_LEGACY_UTMP_APIS - @echo '#define LEGACY_UTMP_APIS 1' >> ${.TARGET} + @echo '#define UNIFDEF_LEGACY_UTMP_APIS 1' >> ${.TARGET} .else - @echo '/* #undef LEGACY_UTMP_APIS */' >> ${.TARGET} + @echo '/* #undef UNIFDEF_LEGACY_UTMP_APIS */' >> ${.TARGET} .endif .ifdef FEATURE_MOVE_LOCALTIME @echo '#define UNIFDEF_MOVE_LOCALTIME 1' >> ${.TARGET} @@ -62,11 +80,6 @@ ${SYMROOTINC}/${MACHINE_ARCH}/libc-features.h: @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 1' >> ${.TARGET} @echo '#endif /* __DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET} .endif -.ifdef FEATURE_PATCH_3375657 - @echo '#define __APPLE_PR3375657_HACK__ 1' >> ${.TARGET} -.else - @echo '/* #undef __APPLE_PR3375657_HACK__ */' >> ${.TARGET} -.endif .ifdef FEATURE_PATCH_3417676 @echo '#define __APPLE_PR3417676_HACK__ 1' >> ${.TARGET} .else @@ -86,10 +99,20 @@ ${SYMROOTINC}/${MACHINE_ARCH}/libc-features.h: @echo '#define NOTIFY_TZ 1' >> ${.TARGET} .else @echo '/* #undef NOTIFY_TZ */' >> ${.TARGET} +.endif +.ifdef FEATURE_NO_LIBCRASHREPORTERCLIENT + @echo '#define LIBC_NO_LIBCRASHREPORTERCLIENT 1' >> ${.TARGET} +.else + @echo '/* #undef LIBC_NO_LIBCRASHREPORTERCLIENT */' >> ${.TARGET} .endif @echo >> ${.TARGET} @echo '#endif /* _LIBC_FEATURES_H_ */' >> ${.TARGET} +.ifdef FEATURE_BLOCKS +UNIFDEFARGS += -DUNIFDEF_BLOCKS +.else +UNIFDEFARGS += -UUNIFDEF_BLOCKS +.endif .ifdef FEATURE_LEGACY_64_APIS UNIFDEFARGS += -DUNIFDEF_LEGACY_64_APIS .else