2003-04-10 02:38:24 +04:00
|
|
|
# $NetBSD: Makefile,v 1.8 2003/04/09 22:38:24 thorpej Exp $
|
2001-11-09 08:52:20 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.include <bsd.own.mk>
|
2001-11-09 08:52:20 +03:00
|
|
|
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
.if (defined(HOSTPROG) && \
|
|
|
|
(${TOOLCHAIN_MISSING} != "yes" || defined(EXTERNAL_TOOLCHAIN))) || \
|
|
|
|
${MKBFD} != "no"
|
2002-09-19 07:09:31 +04:00
|
|
|
TOP= ${NETBSDSRCDIR}/gnu
|
2001-11-09 08:52:20 +03:00
|
|
|
DIST= ${TOP}/dist/toolchain
|
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
PROG= dbsym
|
|
|
|
MAN= dbsym.8
|
2001-11-09 08:52:20 +03:00
|
|
|
|
2002-01-29 13:20:28 +03:00
|
|
|
CPPFLAGS+= -I${BFDDIR} -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include
|
2001-11-09 08:52:20 +03:00
|
|
|
|
2003-04-10 02:38:24 +04:00
|
|
|
.if !defined(HOSTPROG) && ${MKPIC} != "no"
|
|
|
|
DPADD+= ${BFDDIR}/libbfd_pic.a
|
|
|
|
.else
|
2001-11-13 02:16:17 +03:00
|
|
|
DPADD+= ${BFDDIR}/libbfd.a
|
2003-04-10 02:38:24 +04:00
|
|
|
.endif
|
2001-11-13 02:16:17 +03:00
|
|
|
LDADD+= -L${BFDDIR} -lbfd
|
2001-11-09 08:52:20 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
DPADD+= ${IBERTYDIR}/libiberty.a
|
|
|
|
LDADD+= -L${IBERTYDIR} -liberty
|
2001-11-09 08:52:20 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.ifndef HOSTPROG
|
2001-11-09 08:52:20 +03:00
|
|
|
.include "${TOP}/lib/libbfd/arch/${MACHINE_ARCH}/defs.mk"
|
|
|
|
|
2002-09-19 07:09:31 +04:00
|
|
|
BFDDIR!= cd ${TOP}/lib/libbfd && ${PRINTOBJDIR}
|
2001-11-13 02:16:17 +03:00
|
|
|
IBERTYDIR!= cd ${TOP}/lib/libiberty && ${PRINTOBJDIR}
|
2001-11-09 08:52:20 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
CPPFLAGS+= -I${TOP}/lib/libbfd/arch/${MACHINE_ARCH} ${G_INCLUDES}
|
2001-11-09 08:52:20 +03:00
|
|
|
LDADD+= -lintl
|
|
|
|
DPADD+= ${LIBINTL}
|
2001-11-13 02:16:17 +03:00
|
|
|
.endif # HOSTPROG
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
.endif # MKBFD != no
|
2001-11-09 08:52:20 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.ifndef HOSTPROG
|
2001-11-09 08:52:20 +03:00
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.endif # HOSTPROG
|