ar.py 634 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2006-2018 (ita)
  4. # Ralf Habacker, 2006 (rh)
  5. """
  6. The **ar** program creates static libraries. This tool is almost always loaded
  7. from others (C, C++, D, etc) for static library support.
  8. """
  9. from waflib.Configure import conf
  10. @conf
  11. def find_ar(conf):
  12. """Configuration helper used by C/C++ tools to enable the support for static libraries"""
  13. conf.load('ar')
  14. def configure(conf):
  15. """Finds the ar program and sets the default flags in ``conf.env.ARFLAGS``"""
  16. conf.find_program('ar', var='AR')
  17. conf.add_os_flags('ARFLAGS')
  18. if not conf.env.ARFLAGS:
  19. conf.env.ARFLAGS = ['rcs']