[banshee] [build] first pass at MinGW cross compile profile



commit ae9418c78ea87c72081a18ce626cbe939e66f8c3
Author: Aaron Bockover <abockover novell com>
Date:   Fri Jan 8 19:31:28 2010 -0500

    [build] first pass at MinGW cross compile profile

 build/bundle/profile.mingw-cross.py |   47 +++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/build/bundle/profile.mingw-cross.py b/build/bundle/profile.mingw-cross.py
new file mode 100755
index 0000000..2c24755
--- /dev/null
+++ b/build/bundle/profile.mingw-cross.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python -B
+
+import os
+
+from bockbuild.unixprofile import UnixProfile
+from packages import BansheePackages
+
+class BansheeMingwCrossProfile (UnixProfile, BansheePackages):
+	def __init__ (self):
+		UnixProfile.__init__ (self)
+		BansheePackages.__init__ (self)
+		self.build_root = os.path.join (os.getcwd (), 'build-root-mingw')
+		
+		self.name = 'mingw-cross'
+
+		self.host = 'i686-linux'
+		self.target = 'i686-pc-mingw32'
+		self.sysroot = '/usr/%{target}/sys-root/%{target}'
+		
+		self.global_configure_flags.extend ([
+			'--host=%{target}',
+			'--target=%{target}',
+			'--build=%{host}'
+		])
+
+		self.gcc_flags.extend ([
+			'-I%{sysroot}/include',
+			'-m32',
+			'-march=i586',
+			'-mms-bitfields'
+		])
+
+		self.env.set ('PATH', ':',
+			'%{prefix}/bin',
+			'%{sysroot}/bin',
+			'/usr/bin',
+			'/bin')
+
+		self.ld_flags.extend ([
+			'-L%{sysroot}/lib',
+			'-m32'
+		])
+
+		self.env.set ('CC', '%{target}-gcc')
+		self.env.set ('CXX', '%{target}-g++')
+
+BansheeMingwCrossProfile ().build ()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]