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.

63 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. import os
  8. from waflib import Utils
  9. from waflib.Tools import ccroot, ar
  10. from waflib.Configure import conf
  11. @conf
  12. def find_irixcc(conf):
  13. v = conf.env
  14. cc = None
  15. if v['CC']: cc = v['CC']
  16. elif 'CC' in conf.environ: cc = conf.environ['CC']
  17. if not cc: cc = conf.find_program('cc', var='CC')
  18. if not cc: conf.fatal('irixcc was not found')
  19. try:
  20. conf.cmd_and_log(cc + ['-version'])
  21. except Exception:
  22. conf.fatal('%r -version could not be executed' % cc)
  23. v['CC'] = cc
  24. v['CC_NAME'] = 'irix'
  25. @conf
  26. def irixcc_common_flags(conf):
  27. v = conf.env
  28. v['CC_SRC_F'] = ''
  29. v['CC_TGT_F'] = ['-c', '-o']
  30. v['CPPPATH_ST'] = '-I%s'
  31. v['DEFINES_ST'] = '-D%s'
  32. # linker
  33. if not v['LINK_CC']: v['LINK_CC'] = v['CC']
  34. v['CCLNK_SRC_F'] = ''
  35. v['CCLNK_TGT_F'] = ['-o']
  36. v['LIB_ST'] = '-l%s' # template for adding libs
  37. v['LIBPATH_ST'] = '-L%s' # template for adding libpaths
  38. v['STLIB_ST'] = '-l%s'
  39. v['STLIBPATH_ST'] = '-L%s'
  40. v['cprogram_PATTERN'] = '%s'
  41. v['cshlib_PATTERN'] = 'lib%s.so'
  42. v['cstlib_PATTERN'] = 'lib%s.a'
  43. def configure(conf):
  44. conf.find_irixcc()
  45. conf.find_cpp()
  46. conf.find_ar()
  47. conf.irixcc_common_flags()
  48. conf.cc_load_tools()
  49. conf.cc_add_flags()
  50. conf.link_add_flags()