From 97c80d0190d41f032e3aaccdb73e141e4a82b66d Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 17 Jan 2009 23:52:09 +0100 Subject: [PATCH] Build Midori core as library, for easier use in tests --- midori/wscript_build | 21 ++++++++++++++++++--- tests/wscript_build | 4 ++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/midori/wscript_build b/midori/wscript_build index 9c8d1273..e15561fc 100644 --- a/midori/wscript_build +++ b/midori/wscript_build @@ -2,10 +2,25 @@ # WAF build script for midori # This file is licensed under the terms of the expat license, see the file EXPAT. +import platform + +obj = bld.new_task_gen ('cc', 'staticlib') +obj.name = 'midori' +obj.target = 'midori' +obj.includes = '. ..' +obj.find_sources_in_dirs ('.', excludes=['main.c']) +obj.add_marshal_file ('marshal.list', 'midori_cclosure_marshal') +obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML' +obj.uselib_local = 'katze' +obj.install_path = None + +if platform.architecture ()[0] == '64bit': + obj.env.append_value ('CCFLAGS', '-fPIC') + obj = bld.new_task_gen ('cc', 'program') obj.target = 'midori' obj.includes = '. .. ../panels' -obj.find_sources_in_dirs ('. ../panels') -obj.add_marshal_file ('marshal.list', 'midori_cclosure_marshal') +obj.source = 'main.c' +obj.find_sources_in_dirs ('../panels') obj.uselib = 'UNIQUE LIBSOUP GMODULE GTHREAD GIO GTK SQLITE WEBKIT LIBXML' -obj.uselib_local = 'katze' +obj.uselib_local = 'midori' diff --git a/tests/wscript_build b/tests/wscript_build index e3cd8d4d..1a9ebc81 100644 --- a/tests/wscript_build +++ b/tests/wscript_build @@ -5,7 +5,7 @@ obj = bld.new_task_gen ('cc', 'program') obj.target = 'magic-uri' obj.includes = '.. ../midori' -obj.source = 'magic-uri.c ../midori/compat.c ../midori/sokoke.c' +obj.source = 'magic-uri.c' obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML' -obj.uselib_local = 'katze' +obj.uselib_local = 'midori' obj.unit_test = 1 -- 2.39.5