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