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