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.

68 lines
1.6KB

  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2006-2010 (ita)
  4. # Ralf Habacker, 2006 (rh)
  5. # Yinon Ehrlich, 2009
  6. # Michael Kuhn, 2009
  7. from waflib.Tools import ccroot, ar
  8. from waflib.Configure import conf
  9. @conf
  10. def find_xlcxx(conf):
  11. """
  12. Detect the Aix C++ compiler
  13. """
  14. cxx = conf.find_program(['xlc++_r', 'xlc++'], var='CXX')
  15. conf.get_xlc_version(cxx)
  16. conf.env.CXX_NAME = 'xlc++'
  17. @conf
  18. def xlcxx_common_flags(conf):
  19. """
  20. Flags required for executing the Aix C++ compiler
  21. """
  22. v = conf.env
  23. v['CXX_SRC_F'] = []
  24. v['CXX_TGT_F'] = ['-c', '-o']
  25. # linker
  26. if not v['LINK_CXX']: v['LINK_CXX'] = v['CXX']
  27. v['CXXLNK_SRC_F'] = []
  28. v['CXXLNK_TGT_F'] = ['-o']
  29. v['CPPPATH_ST'] = '-I%s'
  30. v['DEFINES_ST'] = '-D%s'
  31. v['LIB_ST'] = '-l%s' # template for adding libs
  32. v['LIBPATH_ST'] = '-L%s' # template for adding libpaths
  33. v['STLIB_ST'] = '-l%s'
  34. v['STLIBPATH_ST'] = '-L%s'
  35. v['RPATH_ST'] = '-Wl,-rpath,%s'
  36. v['SONAME_ST'] = []
  37. v['SHLIB_MARKER'] = []
  38. v['STLIB_MARKER'] = []
  39. # program
  40. v['LINKFLAGS_cxxprogram']= ['-Wl,-brtl']
  41. v['cxxprogram_PATTERN'] = '%s'
  42. # shared library
  43. v['CXXFLAGS_cxxshlib'] = ['-fPIC']
  44. v['LINKFLAGS_cxxshlib'] = ['-G', '-Wl,-brtl,-bexpfull']
  45. v['cxxshlib_PATTERN'] = 'lib%s.so'
  46. # static lib
  47. v['LINKFLAGS_cxxstlib'] = []
  48. v['cxxstlib_PATTERN'] = 'lib%s.a'
  49. def configure(conf):
  50. conf.find_xlcxx()
  51. conf.find_ar()
  52. conf.xlcxx_common_flags()
  53. conf.cxx_load_tools()
  54. conf.cxx_add_flags()
  55. conf.link_add_flags()