SConscript revision 12653
17110Sgblack@eecs.umich.edu# -*- mode:python -*- 27110Sgblack@eecs.umich.edu 37110Sgblack@eecs.umich.edu# Copyright (c) 2013 Andreas Sandberg 47110Sgblack@eecs.umich.edu# All rights reserved. 57110Sgblack@eecs.umich.edu# 67110Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 77110Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are 87110Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright 97110Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 107110Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 117110Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 127110Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution; 137110Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its 147110Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from 156253Sgblack@eecs.umich.edu# this software without specific prior written permission. 166253Sgblack@eecs.umich.edu# 176253Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 186253Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 196253Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 206253Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 216253Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 226253Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 236253Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 246253Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 256253Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 266253Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 276253Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 286253Sgblack@eecs.umich.edu# 296253Sgblack@eecs.umich.edu# Authors: Andreas Sandberg 306253Sgblack@eecs.umich.edu 316253Sgblack@eecs.umich.eduImport('main') 326253Sgblack@eecs.umich.edu 336253Sgblack@eecs.umich.edumain.Prepend(CPPPATH=Dir('./include')) 346253Sgblack@eecs.umich.edu 356253Sgblack@eecs.umich.edufpenv = main.Clone() 366253Sgblack@eecs.umich.edu 376253Sgblack@eecs.umich.edu# By default gcc uses c89 and clang uses c99. For fputils to compile 386253Sgblack@eecs.umich.edu# we need to use c99. 396253Sgblack@eecs.umich.eduif fpenv['GCC']: 406253Sgblack@eecs.umich.edu fpenv.Append(CCFLAGS=['-std=c99']) 416253Sgblack@eecs.umich.edu 426253Sgblack@eecs.umich.edufpenv.Library('fputils', [ 436253Sgblack@eecs.umich.edu fpenv.SharedObject('fp64.c'), 446253Sgblack@eecs.umich.edu fpenv.SharedObject('fp80.c'), 456253Sgblack@eecs.umich.edu ]) 466253Sgblack@eecs.umich.edu 476253Sgblack@eecs.umich.edumain.Append(LIBS=['fputils']) 486306Sgblack@eecs.umich.edumain.Prepend(LIBPATH=[Dir('.')]) 496253Sgblack@eecs.umich.edu 506253Sgblack@eecs.umich.edu