Browse Source

build: support some non-standard ar variants

This adds support for the TI and Microsoft (lib.exe) variants of
the ar utility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
tags/n1.0
Mans Rullgard 12 years ago
parent
commit
3dbc777c7f
2 changed files with 14 additions and 1 deletions
  1. +13
    -0
      configure
  2. +1
    -1
      library.mak

+ 13
- 0
configure View File

@@ -2415,6 +2415,17 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
DEPCCFLAGS=$_flags
fi

if $ar 2>&1 | grep -q Microsoft; then
arflags="-nologo"
ar_o='-out:$@'
elif $ar 2>&1 | grep -q 'Texas Instruments'; then
arflags="rq"
ar_o='$@'
else
arflags="rc"
ar_o='$@'
fi

add_cflags $extra_cflags
add_asflags $extra_cflags

@@ -3645,6 +3656,8 @@ DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS)
YASM=$yasmexe
DEPYASM=$yasmexe
AR=$ar
ARFLAGS=$arflags
AR_O=$ar_o
RANLIB=$ranlib
LN_S=$ln_s
CPPFLAGS=$CPPFLAGS


+ 1
- 1
library.mak View File

@@ -25,7 +25,7 @@ $(TESTOBJS): CPPFLAGS += -DTEST

$(SUBDIR)$(LIBNAME): $(OBJS)
$(RM) $@
$(AR) rc $@ $^ $(EXTRAOBJS)
$(AR) $(ARFLAGS) $(AR_O) $^ $(EXTRAOBJS)
$(RANLIB) $@

install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig


Loading…
Cancel
Save