Permalink
Browse files

Add Makefile to compile System.Drawing.dll for monotouch and monomac.…

… There is still a circular dependency for MonoMac.dll
  • Loading branch information...
1 parent a05bf71 commit 4a76ee56c99605fa4ec5a69d5bcffb92c0d0cbf8 @kjpou1 kjpou1 committed Aug 27, 2013
View
@@ -1,13 +1,13 @@
MONOTOUCH_PREFIX=/Developer/MonoTouch
SMCS=$(MONOTOUCH_PREFIX)/usr/bin/smcs
+MONOTOUCH=$(MONOTOUCH_PREFIX)/usr/lib/mono/2.1
MONO_SYSD=../mono/mcs/class/System.Drawing
MONO_SOURCES = \
$(MONO_SYSD)/../../build/common/Locale.cs \
$(MONO_SYSD)/System.Drawing/FontStyle.cs \
$(MONO_SYSD)/System.Drawing/CharacterRange.cs \
$(MONO_SYSD)/System.Drawing/GraphicsUnit.cs \
- $(MONO_SYSD)/System.Drawing/Icon.cs \
$(MONO_SYSD)/System.Drawing/IconConverter.cs \
$(MONO_SYSD)/System.Drawing/ImageConverter.cs \
$(MONO_SYSD)/System.Drawing/ImageFormatConverter.cs \
@@ -42,14 +42,24 @@ MONO_SOURCES = \
$(MONO_SYSD)/System.Drawing.Imaging/PixelFormat.cs \
$(MONO_SYSD)/System.Drawing.Printing/PrintPageEventHandler.cs \
+SHARED_EXTERNAL_SOURCES = \
+ $(MONO_SYSD)/System.Drawing.Drawing2D/LineCap.cs \
+ $(MONO_SYSD)/System.Drawing.Drawing2D/DashStyle.cs \
+ $(MONO_SYSD)/System.Drawing.Drawing2D/DashCap.cs \
+ $(MONO_SYSD)/System.Drawing.Drawing2D/LinearGradientMode.cs \
+
+
MONOMAC_EXTRA_SOURCES = \
+
+MONOMAC_EXTRA_SOURCES-BACKUP = \
$(MONO_SYSD)/System.Drawing/Point.cs \
$(MONO_SYSD)/System.Drawing/PointF.cs \
$(MONO_SYSD)/System.Drawing/Rectangle.cs \
$(MONO_SYSD)/System.Drawing/RectangleF.cs \
$(MONO_SYSD)/System.Drawing/Size.cs \
$(MONO_SYSD)/System.Drawing/SizeF.cs
+
SOURCES = \
./System.Drawing/Bitmap.cs \
./System.Drawing/Brush.cs \
@@ -74,21 +84,25 @@ SOURCES = \
./System.Drawing.Printing/PrinterSettings.cs \
./System.Drawing.Printing/PrintPageEventArgs.cs \
./System.Drawing.Imaging/ImageAttributes.cs \
+ ./System.Drawing/Graphics-DrawEllipticalArc.cs \
+ ./Utilities/ConversionHelpers.cs \
+ ./System.Drawing/Icon.cs \
+
all: monotouch
monotouch: monotouch/System.Drawing.dll
monotouch/System.Drawing.dll: $(SOURCES) $(MONO_SOURCES) Makefile
mkdir -p monotouch
- $(SMCS) -define:MONOTOUCH -target:library -out:monotouch/System.Drawing.dll -debug $(SOURCES) $(MONO_SOURCES) -r:monotouch.dll
+ $(SMCS) -define:MONOTOUCH -target:library -out:monotouch/System.Drawing.dll -debug $(SOURCES) $(MONO_SOURCES) $(SHARED_EXTERNAL_SOURCES) -r:$(MONOTOUCH)/monotouch.dll
monomac: monomac/System.Drawing.dll
# circular dependency problem. MonoMac.dll depends on System.Drawing.dll which would now depend on MonoMac.dll
monomac/System.Drawing.dll: $(SOURCES) $(MONO_SOURCES) $(MONO_EXTRA_SOURCES) Makefile
mkdir -p monomac
- mcs -target:library -out:monomac/System.Drawing.dll -define:MONOMAC -debug $(SOURCES) $(MONO_SOURCES) $(MONOMAC_EXTRA_SOURCES) -r:../monomac/src/MonoMac.dll
+ mcs -target:library -out:monomac/System.Drawing.dll -define:MONOMAC -debug $(SOURCES) $(MONO_SOURCES) $(MONOMAC_EXTRA_SOURCES) $(SHARED_EXTERNAL_SOURCES) -r:../monomac/src/MonoMac.dll
clean:
rm monotouch/*.dll*
@@ -237,7 +237,6 @@
<Compile Include="..\System.Drawing\Graphics-DrawEllipticalArc.cs">
<Link>System.Drawing\Graphics-DrawEllipticalArc.cs</Link>
</Compile>
- <Compile Include="System.Drawing\Icon.cs" />
<Compile Include="..\..\mono\mcs\class\System.Drawing\System.Drawing\IconConverter.cs">
<Link>System.Drawing\IconConverter.cs</Link>
</Compile>
@@ -262,6 +261,9 @@
<Compile Include="..\..\mono\mcs\class\System.Drawing\System.Drawing.Drawing2D\LinearGradientMode.cs">
<Link>External\LinearGradientMode.cs</Link>
</Compile>
+ <Compile Include="..\System.Drawing\Icon.cs">
+ <Link>System.Drawing\Icon.cs</Link>
+ </Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
@@ -175,9 +175,6 @@
<Link>External\FontStyle.cs</Link>
</Compile>
<Compile Include="System.Drawing.Drawing2D\GraphicsState.cs" />
- <Compile Include="..\mono\mcs\class\System.Drawing\System.Drawing\Icon.cs">
- <Link>External\Icon.cs</Link>
- </Compile>
<Compile Include="..\mono\mcs\class\System.Drawing\System.Drawing\IconConverter.cs">
<Link>External\IconConverter.cs</Link>
</Compile>
@@ -215,6 +212,7 @@
<Compile Include="..\mono\mcs\class\System.Drawing\System.Drawing.Drawing2D\LinearGradientMode.cs">
<Link>External\LinearGradientMode.cs</Link>
</Compile>
+ <Compile Include="System.Drawing\Icon.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="External\" />

0 comments on commit 4a76ee5

Please sign in to comment.