|
40 | 40 | <Compile Include="java-interop-mono.c" /> |
41 | 41 | <Compile Include="java-interop-gc-bridge-mono.c" /> |
42 | 42 | </ItemGroup> |
43 | | - <ItemGroup> |
44 | | - <MacLibLipo Include="obj\lib$(OutputName)-m32.dylib"> |
45 | | - <Arch>-m32</Arch> |
46 | | - </MacLibLipo> |
47 | | - <MacLibLipo Include="obj\lib$(OutputName)-m64.dylib"> |
48 | | - <Arch>-m64</Arch> |
49 | | - </MacLibLipo> |
50 | | - </ItemGroup> |
51 | 43 | <PropertyGroup> |
52 | 44 | <BuildDependsOn> |
53 | 45 | BuildJni_c; |
|
66 | 58 | <MakeDir Directories="$(OutputPath)" /> |
67 | 59 | <Exec Command="$(Runtime) "$(JNIEnvGenPath)\jnienv-gen.exe" jni.g.cs jni.c" /> |
68 | 60 | </Target> |
| 61 | + <PropertyGroup> |
| 62 | + <_MacLib>$(OutputPath)\lib$(OutputName).dylib</_MacLib> |
| 63 | + </PropertyGroup> |
69 | 64 | <Target Name="BuildMac" |
70 | | - Condition=" '$(OS)' != 'Windows_NT' And Exists ('/Library/Frameworks/')" |
71 | | - DependsOnTargets="BuildMacLibraries" |
72 | | - Inputs="@(MacLibLipo)" |
73 | | - Outputs="$(OutputPath)\lib$(OutputName).dylib"> |
74 | | - <PropertyGroup> |
75 | | - <_Files>@(MacLibLipo -> '%(Identity)', ' ')</_Files> |
76 | | - </PropertyGroup> |
77 | | - <Message Text="Inputs: MacLibLipo=@(MacLibLipo)" /> |
78 | | - <Exec Command="lipo $(_Files) -create -output $(OutputPath)\lib$(OutputName).dylib" /> |
79 | | - </Target> |
80 | | - <Target Name="BuildMacLibraries" |
81 | 65 | Condition=" '$(OS)' != 'Windows_NT' And Exists ('/Library/Frameworks/')" |
82 | 66 | Inputs="@(Compile)" |
83 | | - Outputs="@(MacLibLipo)"> |
| 67 | + Outputs="$(_MacLib)"> |
84 | 68 | <PropertyGroup> |
85 | 69 | <_FixedDefines>$(DefineSymbols.Split(' '))</_FixedDefines> |
86 | 70 | </PropertyGroup> |
|
95 | 79 | <_Files>@(Compile -> '%(Identity)', ' ')</_Files> |
96 | 80 | </PropertyGroup> |
97 | 81 | <MakeDir Directories="obj" /> |
98 | | - <Exec Command="gcc -g -shared -std=c99 -o "%(MacLibLipo.Identity)" %(MacLibLipo.Arch) $(_CppFlags) $(_LinkFlags) $(_Libs) $(_Includes) $(_Files)" /> |
| 82 | + <Exec Command="gcc -g -shared -m64 -std=c99 -o "$(_MacLib)" $(_CppFlags) $(_LinkFlags) $(_Libs) $(_Includes) $(_Files)" /> |
99 | 83 | <!-- Mono 4.4.0 (mono-4.4.0-branch/a3fabf1) has an incorrect shared library name. Fix it --> |
100 | | - <Exec Command="install_name_tool -change /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/package-root/lib/libmonosgen-2.0.1.dylib /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.1.dylib "%(MacLibLipo.Identity)"" /> |
| 84 | + <Exec Command="install_name_tool -change /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/package-root/lib/libmonosgen-2.0.1.dylib /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.1.dylib "$(_MacLib)"" /> |
101 | 85 | </Target> |
102 | 86 | <Target Name="BuildUnixLibraries" |
103 | 87 | Condition=" '$(OS)' != 'Windows_NT' And !Exists ('/Library/Frameworks/')" |
|
0 commit comments