waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

irixcc.py (1171B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # imported from samba
      4 
      5 """
      6 Compiler definition for irix/MIPSpro cc compiler
      7 """
      8 
      9 from waflib import Errors
     10 from waflib.Tools import ccroot, ar
     11 from waflib.Configure import conf
     12 
     13 @conf
     14 def find_irixcc(conf):
     15 	v = conf.env
     16 	cc = conf.find_program('cc', var='CC')
     17 	try:
     18 		conf.cmd_and_log(cc + ['-version'])
     19 	except Errors.WafError:
     20 		conf.fatal('%r -version could not be executed' % cc)
     21 	v.CC_NAME = 'irix'
     22 
     23 @conf
     24 def irixcc_common_flags(conf):
     25 	v = conf.env
     26 
     27 	v.CC_SRC_F            = ''
     28 	v.CC_TGT_F            = ['-c', '-o']
     29 	v.CPPPATH_ST          = '-I%s'
     30 	v.DEFINES_ST          = '-D%s'
     31 
     32 	if not v.LINK_CC:
     33 		v.LINK_CC = v.CC
     34 
     35 	v.CCLNK_SRC_F         = ''
     36 	v.CCLNK_TGT_F         = ['-o']
     37 
     38 	v.LIB_ST              = '-l%s' # template for adding libs
     39 	v.LIBPATH_ST          = '-L%s' # template for adding libpaths
     40 	v.STLIB_ST            = '-l%s'
     41 	v.STLIBPATH_ST        = '-L%s'
     42 
     43 	v.cprogram_PATTERN    = '%s'
     44 	v.cshlib_PATTERN      = 'lib%s.so'
     45 	v.cstlib_PATTERN      = 'lib%s.a'
     46 
     47 def configure(conf):
     48 	conf.find_irixcc()
     49 	conf.find_ar()
     50 	conf.irixcc_common_flags()
     51 	conf.cc_load_tools()
     52 	conf.cc_add_flags()
     53 	conf.link_add_flags()
     54