[Gtk-sharp-list] The patch included in the Gtk# 0.10 installer for Windows

Mathias Hasselmann mathias.hasselmann@gmx.de
Tue, 01 Jul 2003 23:20:10 +0200


This is a multi-part message in MIME format.
--------------080006000202000107090401
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Mike Kestner wrote:
> On Mon, 2003-06-30 at 13:35, Mathias Hasselmann wrote:
> 
> 
>>>Maybe we should do this in Gtk.Application.Init() or do it as a static
>>>constructor of Gtk.Application, so this happens automatically.
>>>
>>>Since Application.cs is not auto-generated, this is even simpler.
>>
>>Release 4 of the installer (gtk-sharp-0.10-win32-4.exe) already contains 
>>a patch doing exactly that.
> 
> 
> Please submit this patch to the list so we can get it included in cvs.

Attached you'll find the patch that is used by the installer.
What does the patch:

  - addes some assembly information and strongly names the assemblies
  - the makefiles are fixed to build pure mingw32 libraries (which do not
    reference cygwin1.dll)
  - Glade# is added to list of assemblies built on win32 (guess the fixed
    libglade.mingw32.mak attached better schould better go to the
    libglade folks ;-)
  - Gtk.Application is tuned to fix environment on startup for win32.

Maybe I should create a second patch which also merges build.sh into
Gtk# CVS. What would be a good location?

	- gtk-sharp/build/win32/
	- gtk-sharp/win32/
	- gtk-sharp/installer.nsis/
	- ...

Where would you like to have it?

Ciao,
Mathias


--------------080006000202000107090401
Content-Type: text/plain;
 name="gtk-sharp-0.10-dotnet.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gtk-sharp-0.10-dotnet.diff"

diff -ruN gtk-sharp-0.10/api/makefile.win32 gtk-sharp-0.10-dotnet/api/makefile.win32
--- gtk-sharp-0.10/api/makefile.win32	2002-10-27 03:30:50.000000000 +0100
+++ gtk-sharp-0.10-dotnet/api/makefile.win32	2003-06-29 02:18:03.000000000 +0200
@@ -1,6 +1,6 @@
 all: generated-stamp
 
-generated-stamp: atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml ../generator/codegen.exe
-	../generator/codegen --generate atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml
+generated-stamp: atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml glade-api.xml ../generator/codegen.exe
+	../generator/codegen --generate atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml glade-api.xml
 	touch generated-stamp
 
