2004-06-25 06:48:54 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-04-25 18:08:56 +00:00
|
|
|
.include <src.opts.mk>
|
|
|
|
|
2004-06-25 06:48:54 +00:00
|
|
|
VERSION= "6.1.1 [FreeBSD]"
|
|
|
|
VENDOR= marcel
|
|
|
|
|
2015-06-16 22:25:08 +00:00
|
|
|
PACKAGE= gdb
|
|
|
|
|
2017-02-11 20:12:54 +00:00
|
|
|
BMAKE_GDB= ${.CURDIR:H}
|
|
|
|
BMAKE_ROOT= ${BMAKE_GDB:H}
|
2004-06-25 06:48:54 +00:00
|
|
|
BMAKE_BU= ${BMAKE_ROOT}/binutils
|
|
|
|
|
2017-02-11 20:12:54 +00:00
|
|
|
CNTRB_BU= ${SRCTOP}/contrib/binutils
|
|
|
|
CNTRB_GDB= ${SRCTOP}/contrib/gdb
|
2004-06-25 06:48:54 +00:00
|
|
|
|
2017-02-11 20:12:54 +00:00
|
|
|
OBJ_BU= ${OBJTOP}/gnu/usr.bin/binutils
|
|
|
|
OBJ_GDB= ${OBJTOP}/gnu/usr.bin/gdb
|
2004-06-25 06:48:54 +00:00
|
|
|
|
2010-11-10 06:39:49 +00:00
|
|
|
# These assignments duplicate much of the functionality of
|
|
|
|
# MACHINE_CPUARCH, but there's no easy way to export make functions...
|
|
|
|
|
|
|
|
.if defined(TARGET_ARCH)
|
2017-08-12 17:07:27 +00:00
|
|
|
TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
|
2010-11-10 06:39:49 +00:00
|
|
|
.else
|
|
|
|
TARGET_CPUARCH=${MACHINE_CPUARCH}
|
|
|
|
.endif
|
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
|
|
|
TARGET_SUBDIR= ${BMAKE_GDB}/arch/${TARGET_CPUARCH}
|
2004-06-25 06:48:54 +00:00
|
|
|
|
2004-12-05 04:08:22 +00:00
|
|
|
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
|
|
|
|
GDB_CROSS_DEBUGGER=
|
|
|
|
.endif
|
|
|
|
|
2004-06-25 06:48:54 +00:00
|
|
|
.PATH: ${CNTRB_GDB}/gdb ${CNTRB_GDB}/gdb/cli ${CNTRB_GDB}/gdb/mi \
|
|
|
|
${CNTRB_GDB}/gdb/signals ${CNTRB_GDB}/gdb/tui ${TARGET_SUBDIR}
|
|
|
|
|
2018-02-06 12:12:44 +00:00
|
|
|
CFLAGS+= -DHAVE_CONFIG_H -DRL_NO_COMPAT -DMI_OUT=1
|
2013-06-07 21:40:02 +00:00
|
|
|
CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\"
|
2004-06-25 06:48:54 +00:00
|
|
|
CFLAGS+= -I.
|
|
|
|
CFLAGS+= -I${TARGET_SUBDIR}
|
2010-11-10 06:39:49 +00:00
|
|
|
CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARGET_CPUARCH}
|
2004-06-25 06:48:54 +00:00
|
|
|
CFLAGS+= -I${CNTRB_GDB}/gdb
|
|
|
|
CFLAGS+= -I${CNTRB_GDB}/gdb/config
|
|
|
|
CFLAGS+= -I${CNTRB_BU}/include
|
2010-11-01 20:09:54 +00:00
|
|
|
CFLAGS+= -I${CNTRB_GDB}/include
|
2004-06-25 06:48:54 +00:00
|
|
|
CFLAGS+= -I${CNTRB_BU}/bfd
|
2019-09-12 15:50:14 +00:00
|
|
|
CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit
|
2004-06-25 06:48:54 +00:00
|
|
|
|
2020-03-29 23:59:14 +00:00
|
|
|
# Some bits here currently rely on some of the linker-merging magic that happens
|
|
|
|
# with -fcommon. While this is the default right now, explicitly set -fcommon
|
|
|
|
# so that it continues to build when the default flips.
|
2020-04-10 14:01:07 +00:00
|
|
|
CFCOMMONFLAG= -fcommon
|
2020-03-29 23:59:14 +00:00
|
|
|
|
2004-06-25 06:48:54 +00:00
|
|
|
GENSRCS+= nm.h tm.h
|
|
|
|
|
2004-11-30 05:12:37 +00:00
|
|
|
.if defined(GDB_CROSS_DEBUGGER)
|
2017-02-11 20:12:54 +00:00
|
|
|
CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H}
|
2004-11-30 05:12:37 +00:00
|
|
|
GDB_SUFFIX= -${TARGET_ARCH}
|
2014-04-13 05:21:56 +00:00
|
|
|
MAN=
|
2020-03-30 20:05:09 +00:00
|
|
|
.else
|
2017-04-25 18:08:56 +00:00
|
|
|
BINDIR?= /usr/libexec
|
|
|
|
MAN=
|
2004-11-30 05:12:37 +00:00
|
|
|
.endif
|
|
|
|
|
2004-06-25 06:48:54 +00:00
|
|
|
.include "${TARGET_SUBDIR}/Makefile"
|
|
|
|
|
|
|
|
SRCS+= ${GENSRCS}
|
|
|
|
CLEANFILES+= ${GENSRCS}
|
|
|
|
|
|
|
|
.include "../Makefile.inc"
|