SConscript revision 12027
112027Sjungma@eit.uni-kl.de# Copyright (c) 2017, TU Dresden
212027Sjungma@eit.uni-kl.de# Copyright (c) 2017, University of Kaiserslautern
312027Sjungma@eit.uni-kl.de# All rights reserved.
412027Sjungma@eit.uni-kl.de
512027Sjungma@eit.uni-kl.de# Permission is hereby granted, free of charge, to any person obtaining a copy
612027Sjungma@eit.uni-kl.de# of this software and associated documentation files (the "Software"), to deal
712027Sjungma@eit.uni-kl.de# in the Software without restriction, including without limitation the rights
812027Sjungma@eit.uni-kl.de# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
912027Sjungma@eit.uni-kl.de# copies of the Software, and to permit persons to whom the Software is
1012027Sjungma@eit.uni-kl.de# furnished to do so, subject to the following conditions:
1112027Sjungma@eit.uni-kl.de#
1212027Sjungma@eit.uni-kl.de# The above copyright notice and this permission notice shall be included in
1312027Sjungma@eit.uni-kl.de# all copies or substantial portions of the Software.
1412027Sjungma@eit.uni-kl.de#
1512027Sjungma@eit.uni-kl.de# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1612027Sjungma@eit.uni-kl.de# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1712027Sjungma@eit.uni-kl.de# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1812027Sjungma@eit.uni-kl.de# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1912027Sjungma@eit.uni-kl.de# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2012027Sjungma@eit.uni-kl.de# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2112027Sjungma@eit.uni-kl.de# SOFTWARE.
2212027Sjungma@eit.uni-kl.de#
2312027Sjungma@eit.uni-kl.de# Authors: Christian Menard
2412027Sjungma@eit.uni-kl.de#          Matthias Jung
2512027Sjungma@eit.uni-kl.de
2612027Sjungma@eit.uni-kl.deimport os
2712027Sjungma@eit.uni-kl.de
2812027Sjungma@eit.uni-kl.deImport('main')
2912027Sjungma@eit.uni-kl.de
3012027Sjungma@eit.uni-kl.demain.Prepend(CPPPATH=Dir('./src'))
3112027Sjungma@eit.uni-kl.demain.Prepend(CPATH=Dir('./src'))
3212027Sjungma@eit.uni-kl.de
3312027Sjungma@eit.uni-kl.demain.Prepend(CXXFLAGS=['-DSC_INCLUDE_FX', '-pthread'])
3412027Sjungma@eit.uni-kl.demain.Prepend(CFLAGS=['-DSC_INCLUDE_FX', '-pthread'])
3512027Sjungma@eit.uni-kl.de
3612027Sjungma@eit.uni-kl.deconf = Configure(main)
3712027Sjungma@eit.uni-kl.de
3812027Sjungma@eit.uni-kl.deif main['PLATFORM'] == 'darwin':
3912027Sjungma@eit.uni-kl.de    main.Append(LINKFLAGS=['-undefined', 'dynamic_lookup'])
4012027Sjungma@eit.uni-kl.de
4112027Sjungma@eit.uni-kl.des_file = None
4212027Sjungma@eit.uni-kl.deif conf.CheckDeclaration("__i386__"):
4312027Sjungma@eit.uni-kl.de    s_file = 'i386.s'
4412027Sjungma@eit.uni-kl.deif conf.CheckDeclaration("__x86_64__"):
4512027Sjungma@eit.uni-kl.de    s_file = 'iX86_64.s'
4612027Sjungma@eit.uni-kl.deconf.Finish()
4712027Sjungma@eit.uni-kl.de
4812027Sjungma@eit.uni-kl.deif s_file is None:
4912027Sjungma@eit.uni-kl.de    print 'Unsupported CPU architecture!'
5012027Sjungma@eit.uni-kl.de    Exit(1)
5112027Sjungma@eit.uni-kl.de
5212027Sjungma@eit.uni-kl.desystemc_files = Glob('src/sysc/kernel/*.cpp')
5312027Sjungma@eit.uni-kl.desystemc_files += ['src/sysc/qt/qt.c', 'src/sysc/qt/md/' + s_file]
5412027Sjungma@eit.uni-kl.desystemc_files += Glob('src/sysc/communication/*.cpp')
5512027Sjungma@eit.uni-kl.desystemc_files += Glob('src/sysc/tracing/*.cpp')
5612027Sjungma@eit.uni-kl.desystemc_files += Glob('src/sysc/utils/*.cpp')
5712027Sjungma@eit.uni-kl.desystemc_files += Glob('src/sysc/datatypes/bit/*.cpp')
5812027Sjungma@eit.uni-kl.desystemc_files += Glob('src/sysc/datatypes/fx/*.cpp')
5912027Sjungma@eit.uni-kl.desystemc_files += Glob('src/sysc/datatypes/int/*.cpp')
6012027Sjungma@eit.uni-kl.desystemc_files += Glob('src/sysc/datatypes/misc/*.cpp')
6112027Sjungma@eit.uni-kl.de
6212027Sjungma@eit.uni-kl.demain.Library('libsystemc', systemc_files)
6312027Sjungma@eit.uni-kl.demain.SharedLibrary('libsystemc', systemc_files)
6412027Sjungma@eit.uni-kl.de
65