freebsd-dev/gnu/usr.bin/binutils/libiberty/Makefile
David E. O'Brien dd1cd2eb67 Rev 1.10 bogusly tested the kernel version, not the libc version.
The version of the kernel has no bearing on what is in libc.
We now search for basename in libc to determin if we need to include
the libiberty version in the build.

This is all still a bit bogus as it will (like the sysctl method) cause
basename.o to be linked into the cross-build as well as the host build.  It
would probably be better to test if we were doing the initial host build and
unconditionally include that.  Once we've generated the target libc we know
that basename is available.  (maybe test for $TOOLS_PREFIX or something).

Submitted by:	peter
2001-09-14 23:07:02 +00:00

24 lines
550 B
Makefile

# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/libiberty
LIB= iberty
SRCS= argv.c choose-temp.c concat.c cp-demangle.c cplus-dem.c \
dyn-string.c getopt.c getopt1.c getpwd.c getruntime.c \
hex.c floatformat.c lbasename.c objalloc.c obstack.c safe-ctype.c \
xatexit.c xexit.c xmalloc.c \
xstrdup.c xstrerror.c
LIBC_BASENAME!= ar tv /usr/lib/libc.a | grep basename
.if ${LIBC_BASENAME} == ""
SRCS+= basename.c
.endif
CFLAGS+= -DHAVE_CONFIG_H
NOPROFILE= true
NOPIC= true
INTERNALLIB= true
INTERNALSTATICLIB=true
.include <bsd.lib.mk>