Makefile (only) changes to allow building a cross debugger.

This commit is contained in:
marcel 2004-11-30 05:12:37 +00:00
parent 8ea3319e24
commit 4f1dd53060
10 changed files with 51 additions and 22 deletions

View File

@ -36,6 +36,12 @@ CFLAGS+= -I${CNTRB_BU}/bfd
GENSRCS+= nm.h tm.h
.if defined(GDB_CROSS_DEBUGGER)
CFLAGS+= -DCROSS_DEBUGGER
GDB_SUFFIX= -${TARGET_ARCH}
NOMAN=
.endif
.include "${TARGET_SUBDIR}/Makefile"
SRCS+= ${GENSRCS}

View File

@ -1,8 +1,10 @@
# $FreeBSD$
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= core-regset.c solib-legacy.c
LIBSRCS+= alpha-mdebug-tdep.c alpha-tdep.c alphabsd-nat.c alphabsd-tdep.c \
alphafbsd-tdep.c
LIBSRCS+= alphabsd-nat.c
.endif
LIBSRCS+= alpha-mdebug-tdep.c alpha-tdep.c alphabsd-tdep.c alphafbsd-tdep.c
nm.h:
echo '#include "alpha/nm-fbsd.h"' > ${.TARGET}

View File

@ -1,10 +1,12 @@
# $FreeBSD$
GENSRCS+= xm.h
LIBSRCS+= fbsd-proc.c gcore.c
LIBSRCS+= amd64-nat.c amd64-tdep.c amd64bsd-nat.c amd64fbsd-nat.c \
amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c i386fbsd-tdep.c \
i387-tdep.c
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c
LIBSRCS+= amd64-nat.c amd64bsd-nat.c amd64fbsd-nat.c
.endif
LIBSRCS+= amd64-tdep.c amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c \
i386fbsd-tdep.c i387-tdep.c
nm.h:
echo '#include "i386/nm-fbsd64.h"' > ${.TARGET}

View File

@ -1,9 +1,11 @@
# $FreeBSD$
GENSRCS+= xm.h
LIBSRCS+= fbsd-proc.c gcore.c
LIBSRCS+= i386-nat.c i386-tdep.c i386bsd-nat.c i386bsd-tdep.c \
i386fbsd-nat.c i386fbsd-tdep.c i387-tdep.c
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c
LIBSRCS+= i386-nat.c i386bsd-nat.c i386fbsd-nat.c
.endif
LIBSRCS+= i386-tdep.c i386bsd-tdep.c i386fbsd-tdep.c i387-tdep.c
nm.h:
echo '#include "i386/nm-fbsd.h"' > ${.TARGET}

View File

@ -1,7 +1,10 @@
# $FreeBSD$
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= fbsd-proc.c gcore.c
LIBSRCS+= ia64-fbsd-nat.c ia64-fbsd-tdep.c ia64-tdep.c
LIBSRCS+= ia64-fbsd-nat.c
.endif
LIBSRCS+= ia64-fbsd-tdep.c ia64-tdep.c
nm.h:
echo '#include "ia64/nm-fbsd.h"' > ${.TARGET}

View File

@ -1,8 +1,10 @@
# $FreeBSD$
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= solib-legacy.c
LIBSRCS+= sparc-nat.c sparc-tdep.c sparc64-nat.c sparc64-tdep.c \
sparc64fbsd-nat.c sparc64fbsd-tdep.c
LIBSRCS+= sparc-nat.c sparc64-nat.c sparc64fbsd-nat.c
.endif
LIBSRCS+= sparc-tdep.c sparc64-tdep.c sparc64fbsd-tdep.c
nm.h:
echo '#include "sparc/nm-fbsd.h"' > ${.TARGET}

View File

@ -1,6 +1,6 @@
# $FreeBSD$
PROG= gdb
PROG= gdb${GDB_SUFFIX}
SRCS= gdb.c
BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \

View File

@ -1,6 +1,6 @@
# $FreeBSD$
PROG= gdbtui
PROG= gdbtui${GDB_SUFFIX}
SRCS= tui-main.c
NOMAN=

View File

@ -1,6 +1,6 @@
# $FreeBSD$
PROG= kgdb
PROG= kgdb${GDB_SUFFIX}
SRCS= kthr.c main.c trgt.c trgt_${TARGET_ARCH}.c
WARNS?= 2

View File

@ -1,5 +1,10 @@
# $FreeBSD$
TARGET_ARCH?= ${MACHINE_ARCH}
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
GDB_CROSS_DEBUGGER=
.endif
LIB= gdb
INTERNALLIB=
SRCS= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c \
@ -16,11 +21,11 @@ SRCS= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c \
elfread.c environ.c eval.c event-loop.c event-top.c exec.c \
expprint.c \
f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
fork-child.c frame-base.c frame-unwind.c frame.c \
${_fork_child} frame-base.c frame-unwind.c frame.c \
gdb-events.c gdbarch.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
hpacc-abi.c \
inf-loop.c infcall.c infcmd.c inflow.c infptrace.c infrun.c \
inftarg.c init.c interps.c \
inf-loop.c infcall.c infcmd.c inflow.c ${_infptrace} infrun.c \
${_inftarg} init.c interps.c \
jv-exp.y jv-lang.c jv-typeprint.c jv-valprint.c \
kod-cisco.c kod.c \
language.c linespec.c \
@ -47,12 +52,19 @@ SRCS= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c \
valarith.c valops.c valprint.c values.c varobj.c \
wrapper.c ${LIBSRCS}
GENSRCS= version.c
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
LIBSRCS+= fbsd-threads.c
TARGET_ARCH?= ${MACHINE_ARCH}
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
GDB_CROSS_DEBUGGER=
.endif
.if !defined(GDB_CROSS_DEBUGGER)
_fork_child= fork-child.c
_infptrace= infptrace.c
_inftarg= inftarg.c
.endif
GENSRCS= version.c
version.c:
echo '#include "version.h"' > ${.TARGET}
echo 'const char version[] = ${VERSION};' >> ${.TARGET}