2006-11-24 04:48:57 +03:00
|
|
|
# $NetBSD: Makefile,v 1.7 2006/11/24 01:48:57 uwe Exp $
|
2003-10-26 04:06:27 +03:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2006-05-29 23:11:57 +04:00
|
|
|
MODULE= gdb6
|
2003-10-26 04:06:27 +03:00
|
|
|
|
|
|
|
FIND_ARGS= \! \( -type d -name sim -prune \)
|
|
|
|
|
|
|
|
CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \
|
|
|
|
--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-,"
|
|
|
|
|
|
|
|
MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
|
|
|
|
|
|
|
|
ALL_TARGET= all-gdb
|
|
|
|
INSTALL_TARGET= install-gdb
|
|
|
|
|
|
|
|
.include "${.CURDIR}/../Makefile.gnuhost"
|
|
|
|
|
2006-11-24 01:41:10 +03:00
|
|
|
CCADDFLAGS= -isystem ${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
|
2006-05-29 23:11:57 +04:00
|
|
|
|
|
|
|
NEWCONFIGDIR?= ${.CURDIR}/../..
|
|
|
|
MKNATIVE?= ${.CURDIR}/mknative-gdb
|
|
|
|
|
2006-11-24 04:48:57 +03:00
|
|
|
# Some configure tests require running a test program, which is not
|
|
|
|
# possible when cross-building. Provide configure with "cached"
|
|
|
|
# values in the environment.
|
|
|
|
MKNATIVE_CONFIGURE_PRESET= \
|
|
|
|
ac_cv_prog_cc_cross=yes \
|
|
|
|
ac_cv_func_fork_works=yes \
|
|
|
|
ac_cv_func_strcoll_works=yes \
|
|
|
|
bash_cv_func_ctype_nonascii=yes \
|
|
|
|
bash_cv_func_sigsetjmp=present \
|
|
|
|
bash_cv_func_strcoll_broken=no \
|
|
|
|
bash_cv_must_reinstall_sighandlers=no
|
|
|
|
|
|
|
|
|
2006-05-29 23:11:57 +04:00
|
|
|
native-gdb: .native/.configure_done
|
|
|
|
@echo 'Extracting GDB configury for a native toolchain.'
|
|
|
|
MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \
|
|
|
|
${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
|
|
|
|
|
|
|
|
.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
|
2006-05-30 08:22:40 +04:00
|
|
|
mkdir ${.OBJDIR}/.native 2>/dev/null || true
|
2006-05-29 23:11:57 +04:00
|
|
|
PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
|
2006-05-30 08:22:40 +04:00
|
|
|
(cd ${.OBJDIR}/.native && ${CONFIGURE_ENV:NC*:NLD*} \
|
2006-05-29 23:11:57 +04:00
|
|
|
CC_FOR_BUILD=${HOST_CC:Q} \
|
|
|
|
CC=${CC:Q}' '${CCADDFLAGS:Q} \
|
|
|
|
CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
|
2006-11-24 01:41:10 +03:00
|
|
|
CPP=${CPP:Q}' '-isystem' '${DESTDIR}/usr/include \
|
2006-05-29 23:11:57 +04:00
|
|
|
CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
|
|
|
|
MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
|
|
|
|
XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
|
|
|
|
LIBS=-lintl \
|
2006-11-24 04:48:57 +03:00
|
|
|
${MKNATIVE_CONFIGURE_PRESET} \
|
2006-05-29 23:11:57 +04:00
|
|
|
${HOST_SH} ${GNUHOSTDIST}/configure \
|
2006-07-03 02:15:14 +04:00
|
|
|
--prefix=/usr \
|
2006-07-21 15:23:02 +04:00
|
|
|
--with-separate-debug-dir=/usr/libdata/debug \
|
2006-05-29 23:11:57 +04:00
|
|
|
--build=`${GNUHOSTDIST}/config.guess` \
|
|
|
|
--host=${MACHINE_GNU_PLATFORM} \
|
|
|
|
--target=${MACHINE_GNU_PLATFORM}) && \
|
2006-11-24 04:48:57 +03:00
|
|
|
(cd ${.OBJDIR}/.native && \
|
|
|
|
/usr/bin/env ${MKNATIVE_CONFIGURE_PRESET} \
|
|
|
|
${MAKE} configure-host) && \
|
2006-05-30 08:22:40 +04:00
|
|
|
(cd ${.OBJDIR}/.native/bfd && ${MAKE} bfd.h bfdver.h) && \
|
|
|
|
(cd ${.OBJDIR}/.native/gdb && ${MAKE} init.c version.c)
|
2006-05-29 23:11:57 +04:00
|
|
|
@touch $@
|
|
|
|
|
|
|
|
clean: clean.native
|
|
|
|
clean.native:
|
|
|
|
-rm -r -f .native
|