12
12
ProjObjRoot := $(ProjSrcRoot )
13
13
endif
14
14
15
+ ifeq (,$(SDKROOT ) )
16
+ INSTALL_TARGET = install-MacOSX
17
+ else
18
+ INSTALL_TARGET = install-iPhoneOS
19
+ endif
20
+
21
+
15
22
# Log full compile lines in B&I logs and omit summary lines.
16
23
Verb :=
17
24
Summary := @true
@@ -27,8 +34,10 @@ installsrc:
27
34
cp -r . $(SRCROOT )
28
35
29
36
37
+ install : $(INSTALL_TARGET )
38
+
30
39
# Copy results to DSTROOT.
31
- install : $(SYMROOT ) /libcompiler_rt.dylib
40
+ install-MacOSX : $(SYMROOT ) /libcompiler_rt.dylib
32
41
mkdir -p $(DSTROOT ) /usr/lib/system
33
42
strip -S $(SYMROOT ) /libcompiler_rt.dylib \
34
43
-o $(DSTROOT ) /usr/lib/system/libcompiler_rt.dylib
@@ -47,6 +56,29 @@ $(OBJROOT)/libcompiler_rt-%.dylib : $(OBJROOT)/darwin_bni/Release/%/libcompiler_
47
56
48
57
# Rule to make fat dylib
49
58
$(SYMROOT ) /libcompiler_rt.dylib : $(foreach arch,$(RC_ARCHS ) , \
50
- $(OBJROOT ) /libcompiler_rt-$(arch ) .dylib)
59
+ $(OBJROOT ) /libcompiler_rt-$(arch ) .dylib)
60
+ lipo -create $^ -o $@
61
+
62
+
63
+
64
+
65
+ # Copy results to DSTROOT.
66
+ install-iPhoneOS : $(SYMROOT ) /libcompiler_rt.a $(SYMROOT ) /libcompiler_rt-static.a
67
+ mkdir -p $(DSTROOT ) /$(SDKROOT ) /usr/local/lib/libgcc
68
+ cp $(SYMROOT ) /libcompiler_rt.a \
69
+ $(DSTROOT ) /$(SDKROOT ) /usr/local/lib/libgcc/libcompiler_rt.a
70
+ mkdir -p $(DSTROOT ) /$(SDKROOT ) /usr/local/
71
+ cp $(SYMROOT ) /libcompiler_rt-static.a \
72
+ $(DSTROOT ) /$(SDKROOT ) /usr/local/lib/libcompiler_rt-static.a
73
+
74
+
75
+ # Rule to make fat archive
76
+ $(SYMROOT ) /libcompiler_rt.a : $(foreach arch,$(RC_ARCHS ) , \
77
+ $(OBJROOT ) /darwin_bni/Release/$(arch ) /libcompiler_rt.a)
78
+ lipo -create $^ -o $@
79
+
80
+ # Rule to make fat archive
81
+ $(SYMROOT ) /libcompiler_rt-static.a : $(foreach arch,$(RC_ARCHS ) , \
82
+ $(OBJROOT ) /darwin_bni/Static/$(arch ) /libcompiler_rt.a)
51
83
lipo -create $^ -o $@
52
84
0 commit comments