wscript 932 Bytes
Newer Older
Marc Betoule's avatar
Marc Betoule committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# -*- mode: python -*-

#from waflib.Task import Task
#class make(Task): 
#    def run(self): 
#        return self.exec_command('make HEALPIX_TARGET=spherelib' % (
#            self.inputs[0].abspath(), 
#            self.outputs[0].abspath()))

import os.path as op

def build( bld ):
    #bld(rule='make HEALPIX_TARGET=spherelib', target='spherelib')

    sources = bld.path.ant_glob('*.cpp', bld=False)
    lib = bld( name = 'HEALPIX',
               rule='echo ${TGT};cd ../healpix;pwd;make HEALPIX_TARGET=spherelib TGT=../build/${TGT}',
               target = "spherelib",
               includes = './spherelib/include',
               export_defines  = ['HEALPIXDATA="'+op.abspath('./data')+'"'],
               export_includes = './spherelib/include',
               stlibpath    = ['./spherelib/lib'],
               stlib        = ['healpix_cxx', 'cxxsupport', 'psht', 'c_utils', 'fftpack', 'cfitsio'],
               )