source: waflib/Tools/gcc.py @ 9e58e78

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

waf, waflib: update to 1.7.13

  • 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
5from waflib.Tools import ccroot,ar
6from waflib.Configure import conf
7@conf
8def find_gcc(conf):
9        cc=conf.find_program(['gcc','cc'],var='CC')
10        cc=conf.cmd_to_list(cc)
11        conf.get_cc_version(cc,gcc=True)
12        conf.env.CC_NAME='gcc'
13        conf.env.CC=cc
14@conf
15def gcc_common_flags(conf):
16        v=conf.env
17        v['CC_SRC_F']=[]
18        v['CC_TGT_F']=['-c','-o']
19        if not v['LINK_CC']:v['LINK_CC']=v['CC']
20        v['CCLNK_SRC_F']=[]
21        v['CCLNK_TGT_F']=['-o']
22        v['CPPPATH_ST']='-I%s'
23        v['DEFINES_ST']='-D%s'
24        v['LIB_ST']='-l%s'
25        v['LIBPATH_ST']='-L%s'
26        v['STLIB_ST']='-l%s'
27        v['STLIBPATH_ST']='-L%s'
28        v['RPATH_ST']='-Wl,-rpath,%s'
29        v['SONAME_ST']='-Wl,-h,%s'
30        v['SHLIB_MARKER']='-Wl,-Bdynamic'
31        v['STLIB_MARKER']='-Wl,-Bstatic'
32        v['cprogram_PATTERN']='%s'
33        v['CFLAGS_cshlib']=['-fPIC']
34        v['LINKFLAGS_cshlib']=['-shared']
35        v['cshlib_PATTERN']='lib%s.so'
36        v['LINKFLAGS_cstlib']=['-Wl,-Bstatic']
37        v['cstlib_PATTERN']='lib%s.a'
38        v['LINKFLAGS_MACBUNDLE']=['-bundle','-undefined','dynamic_lookup']
39        v['CFLAGS_MACBUNDLE']=['-fPIC']
40        v['macbundle_PATTERN']='%s.bundle'
41@conf
42def gcc_modifier_win32(conf):
43        v=conf.env
44        v['cprogram_PATTERN']='%s.exe'
45        v['cshlib_PATTERN']='%s.dll'
46        v['implib_PATTERN']='lib%s.dll.a'
47        v['IMPLIB_ST']='-Wl,--out-implib,%s'
48        v['CFLAGS_cshlib']=[]
49        v.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
50@conf
51def gcc_modifier_cygwin(conf):
52        gcc_modifier_win32(conf)
53        v=conf.env
54        v['cshlib_PATTERN']='cyg%s.dll'
55        v.append_value('LINKFLAGS_cshlib',['-Wl,--enable-auto-image-base'])
56        v['CFLAGS_cshlib']=[]
57@conf
58def gcc_modifier_darwin(conf):
59        v=conf.env
60        v['CFLAGS_cshlib']=['-fPIC']
61        v['LINKFLAGS_cshlib']=['-dynamiclib','-Wl,-compatibility_version,1','-Wl,-current_version,1']
62        v['cshlib_PATTERN']='lib%s.dylib'
63        v['FRAMEWORKPATH_ST']='-F%s'
64        v['FRAMEWORK_ST']=['-framework']
65        v['ARCH_ST']=['-arch']
66        v['LINKFLAGS_cstlib']=[]
67        v['SHLIB_MARKER']=[]
68        v['STLIB_MARKER']=[]
69        v['SONAME_ST']=[]
70@conf
71def gcc_modifier_aix(conf):
72        v=conf.env
73        v['LINKFLAGS_cprogram']=['-Wl,-brtl']
74        v['LINKFLAGS_cshlib']=['-shared','-Wl,-brtl,-bexpfull']
75        v['SHLIB_MARKER']=[]
76@conf
77def gcc_modifier_hpux(conf):
78        v=conf.env
79        v['SHLIB_MARKER']=[]
80        v['STLIB_MARKER']='-Bstatic'
81        v['CFLAGS_cshlib']=['-fPIC','-DPIC']
82        v['cshlib_PATTERN']='lib%s.sl'
83@conf
84def gcc_modifier_openbsd(conf):
85        conf.env.SONAME_ST=[]
86@conf
87def gcc_modifier_platform(conf):
88        gcc_modifier_func=getattr(conf,'gcc_modifier_'+conf.env.DEST_OS,None)
89        if gcc_modifier_func:
90                gcc_modifier_func()
91def configure(conf):
92        conf.find_gcc()
93        conf.find_ar()
94        conf.gcc_common_flags()
95        conf.gcc_modifier_platform()
96        conf.cc_load_tools()
97        conf.cc_add_flags()
98        conf.link_add_flags()
Note: See TracBrowser for help on using the repository browser.