# A FreeBSD TARGET
# $Id: T_freebsd,v 1.14 2007/02/18 16:07:21 tlaronde Exp $
#
# Copyright 2004 Thierry LARONDE <tlaronde@polynum.com>
# Public Domain

#----- TARGET environment dependent
TARGET="freebsd"
TARGET_RELEASE=${TARGET_RELEASE:-$(uname -r)}
TARGET_ARCH=${TARGET_ARCH:-$(uname -m)}
DISTDIR=${DISTDIR:-/usr/local}
TARGETBINDIR="$DISTDIR/bin"
TARGETSBINDIR="$DISTDIR/sbin"

OBJECT_FORMAT="ELF"

# What kind of libraries are supported? static, sshared (static shared),
# dshared (dynamic shared), or unset if use default.
LIB_TYPES="static dshared"

# The substitution expression for translating rkcomp
# fixed library naming scheme in the host supported one. 
# static lib
LIB_A_TR='-e s!\(lib[^/]\{1,\}\)__\([0-9.]\{1,\}\)!\1.a.\2!'
LIB_A_TR="$LIB_A_TR "'-e s!\(lib[^/]\{1,\}\)__$!\1.a!'
LIB_A_TR="$LIB_A_TR "'-e s!\(lib[^/]\{1,\}\)__\([^0-9.]\)!\1.a\2!'

# The dynamic shared lib name.
# We take into account the fact that a lib can be not versionned.
# So we keep all the :<version> and removed the `:` if it exists.
LIB_DSH_TR='-e s!\(lib[^/]\{1,\}\)__\([0-9.]\{1,\}\)!\1.so.\2!'
LIB_DSH_TR="$LIB_DSH_TR "'-e s!\(lib[^/]\{1,\}\)__$!\1.so!'
LIB_DSH_TR="$LIB_DSH_TR "'-e s!\(lib[^/]\{1,\}\)__\([^0-9.]\)!\1.so\2!'

# Standard libes shall be mapped
CLIB=$(rk_which_lib_of libc__ stdio.h)
MATHLIB=$(rk_which_lib_of libm__ math.h)
YACCLIB=$(rk_which_lib_of liby__ NULL)
LEXLIB=$(rk_which_lib_of libl__ NULL)

# POSIX XSI extensions
ICONVLIB=$(rk_which_lib_of libiconv__ iconv.h)
RK_ICONV_DEFS=rk_iconv_defs.h
RK_PTY_TYPE=PTY_XSI

# C99
HAVE_VSNPRINTF=YES
