2008-11-18 01:07:53 +00:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# WAF build script for midori
|
|
|
|
# This file is licensed under the terms of the expat license, see the file EXPAT.
|
|
|
|
|
2009-06-09 00:02:43 +00:00
|
|
|
import os
|
|
|
|
|
2008-11-18 01:07:53 +00:00
|
|
|
extensions = os.listdir ('extensions')
|
|
|
|
for extension in extensions:
|
2009-01-23 20:36:04 +00:00
|
|
|
folder = 'extensions' + os.sep + extension
|
|
|
|
if os.path.isdir (folder):
|
2008-11-18 01:07:53 +00:00
|
|
|
files = os.listdir (folder)
|
|
|
|
target = extension
|
|
|
|
source = ''
|
|
|
|
for fila in files:
|
|
|
|
if fila[-2:] == '.c':
|
|
|
|
source += ' ' + extension + os.sep + fila
|
2010-04-25 21:36:53 +00:00
|
|
|
elif 'VALAC' in bld.env and fila[-5:] == '.vala':
|
2010-04-24 22:11:57 +00:00
|
|
|
source += ' ' + extension + os.sep + fila
|
2009-01-23 20:36:04 +00:00
|
|
|
if not source:
|
|
|
|
Utils.pprint ('RED', folder + ': No source files found')
|
|
|
|
continue
|
|
|
|
else:
|
2010-04-24 22:11:57 +00:00
|
|
|
if extension[-2:] == '.c':
|
|
|
|
target = extension[:-2]
|
2010-04-25 21:36:53 +00:00
|
|
|
elif 'VALAC' in bld.env and extension[-5:] == '.vala':
|
2010-04-24 22:11:57 +00:00
|
|
|
target = extension[:-5]
|
|
|
|
else:
|
2008-11-18 01:07:53 +00:00
|
|
|
continue
|
|
|
|
source = extension
|
|
|
|
|
2009-01-04 20:38:06 +00:00
|
|
|
obj = bld.new_task_gen ('cc', 'shlib')
|
2008-11-18 01:07:53 +00:00
|
|
|
obj.target = target
|
2009-01-23 20:36:04 +00:00
|
|
|
obj.includes = '..'
|
2008-11-18 01:07:53 +00:00
|
|
|
obj.source = source
|
2012-02-20 22:14:10 +00:00
|
|
|
obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML HILDON'
|
2012-03-26 17:16:08 +00:00
|
|
|
obj.vapi_dirs = '../midori ../katze'
|
|
|
|
obj.packages = 'glib-2.0 gio-2.0 libsoup-2.4 midori katze'
|
2011-10-01 13:12:04 +00:00
|
|
|
if bld.env['HAVE_GTK3']:
|
|
|
|
obj.packages += ' gtk+-3.0 webkitgtk-3.0'
|
|
|
|
else:
|
|
|
|
obj.packages += ' gtk+-2.0 webkit-1.0 unique-1.0'
|
2009-01-04 20:38:06 +00:00
|
|
|
obj.install_path = '${LIBDIR}/midori'
|
2010-02-15 21:43:51 +00:00
|
|
|
if bld.env['platform'] == 'win32':
|
|
|
|
obj.uselib_local = 'midori'
|