source: waflib/Tools/gxx.py @ 7079887

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 7079887 was 0fa325b, checked in by Paul Brossier <piem@piem.org>, 11 years ago

waf: unpack

  • Property mode set to 100644
File size: 2.7 KB
Line 
1#! /usr/bin/env python
2# encoding: utf-8
3# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
5import os,sys
6from waflib import Configure,Options,Utils
7from waflib.Tools import ccroot,ar
8from waflib.Configure import conf
9@conf
10def find_gxx(conf):
11        cxx=conf.find_program(['g++','c++'],var='CXX')
12        cxx=conf.cmd_to_list(cxx)
13        conf.get_cc_version(cxx,gcc=True)
14        conf.env.CXX_NAME='gcc'
15        conf.env.CXX=cxx
16@conf
17def gxx_common_flags(conf):
18        v=conf.env
19        v['CXX_SRC_F']=[]
20        v['CXX_TGT_F']=['-c','-o']
21        if not v['LINK_CXX']:v['LINK_CXX']=v['CXX']
22        v['CXXLNK_SRC_F']=[]
23        v['CXXLNK_TGT_F']=['-o']
24        v['CPPPATH_ST']='-I%s'
25        v['DEFINES_ST']='-D%s'
26        v['LIB_ST']='-l%s'
27        v['LIBPATH_ST']='-L%s'
28        v['STLIB_ST']='-l%s'
29        v['STLIBPATH_ST']='-L%s'
30        v['RPATH_ST']='-Wl,-rpath,%s'
31        v['SONAME_ST']='-Wl,-h,%s'
32        v['SHLIB_MARKER']='-Wl,-Bdynamic'
33        v['STLIB_MARKER']='-Wl,-Bstatic'
34        v['cxxprogram_PATTERN']='%s'
35        v['CXXFLAGS_cxxshlib']=['-fPIC']
36        v['LINKFLAGS_cxxshlib']=['-shared']
37        v['cxxshlib_PATTERN']='lib%s.so'
38        v['LINKFLAGS_cxxstlib']=['-Wl,-Bstatic']
39        v['cxxstlib_PATTERN']='lib%s.a'
40        v['LINKFLAGS_MACBUNDLE']=['-bundle','-undefined','dynamic_lookup']
41        v['CXXFLAGS_MACBUNDLE']=['-fPIC']
42        v['macbundle_PATTERN']='%s.bundle'
43@conf
44def gxx_modifier_win32(conf):
45        v=conf.env
46        v['cxxprogram_PATTERN']='%s.exe'
47        v['cxxshlib_PATTERN']='%s.dll'
48        v['implib_PATTERN']='lib%s.dll.a'
49        v['IMPLIB_ST']='-Wl,--out-implib,%s'
50        v['CXXFLAGS_cxxshlib']=[]
51        v.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
52@conf
53def gxx_modifier_cygwin(conf):
54        gxx_modifier_win32(conf)
55        v=conf.env
56        v['cxxshlib_PATTERN']='cyg%s.dll'
57        v.append_value('LINKFLAGS_cxxshlib',['-Wl,--enable-auto-image-base'])
58        v['CXXFLAGS_cxxshlib']=[]
59@conf
60def gxx_modifier_darwin(conf):
61        v=conf.env
62        v['CXXFLAGS_cxxshlib']=['-fPIC','-compatibility_version','1','-current_version','1']
63        v['LINKFLAGS_cxxshlib']=['-dynamiclib']
64        v['cxxshlib_PATTERN']='lib%s.dylib'
65        v['FRAMEWORKPATH_ST']='-F%s'
66        v['FRAMEWORK_ST']=['-framework']
67        v['ARCH_ST']=['-arch']
68        v['LINKFLAGS_cxxstlib']=[]
69        v['SHLIB_MARKER']=[]
70        v['STLIB_MARKER']=[]
71        v['SONAME_ST']=[]
72@conf
73def gxx_modifier_aix(conf):
74        v=conf.env
75        v['LINKFLAGS_cxxprogram']=['-Wl,-brtl']
76        v['LINKFLAGS_cxxshlib']=['-shared','-Wl,-brtl,-bexpfull']
77        v['SHLIB_MARKER']=[]
78@conf
79def gxx_modifier_hpux(conf):
80        v=conf.env
81        v['SHLIB_MARKER']=[]
82        v['STLIB_MARKER']='-Bstatic'
83        v['CFLAGS_cxxshlib']=['-fPIC','-DPIC']
84        v['cxxshlib_PATTERN']='lib%s.sl'
85@conf
86def gxx_modifier_platform(conf):
87        gxx_modifier_func=getattr(conf,'gxx_modifier_'+conf.env.DEST_OS,None)
88        if gxx_modifier_func:
89                gxx_modifier_func()
90def configure(conf):
91        conf.find_gxx()
92        conf.find_ar()
93        conf.gxx_common_flags()
94        conf.gxx_modifier_platform()
95        conf.cxx_load_tools()
96        conf.cxx_add_flags()
97        conf.link_add_flags()
Note: See TracBrowser for help on using the repository browser.