PostConfig.pp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // This file is included after including all of $DTOOL/Config.pp and
  2. // the user's personal Config.pp file. It makes decisions necessary
  3. // following the user's Config settings.
  4. #if $[and $[OSX_PLATFORM],$[BUILD_IPHONE]]
  5. //#define IPH_PLATFORM iPhoneSimulator
  6. #define IPH_PLATFORM $[BUILD_IPHONE]
  7. #define IPH_VERSION 2.0
  8. #if $[eq $[IPH_PLATFORM], iPhoneOS]
  9. #define ARCH_FLAGS -arch armv6 -mcpu=arm1176jzf-s
  10. #define osflags -fpascal-strings -fasm-blocks -miphoneos-version-min=2.0
  11. #define DEBUGFLAGS -gdwarf-2
  12. //#define DEBUGFLAGS
  13. #elif $[eq $[IPH_PLATFORM], iPhoneSimulator]
  14. #define ARCH_FLAGS -arch i386
  15. #define osflags -fpascal-strings -fasm-blocks -mmacosx-version-min=10.5
  16. #define DEBUGFLAGS -gdwarf-2
  17. #else
  18. #error Inappropriate value for BUILD_IPHONE.
  19. #endif
  20. #define dev /Developer/Platforms/$[IPH_PLATFORM].platform/Developer
  21. #define env env MACOSX_DEPLOYMENT_TARGET=10.5 PATH="$[dev]/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
  22. #define CC $[env] $[dev]/usr/bin/gcc-4.0
  23. #define CXX $[env] $[dev]/usr/bin/g++-4.0
  24. #define OSX_CDEFS __IPHONE_OS_VERSION_MIN_REQUIRED=20000
  25. #define OSX_CFLAGS -isysroot $[dev]/SDKs/$[IPH_PLATFORM]$[IPH_VERSION].sdk $[osflags]
  26. #defer ODIR_SUFFIX -$[IPH_PLATFORM]
  27. #endif
  28. #if $[eq $[PLATFORM], Android]
  29. // These are the flags also used by Android's own ndk-build.
  30. #if $[eq $[ANDROID_ARCH],arm]
  31. #define target_cflags\
  32. -fpic\
  33. -ffunction-sections\
  34. -funwind-tables\
  35. -fstack-protector\
  36. -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__\
  37. -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__
  38. #elif $[eq $[ANDROID_ARCH],mips]
  39. #define target_cflags\
  40. -fpic\
  41. -fno-strict-aliasing\
  42. -finline-functions\
  43. -ffunction-sections\
  44. -funwind-tables\
  45. -fmessage-length=0\
  46. -fno-inline-functions-called-once\
  47. -fgcse-after-reload\
  48. -frerun-cse-after-loop\
  49. -frename-registers
  50. #elif $[eq $[ANDROID_ABI],x86]
  51. #define target_cflags\
  52. -ffunction-sections\
  53. -funwind-tables\
  54. -fstack-protector
  55. #endif
  56. #if $[eq $[ANDROID_ABI],armeabi-v7a]
  57. #define target_cflags $[target_cflags]\
  58. -march=armv7-a \
  59. -mfloat-abi=softfp \
  60. -mfpu=vfpv3-d16
  61. #define target_ldflags $[target_ldflags]\
  62. -march=armv7-a \
  63. -Wl,--fix-cortex-a8
  64. #elif $[eq $[ANDROID_ABI],armeabi]
  65. #define target_cflags $[target_cflags]\
  66. -march=armv5te \
  67. -mtune=xscale \
  68. -msoft-float
  69. #endif
  70. #define ANDROID_CFLAGS $[target_cflags] $[ANDROID_CFLAGS]
  71. #define ANDROID_LDFLAGS $[target_ldflags] $[ANDROID_LDFLAGS]
  72. #endif