jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4KB

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