source: trunk/server/buildtools/wafsamba/irixcc.py@ 814

Last change on this file since 814 was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 1.8 KB
Line 
1
2# compiler definition for irix/MIPSpro cc compiler
3# based on suncc.py from waf
4
5import os, optparse
6import Utils, Options, Configure
7import ccroot, ar
8from Configure import conftest
9
10from compiler_cc import c_compiler
11
12c_compiler['irix'] = ['gcc', 'irixcc']
13
14@conftest
15def find_irixcc(conf):
16 v = conf.env
17 cc = None
18 if v['CC']: cc = v['CC']
19 elif 'CC' in conf.environ: cc = conf.environ['CC']
20 if not cc: cc = conf.find_program('cc', var='CC')
21 if not cc: conf.fatal('irixcc was not found')
22 cc = conf.cmd_to_list(cc)
23
24 try:
25 if Utils.cmd_output(cc + ['-version']) != '':
26 conf.fatal('irixcc %r was not found' % cc)
27 except ValueError:
28 conf.fatal('irixcc -v could not be executed')
29
30 v['CC'] = cc
31 v['CC_NAME'] = 'irix'
32
33@conftest
34def irixcc_common_flags(conf):
35 v = conf.env
36
37 v['CC_SRC_F'] = ''
38 v['CC_TGT_F'] = ['-c', '-o', '']
39 v['CPPPATH_ST'] = '-I%s' # template for adding include paths
40
41 # linker
42 if not v['LINK_CC']: v['LINK_CC'] = v['CC']
43 v['CCLNK_SRC_F'] = ''
44 v['CCLNK_TGT_F'] = ['-o', '']
45
46 v['LIB_ST'] = '-l%s' # template for adding libs
47 v['LIBPATH_ST'] = '-L%s' # template for adding libpaths
48 v['STATICLIB_ST'] = '-l%s'
49 v['STATICLIBPATH_ST'] = '-L%s'
50 v['CCDEFINES_ST'] = '-D%s'
51
52# v['SONAME_ST'] = '-Wl,-h -Wl,%s'
53# v['SHLIB_MARKER'] = '-Bdynamic'
54# v['STATICLIB_MARKER'] = '-Bstatic'
55
56 # program
57 v['program_PATTERN'] = '%s'
58
59 # shared library
60# v['shlib_CCFLAGS'] = ['-Kpic', '-DPIC']
61# v['shlib_LINKFLAGS'] = ['-G']
62 v['shlib_PATTERN'] = 'lib%s.so'
63
64 # static lib
65# v['staticlib_LINKFLAGS'] = ['-Bstatic']
66# v['staticlib_PATTERN'] = 'lib%s.a'
67
68detect = '''
69find_irixcc
70find_cpp
71find_ar
72irixcc_common_flags
73cc_load_tools
74cc_add_flags
75link_add_flags
76'''
77
Note: See TracBrowser for help on using the repository browser.