Add win32 specific linker flags for Midori extensions

This commit is contained in:
Peter de Ridder 2010-02-15 22:43:51 +01:00 committed by Christian Dywan
parent f9a6a8e379
commit b993cdc553
2 changed files with 4 additions and 0 deletions

View file

@ -29,3 +29,5 @@ for extension in extensions:
obj.source = source obj.source = source
obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML HILDON' obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML HILDON'
obj.install_path = '${LIBDIR}/midori' obj.install_path = '${LIBDIR}/midori'
if bld.env['platform'] == 'win32':
obj.uselib_local = 'midori'

View file

@ -118,6 +118,7 @@ def configure (conf):
if not conf.find_program ('convert', var='CONVERT'): if not conf.find_program ('convert', var='CONVERT'):
Utils.pprint ('YELLOW', 'midori.ico won\'t be created') Utils.pprint ('YELLOW', 'midori.ico won\'t be created')
conf.find_program ('windres', var='WINRC') conf.find_program ('windres', var='WINRC')
conf.env['platform'] = 'win32'
# This is specific to cross compiling with mingw # This is specific to cross compiling with mingw
if is_mingw (conf.env) and Options.platform != 'win32': if is_mingw (conf.env) and Options.platform != 'win32':
@ -261,6 +262,7 @@ def configure (conf):
conf.define ('HAVE_OSX', int(sys.platform == 'darwin')) conf.define ('HAVE_OSX', int(sys.platform == 'darwin'))
if Options.platform == 'win32': if Options.platform == 'win32':
conf.env.append_value ('LINKFLAGS', '-mwindows') conf.env.append_value ('LINKFLAGS', '-mwindows')
conf.env.append_value ('program_LINKFLAGS', ['-Wl,--out-implib=default/midori/libmidori.a', '-Wl,--export-all-symbols'])
else: else:
conf.check (header_name='signal.h') conf.check (header_name='signal.h')