1 2 Description := Target for Darwin using an Apple-style build. 3 4 Configs := Debug Release Profile Static 5 6 # We override this with RC_ARCHS because B&I may want to build on an ARCH we 7 # haven't explicitly defined support for. If all goes well, this will just work 8 # and the resulting lib will just have generic versions for anything unknown. 9 UniversalArchs := $(RC_ARCHS) 10 11 ifneq (,$(SDKROOT)) 12 override CC := $(shell xcrun -sdk $(SDKROOT) -find clang) 13 AR := $(shell xcrun -sdk $(SDKROOT) -find ar) 14 RANLIB := $(shell xcrun -sdk $(SDKROOT) -find ranlib) 15 STRIP := $(shell xcrun -sdk $(SDKROOT) -find strip) 16 LIPO := $(shell xcrun -sdk $(SDKROOT) -find lipo) 17 endif 18 19 ifneq ($(IPHONEOS_DEPLOYMENT_TARGET),) 20 DEPLOYMENT_FLAGS := -miphoneos-version-min=$(IPHONEOS_DEPLOYMENT_TARGET) 21 else 22 ifneq ($(MACOSX_DEPLOYMENT_TARGET),) 23 DEPLOYMENT_FLAGS := -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) 24 endif 25 endif 26 27 ifneq (,$(SDKROOT)) 28 DEPLOYMENT_FLAGS += -isysroot $(SDKROOT) 29 endif 30 31 CFLAGS := -Wall -Os -fomit-frame-pointer -g $(DEPLOYMENT_FLAGS) 32 CFLAGS.Static := $(CFLAGS) -static 33 DYLIB_FLAGS := $(DEPLOYMENT_FLAGS) \ 34 -Xarch_arm -Wl,-alias_list,$(SRCROOT)/lib/arm/softfloat-alias.list 35 36 VISIBILITY_HIDDEN := 0 37 VISIBILITY_HIDDEN.Static := 1 38 39 40 FUNCTIONS := absvdi2 absvsi2 addvdi3 addvsi3 ashldi3 ashrdi3 \ 41 clzdi2 clzsi2 cmpdi2 ctzdi2 ctzsi2 \ 42 divdc3 divdi3 divsc3 ffsdi2 \ 43 fixdfdi fixsfdi fixunsdfdi fixunsdfsi fixunssfdi \ 44 fixunssfsi floatdidf floatdisf floatundidf floatundisf \ 45 gcc_personality_v0 lshrdi3 moddi3 muldc3 muldi3 mulosi4 \ 46 mulodi4 muloti4 mulsc3 mulvdi3 mulvsi3 negdi2 negvdi2 negvsi2 \ 47 paritydi2 paritysi2 popcountdi2 popcountsi2 powidf2 \ 48 powisf2 subvdi3 subvsi3 ucmpdi2 udivdi3 \ 49 udivmoddi4 umoddi3 apple_versioning eprintf 50 51 FUNCTIONS.i386 := $(FUNCTIONS) \ 52 divxc3 fixunsxfdi fixunsxfsi fixxfdi floatdixf \ 53 floatundixf mulxc3 powixf2 clear_cache \ 54 enable_execute_stack 55 FUNCTIONS.ppc := $(FUNCTIONS) \ 56 divtc3 fixtfdi fixunstfdi floatditf floatunditf \ 57 gcc_qadd gcc_qdiv gcc_qmul gcc_qsub multc3 \ 58 powitf2 restFP saveFP trampoline_setup \ 59 clear_cache enable_execute_stack 60 FUNCTIONS.x86_64 := $(FUNCTIONS) \ 61 absvti2 addvti3 ashlti3 ashrti3 clzti2 cmpti2 \ 62 ctzti2 divti3 divxc3 ffsti2 fixdfti fixsfti \ 63 fixunsdfti fixunssfti fixunsxfdi fixunsxfsi \ 64 fixunsxfti fixxfdi fixxfti floatdixf floattidf \ 65 floattisf floattixf floatundixf floatuntidf \ 66 floatuntisf floatuntixf lshrti3 modti3 multi3 \ 67 muloti4 mulvti3 mulxc3 negti2 negvti2 parityti2 \ 68 popcountti2 powixf2 subvti3 ucmpti2 udivmodti4 \ 69 udivti3 umodti3 clear_cache enable_execute_stack 70 71 FUNCTIONS.armv4t := $(FUNCTIONS) 72 73 FUNCTIONS.armv5 := $(FUNCTIONS) \ 74 adddf3 addsf3 bswapdi2 bswapsi2 \ 75 comparedf2 comparesf2 extendsfdf2 \ 76 divdf3 divsf3 \ 77 fixdfsi fixsfsi fixunsdfsi fixunssfsi \ 78 floatsidf floatsisf floatunsidf floatunsisf \ 79 muldf3 mulsf3 \ 80 negdf2 negsf2 \ 81 truncdfsf2 \ 82 modsi3 umodsi3 udivsi3 divsi3 udivmodsi4 divmodsi4 \ 83 switch8 switchu8 switch16 switch32 \ 84 sync_synchronize 85 86 FUNCTIONS.armv6 := $(FUNCTIONS) \ 87 comparedf2 comparesf2 \ 88 adddf3vfp addsf3vfp bswapdi2 bswapsi2 divdf3vfp \ 89 divsf3vfp eqdf2vfp eqsf2vfp extendsfdf2vfp \ 90 fixdfsivfp fixsfsivfp fixunsdfsivfp fixunssfsivfp \ 91 floatsidfvfp floatsisfvfp floatunssidfvfp floatunssisfvfp \ 92 gedf2vfp gesf2vfp gtdf2vfp gtsf2vfp \ 93 ledf2vfp lesf2vfp ltdf2vfp ltsf2vfp \ 94 muldf3vfp mulsf3vfp \ 95 nedf2vfp nesf2vfp \ 96 subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \ 97 modsi3 umodsi3 udivsi3 divsi3 udivmodsi4 divmodsi4 \ 98 switch8 switchu8 switch16 switch32 \ 99 restore_vfp_d8_d15_regs save_vfp_d8_d15_regs \ 100 sync_synchronize 101 102 FUNCTIONS.armv7 := $(FUNCTIONS) \ 103 comparedf2 comparesf2 \ 104 adddf3vfp addsf3vfp bswapdi2 bswapsi2 divdf3vfp \ 105 divsf3vfp eqdf2vfp eqsf2vfp extendsfdf2vfp \ 106 fixdfsivfp fixsfsivfp fixunsdfsivfp fixunssfsivfp \ 107 floatsidfvfp floatsisfvfp floatunssidfvfp floatunssisfvfp \ 108 gedf2vfp gesf2vfp gtdf2vfp gtsf2vfp \ 109 ledf2vfp lesf2vfp ltdf2vfp ltsf2vfp \ 110 muldf3vfp mulsf3vfp \ 111 nedf2vfp nesf2vfp \ 112 subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \ 113 modsi3 umodsi3 udivsi3 divsi3 udivmodsi4 divmodsi4 114