/ src / ref / SConscript
SConscript
 1  # Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved.
 2  #
 3  # Redistribution and use in source and binary forms, with or without modification,
 4  # are permitted provided that the following conditions are met:
 5  # 1. Redistributions of source code must retain the above copyright notice,
 6  #    this list of conditions and the following disclaimer.
 7  # 2. Redistributions in binary form must reproduce the above copyright notice,
 8  #    this list of conditions and the following disclaimer in the documentation
 9  #    and/or other materials provided with the distribution.
10  # 3. Neither the name of the copyright holder nor the names of its contributors
11  #    may be used to endorse or promote products derived from this software without
12  #    specific prior written permission.
13  #
14  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15  # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17  # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18  # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19  # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
20  # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21  # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23  # POSSIBILITY OF SUCH DAMAGE.
24  
25  # Inherit global environment
26  Import('env')
27  from os.path import join as joinpath
28  
29  builddir = joinpath(env['BUILDROOT'], 'src', 'ref')
30  
31  #
32  # Reference files, for the functions where optimized version
33  # doesn't exist
34  #
35  ref_excludes = ['amd_pow.c', 'exp2.c',
36                  'exp_tables*.c', 'MapEntryPoints.c', 
37                  'MapEntryPoints.c']
38  
39  ref_srcs = Glob('*.[cS]',    exclude=ref_excludes) 
40  ref_objs = env.StaticObject(ref_srcs)
41  
42  cmplx_objs = SConscript('cmplx/SConscript',
43  			exports = {'env' : env},
44  			duplicate = 0,
45                          src_dir = joinpath(env['CWD'], 'cmplx'),
46                          variant_dir = joinpath(builddir, 'cmplx'))
47  
48  objects  = ref_objs + cmplx_objs
49  
50  Return('objects')
51  
52