diff -ruN gtk-sharp-0.10/atk/AssemblyInfo.cs.in gtk-sharp-0.10-dotnet/atk/AssemblyInfo.cs.in
--- gtk-sharp-0.10/atk/AssemblyInfo.cs.in	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/atk/AssemblyInfo.cs.in	2003-06-28 22:31:56.000000000 +0200
@@ -0,0 +1,11 @@
+using System.Reflection;
+
+[assembly: AssemblyProduct("Gtk#")]
+[assembly: AssemblyVersion("((VERSION))")]
+[assembly: AssemblyCompany("http://gtk-sharp.sourceforge.net/")]
+[assembly: AssemblyCopyright("((COPYRIGHT))")]
+[assembly: AssemblyTitle("ATK wrapper for .NET")]
+[assembly: AssemblyDescription("ATK is a libray providing accessability features.")]
+[assembly: AssemblyTrademark("Gtk# is released under the GNU Library General Public License (GNU LGPL).")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("../../gtksharp.snk")]
diff -ruN gtk-sharp-0.10/gdk/AssemblyInfo.cs.in gtk-sharp-0.10-dotnet/gdk/AssemblyInfo.cs.in
--- gtk-sharp-0.10/gdk/AssemblyInfo.cs.in	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/gdk/AssemblyInfo.cs.in	2003-06-28 22:57:04.000000000 +0200
@@ -0,0 +1,11 @@
+using System.Reflection;
+
+[assembly: AssemblyProduct("Gtk#")]
+[assembly: AssemblyVersion("((VERSION))")]
+[assembly: AssemblyCompany("http://gtk-sharp.sourceforge.net/")]
+[assembly: AssemblyCopyright("((COPYRIGHT))")]
+[assembly: AssemblyTitle("GDK wrapper for .NET")]
+[assembly: AssemblyDescription("GDK is a utility library providing platform independent graphics functionality.")]
+[assembly: AssemblyTrademark("Gtk# is released under the GNU Library General Public License (GNU LGPL).")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("../../gtksharp.snk")]
diff -ruN gtk-sharp-0.10/glade/AssemblyInfo.cs.in gtk-sharp-0.10-dotnet/glade/AssemblyInfo.cs.in
--- gtk-sharp-0.10/glade/AssemblyInfo.cs.in	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/glade/AssemblyInfo.cs.in	2003-06-29 02:49:03.000000000 +0200
@@ -0,0 +1,11 @@
+using System.Reflection;
+
+[assembly: AssemblyProduct("Gtk#")]
+[assembly: AssemblyVersion("((VERSION))")]
+[assembly: AssemblyCompany("http://gtk-sharp.sourceforge.net/")]
+[assembly: AssemblyCopyright("((COPYRIGHT))")]
+[assembly: AssemblyTitle("libglade wrapper for .NET")]
+[assembly: AssemblyDescription("Libglade is used to load graphical user interfaces designed with the GLADE interface builder.")]
+[assembly: AssemblyTrademark("Gtk# is released under the GNU Library General Public License (GNU LGPL).")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("../../gtksharp.snk")]
diff -ruN gtk-sharp-0.10/glade/Makefile.win32 gtk-sharp-0.10-dotnet/glade/Makefile.win32
--- gtk-sharp-0.10/glade/Makefile.win32	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/glade/Makefile.win32	2003-06-29 02:20:08.000000000 +0200
@@ -0,0 +1,8 @@
+all: windows
+
+windows:
+	$(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /r:../gtk/gtk-sharp.dll /out:glade-sharp.dll /recurse:*.cs
+
+docs:
+	$(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /r:../gtk/gtk-sharp.dll /doc:glade-sharp-docs.xml /out:glade-sharp.dll /recurse:*.cs
+
diff -ruN gtk-sharp-0.10/glib/AssemblyInfo.cs.in gtk-sharp-0.10-dotnet/glib/AssemblyInfo.cs.in
--- gtk-sharp-0.10/glib/AssemblyInfo.cs.in	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/glib/AssemblyInfo.cs.in	2003-06-28 22:32:01.000000000 +0200
@@ -0,0 +1,11 @@
+using System.Reflection;
+
+[assembly: AssemblyProduct("Gtk#")]
+[assembly: AssemblyVersion("((VERSION))")]
+[assembly: AssemblyCompany("http://gtk-sharp.sourceforge.net/")]
+[assembly: AssemblyCopyright("((COPYRIGHT))")]
+[assembly: AssemblyTitle("GLib wrapper for .NET")]
+[assembly: AssemblyDescription("GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on.")]
+[assembly: AssemblyTrademark("Gtk# is released under the GNU Library General Public License (GNU LGPL).")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("../../gtksharp.snk")]
diff -ruN gtk-sharp-0.10/glue/makefile.win32 gtk-sharp-0.10-dotnet/glue/makefile.win32
--- gtk-sharp-0.10/glue/makefile.win32	2002-10-27 03:30:51.000000000 +0100
+++ gtk-sharp-0.10-dotnet/glue/makefile.win32	2003-06-29 01:25:17.000000000 +0200
@@ -1,7 +1,10 @@
-GTK_CFLAGS=`pkg-config --cflags gtk+-win32-2.0`
-GTK_LIBS=`pkg-config --libs gtk+-win32-2.0`
-CC=gcc -b i686-pc-mingw32
-DLLWRAP=dllwrap --mno-cygwin --target i386-mingw32 --export-all-symbols
+OTIMIZES=-O2 -mcpu=pentium4
+PLATFORM=-mno-cygwin -mms-bitfields -mwindows -mthreads
+
+GTK_CFLAGS=$(shell pkg-config --cflags gtk+-win32-2.0)
+GTK_LIBS=$(shell pkg-config --libs gtk+-win32-2.0)
+CFLAGS=$(PLATFORM) $(OPTIMIZES)
+CC=gcc 
 
 GLUE_OBJS = \
 	adjustment.o \
@@ -16,19 +19,15 @@
 	style.o \
 	type.o \
 	value.o \
-	widget.o \
-	win32dll.o
+	widget.o 
 
 all: gtksharpglue.dll
 
-
 %.o: %.c
 	$(CC) -c $(CFLAGS) $(GTK_CFLAGS) -o $@ $^ 
 
-
 gtksharpglue.dll: $(GLUE_OBJS)
-	$(DLLWRAP) --output-lib=libgtksharpglue.a --dllname=gtksharpglue.dll --driver-name=gcc --output-def=gtksharpglue.def $(GLUE_OBJS) $(GTK_LIBS)
-
+	$(CC) -shared -o gtksharpglue.dll $(PLATFORM) $(GLUE_OBJS) $(GTK_LIBS)
 
 clean:
 	rm -f gtksharpglue.dll *.o libgtksharpglue.a
diff -ruN gtk-sharp-0.10/gtk/Application.cs gtk-sharp-0.10-dotnet/gtk/Application.cs
--- gtk-sharp-0.10/gtk/Application.cs	2003-03-25 17:57:05.000000000 +0100
+++ gtk-sharp-0.10-dotnet/gtk/Application.cs	2003-06-28 20:03:41.000000000 +0200
@@ -18,7 +18,12 @@
 		private Application ()
 		{
 		}
-		
+
+		static Application ()
+		{
+			RuntimeEnvironment.Initialize();
+		}
+
 		[DllImport("libgtk-win32-2.0-0.dll")]
 		static extern void gtk_init (int argc, IntPtr argv);
 
diff -ruN gtk-sharp-0.10/gtk/AssemblyInfo.cs.in gtk-sharp-0.10-dotnet/gtk/AssemblyInfo.cs.in
--- gtk-sharp-0.10/gtk/AssemblyInfo.cs.in	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/gtk/AssemblyInfo.cs.in	2003-06-28 22:32:32.000000000 +0200
@@ -0,0 +1,11 @@
+using System.Reflection;
+
+[assembly: AssemblyProduct("Gtk#")]
+[assembly: AssemblyVersion("((VERSION))")]
+[assembly: AssemblyCompany("http://gtk-sharp.sourceforge.net/")]
+[assembly: AssemblyCopyright("((COPYRIGHT))")]
+[assembly: AssemblyTitle("GTK+ wrapper for .NET")]
+[assembly: AssemblyDescription("GTK+ is a library for creating graphical user interfaces.")]
+[assembly: AssemblyTrademark("Gtk# is released under the GNU Library General Public License (GNU LGPL).")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("../../gtksharp.snk")]
diff -ruN gtk-sharp-0.10/gtk/RuntimeEnvironment.cs gtk-sharp-0.10-dotnet/gtk/RuntimeEnvironment.cs
--- gtk-sharp-0.10/gtk/RuntimeEnvironment.cs	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/gtk/RuntimeEnvironment.cs	2003-06-29 01:52:29.000000000 +0200
@@ -0,0 +1,189 @@
+/* Gtk# Runtime Environment Helper
+ * Copyright (C) 2003 by Mathias Hasselmann <mathias@taschenorakel.de>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+using System;
+using System.IO;
+using System.Reflection;
+
+namespace Gtk
+{
+	/// <summary>
+	/// This class provides functionally to locate and initialize 
+	/// the Gtk# Runtime Environment
+	/// </summary>
+	internal class RuntimeEnvironment
+	{
+		static Type registry = null;
+		static object localMachine = null;
+		static MethodInfo openSubKey = null;
+		static MethodInfo getValue = null;
+
+		/// <summary>
+		/// Modifies the value of an environment variable.
+		/// </summary>
+		/// <remarks>
+		/// This method is available on Microsoft Windows only. Do not call 
+		/// on other platforms.
+		/// </remarks>
+		[System.Runtime.InteropServices.DllImport("kernel32.dll")]
+		extern static bool SetEnvironmentVariable(string name, string value);
+
+		/// <summary>
+		/// Reads a value from the Microsoft Windows registry.
+		/// </summary>
+		/// <param name="subkey">
+		/// Name of a registry key within the LOCAL_MACHINE hieve.
+		/// </param>
+		/// <param name="value">
+		/// Name of a registry value to read or null to read the default value.
+		/// </param>
+		/// <returns>
+		/// The value of the registry entry requested or null if no entry 
+		/// is found.
+		/// </returns>
+		/// <remarks>
+		/// This method is initialized by <see cref="InitializeWindowsRuntime"/>
+		/// and functional on Microsoft Windows only. Do not call on other
+		/// platforms.
+		/// </remarks>
+		static object GetRegistryValue(string subkey, string value)
+		{
+			object key = openSubKey.Invoke(
+				localMachine, new object[] { subkey });
+
+			return null != key ?
+				getValue.Invoke(key, new object[] { value }) : null;
+		}
+
+		static void CheckLibraryExists(string directory, string library)
+		{
+			string filename = Path.Combine(directory, library);
+
+			if (!File.Exists(filename))
+				throw new FileNotFoundException(
+					"Gtk# component not found.\r\nfilename: " +
+					filename, filename);
+		}
+		
+		/// <summary>
+		/// Initializes the current process for Gtk# when running on 
+		/// Microsoft Windows.
+		/// </summary>
+		/// <exception cref="System.IO.FileNotFoundException">
+		/// This exception is thrown if some components of the 
+		/// Gtk# Runtime Environment cannot be found. The exception
+		/// message should be displayed to the user since it's contains 
+		/// useful information about how to solve the problem.
+		/// </exception>
+		/// <remarks>
+		/// Side effect: Some Windows specific variables are initialized 
+		/// in order to be able to use <see cref="GetRegistryValue"/>.
+		/// </remarks>
+		static void InitializeWindowsRuntime()
+		{
+			registry = Type.GetType("Microsoft.Win32.Registry");
+			localMachine = registry.GetField("LocalMachine").GetValue(null);
+
+			openSubKey = localMachine.GetType().GetMethod(
+				"OpenSubKey", new Type[] { typeof(string) });
+			getValue = localMachine.GetType().GetMethod(
+				"GetValue", new Type[] { typeof(string) });
+
+			Assembly gtkSharp = typeof(RuntimeEnvironment).Assembly;
+			string version = gtkSharp.GetName().Version.ToString(2);
+
+			string rkeyGtkPlus = "SOFTWARE\\Gtk\\2.0";
+			string rkeyGtkSharp = "SOFTWARE\\Gtk#\\" + version;
+
+			string gtkPlusPath =
+				GetRegistryValue(rkeyGtkPlus, "Path") as string;
+			string gtkSharpPath =
+				GetRegistryValue(rkeyGtkSharp, "Path") as string;
+
+			if (null == gtkSharpPath)
+				throw new FileNotFoundException(
+				"Cannot locate Gtk# components.");
+
+			if (null == gtkPlusPath)
+				gtkPlusPath = gtkSharpPath;
+
+			gtkSharpPath = Path.Combine(gtkSharpPath, "lib");
+			gtkPlusPath = Path.Combine(gtkPlusPath, "lib");
+
+			if (File.Exists(Path.Combine(
+				gtkSharpPath, "libgtk-win32-2.0-0.dll")))
+				gtkPlusPath = gtkSharpPath;
+
+			CheckLibraryExists(gtkSharpPath, "glib-sharp.dll");
+			CheckLibraryExists(gtkSharpPath, "atk-sharp.dll");
+			CheckLibraryExists(gtkSharpPath, "pango-sharp.dll");
+			CheckLibraryExists(gtkSharpPath, "gdk-sharp.dll");
+			CheckLibraryExists(gtkSharpPath, "gtk-sharp.dll");
+			CheckLibraryExists(gtkSharpPath, "gtksharpglue.dll");
+
+			CheckLibraryExists(gtkPlusPath, "libglib-2.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libgmodule-2.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libgobject-2.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libgthread-2.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libatk-1.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libpangowin32-1.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libgdk-win32-2.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libgdk_pixbuf-2.0-0.dll");
+			CheckLibraryExists(gtkPlusPath, "libgtk-win32-2.0-0.dll");
+				
+			string pathExtensions = ";" + gtkSharpPath;
+
+			if (!gtkSharpPath.Equals(gtkPlusPath))
+				pathExtensions+= ";" + gtkSharpPath;
+			
+			SetEnvironmentVariable("PATH", 
+				Environment.GetEnvironmentVariable("PATH") +
+				pathExtensions);
+		}
+
+		/// <summary>
+		/// Initializes the current process to be able to locate all components
+		/// of the Gtk# Runtime Environment
+		/// </summary>
+		/// <exception cref="System.IO.FileNotFoundException">
+		/// This exception is thrown if some components of the 
+		/// Gtk# Runtime Environment cannot be found. The exception
+		/// message should be displayed to the user since it's contains 
+		/// useful information about how to solve the problem.
+		/// </exception>
+		public static void Initialize()
+		{
+			switch(Environment.OSVersion.Platform)
+			{
+				case PlatformID.Win32NT:
+				case PlatformID.Win32S:
+				case PlatformID.Win32Windows:
+					InitializeWindowsRuntime();
+					break;
+
+				default:
+					// nothing to do for other platforms
+					break;
+			}
+		}
+	}
+}
+
+// vim: ts=4 sw=4
diff -ruN gtk-sharp-0.10/makefile.win32 gtk-sharp-0.10-dotnet/makefile.win32
--- gtk-sharp-0.10/makefile.win32	2002-10-27 03:30:49.000000000 +0100
+++ gtk-sharp-0.10-dotnet/makefile.win32	2003-06-29 01:52:51.000000000 +0200
@@ -1,6 +1,6 @@
-DIRS=glue generator api glib pango atk gdk gtk sample
+DIRS=glue generator api glib pango atk gdk gtk glade sample
 ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT)))
-CSC=$(ROOT)/microsoft.net/framework/v1.0.3705/csc.exe /d:WIN32
+CSC=$(ROOT)/microsoft.net/framework/v1.0.3705/csc.exe /nologo /d:WIN32 /optimize
 
 all: windows
 
diff -ruN gtk-sharp-0.10/pango/AssemblyInfo.cs.in gtk-sharp-0.10-dotnet/pango/AssemblyInfo.cs.in
--- gtk-sharp-0.10/pango/AssemblyInfo.cs.in	1970-01-01 01:00:00.000000000 +0100
+++ gtk-sharp-0.10-dotnet/pango/AssemblyInfo.cs.in	2003-06-28 22:32:56.000000000 +0200
@@ -0,0 +1,11 @@
+using System.Reflection;
+
+[assembly: AssemblyProduct("Pango#")]
+[assembly: AssemblyVersion("((VERSION))")]
+[assembly: AssemblyCompany("http://gtk-sharp.sourceforge.net/")]
+[assembly: AssemblyCopyright("((COPYRIGHT))")]
+[assembly: AssemblyTitle("Pango wrapper for .NET")]
+[assembly: AssemblyDescription("Is a font rendering library.")]
+[assembly: AssemblyTrademark("Gtk# is released under the GNU Library General Public License (GNU LGPL).")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("../../gtksharp.snk")]
diff -ruN gtk-sharp-0.10/sample/makefile.win32 gtk-sharp-0.10-dotnet/sample/makefile.win32
--- gtk-sharp-0.10/sample/makefile.win32	2002-06-25 12:49:23.000000000 +0200
+++ gtk-sharp-0.10-dotnet/sample/makefile.win32	2003-06-29 02:52:37.000000000 +0200
@@ -1,9 +1,25 @@
 all: windows
 
-windows:
-	$(CSC) /unsafe /out:gtk-hello-world.exe /r:../glib/glib-sharp.dll /r:../atk/atk-sharp.dll /r:../gtk/gtk-sharp.dll /r:../gdk/gdk-sharp.dll HelloWorld.cs
-	$(CSC) /unsafe /out:button.exe /r:../glib/glib-sharp.dll /r:../atk/atk-sharp.dll /r:../gtk/gtk-sharp.dll ButtonApp.cs
-	$(CSC) /unsafe /out:menu.exe /r:../glib/glib-sharp.dll /r:../atk/atk-sharp.dll /r:../gtk/gtk-sharp.dll Menu.cs
+windows-functional: \
+	ButtonApp.exe \
+	CalendarApp.exe \
+	HelloWorld.exe \
+	Menu.exe \
+	Subclass.exe \
+
+windows-broken: \
+	ManagedTreeViewDemo.exe \
+	TreeViewDemo.exe \
+	Scribble.exe \
+	Size.exe
+
+#GladeTest.exe GladeViewer.exe
+#rsvg/svghelloworld.exe
+
+windows: windows-functional windows-broken
+
+%.exe: %.cs
+	$(CSC) /unsafe /out:$@ /r:../glib/glib-sharp.dll /r:../atk/atk-sharp.dll /r:../gtk/gtk-sharp.dll /r:../gdk/gdk-sharp.dll $^
 
 docs:
 	@echo "No docs to make."

--------------080006000202000107090401
Content-Type: text/plain;
 name="libglade.mingw32.mak"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="libglade.mingw32.mak"

PLATFORM=-mno-cygwin -mms-bitfields -mwindows -mthreads
OPTIMIZES=-O2 -mcpu=pentium
DEFINES=-DHAVE_CONFIG_H -DGLADE_LIBDIR='"/target/build/lib"'

INTL_CFLAGS=-I'/cygdrive/c/Programme/Gemeinsame Dateien/GTK/SDK/2.0/include'

GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0)
GTK_LIBS=$(shell pkg-config --libs gtk+-2.0)

XML_CFLAGS=-I'../../libxml2-2.5.7.win32/include'
XML_LIBS=-L'../../libxml2-2.5.7.win32/lib' -lxml2

INCLUDES=-I. -I.. $(INTL_CFLAGS) $(GTK_CFLAGS) $(XML_CFLAGS)
LIBS=$(GTK_LIBS) $(XML_LIBS)

CFLAGS=$(PLATFORM) $(OPTIMIZES) $(DEFINES) $(INCLUDES)

all: libglade.dll

libglade.dll: glade-init.o glade-xml.o glade-gtk.o glade-parser.o
	gcc -shared -o $@ $(PLATFORM) $^ $(LIBS)

clean:
	rm -f *.o *.dll

--------------080006000202000107090401--