2007-06-30 04:41:52 +02:00
|
|
|
# -*- python -*-
|
|
|
|
|
##
|
2011-12-03 01:56:30 +01:00
|
|
|
## SConstruct - SCons based build-system for Lumiera
|
2007-06-30 04:41:52 +02:00
|
|
|
##
|
|
|
|
|
|
2008-03-10 04:25:03 +01:00
|
|
|
# Copyright (C) Lumiera.org
|
|
|
|
|
# 2008, Hermann Vosseler <Ichthyostega@web.de>
|
2007-06-30 04:41:52 +02:00
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License as
|
2007-07-18 19:02:13 +02:00
|
|
|
# published by the Free Software Foundation; either version 2 of
|
2007-06-30 04:41:52 +02:00
|
|
|
# the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
|
|
|
2011-01-30 22:12:55 +01:00
|
|
|
# NOTE: scons -h for help.
|
2012-01-10 08:37:01 +01:00
|
|
|
# This script /defines/ the components and how they fit together.
|
|
|
|
|
# SCons will derive dependencies and the necessary build steps.
|
2011-01-30 22:12:55 +01:00
|
|
|
# Read more about the SCons build system at: http://www.scons.org
|
|
|
|
|
|
|
|
|
|
|
2012-01-10 08:37:01 +01:00
|
|
|
# SCons plugins and extension modules
|
|
|
|
|
#------------------------------------------------
|
2008-08-21 09:59:24 +02:00
|
|
|
import sys
|
2012-01-10 08:37:01 +01:00
|
|
|
sys.path.append('./admin/scons')
|
|
|
|
|
#------------------------------------------------
|
2008-08-21 09:59:24 +02:00
|
|
|
|
2007-06-30 04:41:52 +02:00
|
|
|
|
2012-01-09 04:10:00 +01:00
|
|
|
import Setup
|
|
|
|
|
import Options
|
|
|
|
|
import Platform
|
|
|
|
|
|
2012-01-10 08:37:01 +01:00
|
|
|
from Buildhelper import *
|
|
|
|
|
from LumieraEnvironment import *
|
|
|
|
|
|
|
|
|
|
|
2007-07-02 11:38:46 +02:00
|
|
|
|
2012-01-09 04:58:21 +01:00
|
|
|
#####################################################################
|
2007-06-30 04:41:52 +02:00
|
|
|
|
2012-01-10 08:37:01 +01:00
|
|
|
env = Setup.defineBuildEnvironment() # dirs & compiler flags
|
|
|
|
|
env = Platform.configure(env) # library dependencies
|
2007-06-30 04:41:52 +02:00
|
|
|
|
2007-08-24 16:41:16 +02:00
|
|
|
|
2007-07-02 05:27:20 +02:00
|
|
|
|
2012-01-09 05:13:15 +01:00
|
|
|
### === MAIN BUILD === ##############################################
|
|
|
|
|
|
2012-01-10 08:37:01 +01:00
|
|
|
# call subdir SConscript(s) to define the actual build targets...
|
2012-01-10 08:21:27 +01:00
|
|
|
SConscript(dirs=['data','src','src/tool','research','tests','doc'], exports='env')
|
2012-01-09 05:13:15 +01:00
|
|
|
|
2007-06-30 04:41:52 +02:00
|
|
|
|
|
|
|
|
|
2012-01-09 05:13:15 +01:00
|
|
|
|
|
|
|
|
# additional files to be cleaned when cleaning 'build'
|
|
|
|
|
env.Clean ('build', [ 'scache.conf', '.sconf_temp', '.sconsign.dblite', 'config.log' ])
|
|
|
|
|
env.Clean ('build', [ 'src/pre.gch' ])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### === Alias Targets === ###########################################
|
|
|
|
|
|
2012-01-10 08:37:01 +01:00
|
|
|
# pick up the targets defined by the sub SConscripts
|
|
|
|
|
Import('lumiera plugins tools gui testsuite doxydoc')
|
|
|
|
|
|
2012-03-19 01:03:14 +01:00
|
|
|
build = env.Alias('build', lumiera + plugins + tools + gui)
|
2012-01-10 08:37:01 +01:00
|
|
|
env.Default('build')
|
|
|
|
|
# SCons default target
|
2012-01-09 05:13:15 +01:00
|
|
|
|
2012-01-10 08:21:27 +01:00
|
|
|
|
2012-01-09 05:13:15 +01:00
|
|
|
env.Alias ('all', build + testsuite + doxydoc)
|
2012-01-10 08:37:01 +01:00
|
|
|
env.Alias ('doc', doxydoc)
|
2012-08-25 13:23:41 +02:00
|
|
|
env.Alias ('none')
|
2012-01-09 05:13:15 +01:00
|
|
|
|
|
|
|
|
env.Alias('install', gui)
|
|
|
|
|
env.Alias('install', '$DESTDIR')
|
|
|
|
|
|
|
|
|
|
#####################################################################
|