diff options
Diffstat (limited to 'gnu/usr.bin/binutils/gdb/Makefile')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/Makefile | 55 |
1 files changed, 41 insertions, 14 deletions
diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile index 291a0a18..f6c7865 100644 --- a/gnu/usr.bin/binutils/gdb/Makefile +++ b/gnu/usr.bin/binutils/gdb/Makefile @@ -9,22 +9,28 @@ PROG= gdb XSRCS= annotate.c ax-general.c ax-gdb.c bcache.c blockframe.c \ breakpoint.c buildsym.c c-exp.y c-lang.c c-typeprint.c \ c-valprint.c ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c \ - coffread.c command.c complaints.c copying.c core-regset.c \ + coffread.c complaints.c copying.c core-regset.c \ corefile.c corelow.c cp-valprint.c dcache.c dbxread.c \ demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \ exec.c expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \ - findvar%UAfix.c fork-child.c freebsd-uthread.c gdbarch.c gdbtypes.c \ + findvar.c fork-child.c gdbarch.c gdbtypes.c \ infcmd.c inflow.c infptrace.c infrun.c inftarg.c language.c \ jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c nlmread.c \ m2-lang.c m2-exp.y m2-typeprint.c m2-valprint.c main.c maint.c \ mdebugread.c mem-break.c minsyms.c objfiles.c parse.c \ printcmd.c remote.c remote-utils.c scm-exp.c scm-lang.c \ scm-valprint.c solib.c source.c stabsread.c stack.c symfile.c \ - symmisc.c symtab.c target.c thread.c top.c tracepoint.c \ + symmisc.c symtab.c target.c thread.c top.c tracepoint.c \ typeprint.c utils.c valarith.c valops.c valprint.c values.c \ - version.c serial.c ser-unix.c ser-tcp.c -SRCS= init.c ${XSRCS} -SRCS+= wait.h + serial.c ser-unix.c ser-tcp.c +XSRCS+= arch-utils.c cp-abi.c completer.c doublest.c event-loop.c \ + event-top.c frame.c gdb-events.c inf-loop.c linespec.c \ + memattr.c regcache.c signals.c solib-svr4.c solib-legacy.c \ + ui-file.c ui-out.c wrapper.c cli-out.c \ + cli-cmds.c cli-cmds.h cli-decode.c cli-decode.h cli-script.c \ + cli-script.h cli-setshow.c cli-setshow.h cli-utils.c cli-utils.h +XSRCS+= freebsd-uthread.c kvm-fbsd.c +SRCS= init.c ${XSRCS} nm.h tm.h xm.h gdbversion.c xregex.h .if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) .include "${.CURDIR}/Makefile.${TARGET_ARCH}" @@ -34,17 +40,22 @@ WARNS= 0 .if ${TARGET_ARCH} != ${MACHINE_ARCH} CFLAGS+= -DCROSS_COMPILE=1 .endif +CFLAGS+= -DDEFAULT_BFD_ARCH=bfd_${TARGET_ARCH}_arch CFLAGS+= -I${.CURDIR}/${TARGET_ARCH} CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -I${SRCDIR}/bfd CFLAGS+= -I${GDBDIR}/gdb CFLAGS+= -I${GDBDIR}/gdb/config -DPADD= ${RELTOP}/libbfd/libbfd.a +DPADD= ${LIBKVM} +DPADD+= ${LIBM} +DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libopcodes/libopcodes.a DPADD+= ${LIBGNUREGEX} DPADD+= ${RELTOP}/libiberty/libiberty.a DPADD+= ${LIBREADLINE} DPADD+= ${LIBTERMCAP} +LDADD= -lkvm +LDADD+= -lm LDADD+= ${RELTOP}/libbfd/libbfd.a LDADD+= ${RELTOP}/libopcodes/libopcodes.a LDADD+= -lgnuregex @@ -53,16 +64,13 @@ LDADD+= -lreadline LDADD+= -ltermcap GDBDIR= ${.CURDIR}/../../../../contrib/gdb -.PATH: ${GDBDIR}/gdb +.PATH: ${GDBDIR}/gdb ${GDBDIR}/gdb/cli .PATH: ${SRCDIR}/opcodes -CFLAGS+= -DFREEBSD_ELF - CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline YFLAGS= -CLEANFILES= init.c init.c-tmp wait.h -CLEANFILES+= findvar%UAfix.c +CLEANFILES= init.c init.c-tmp nm.h tm.h xm.h gdbversion.c xregex.h # We do this by grepping through sources. If that turns out to be too slow, # maybe we could just require every .o file to have an initialization routine @@ -80,6 +88,8 @@ init.c: ${XSRCS} @rm -f init.c-tmp @echo '/* Do not modify this file. */' >init.c-tmp @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp + @echo '#include "defs.h"' >>init.c-tmp + @echo '#include "call-cmds.h"' >>init.c-tmp @echo 'void initialize_all_files () {' >>init.c-tmp @for i in ${.ALLSRC} ; do \ filename=`echo $$i | sed \ @@ -106,7 +116,24 @@ init.c: ${XSRCS} .PRECIOUS: init.c -wait.h: - ln -sf ${.CURDIR}/../../../../sys/sys/wait.h ${.TARGET} +nm.h: + echo '#include "${TARGET_ARCH}/nm-fbsd.h"' >${.TARGET} + echo '#include "fbsd-kgdb.h"' >>${.TARGET} + +.for H in tm-fbsd xm-${TARGET_ARCH} +${H:C/-.*$//}.h: + ln -sf \ + ${.CURDIR}/../../../../contrib/gdb/gdb/config/${TARGET_ARCH}/${H}.h \ + ${.TARGET} +.endfor + +gdbversion.c: version.in + @echo '#include "version.h"' > ${.TARGET} + @echo 'const char version[] = "'"`sed q ${.ALLSRC}`"'";'>>${.TARGET} + @echo 'const char host_name[] = "${MACHINE_ARCH}-undermydesk-freebsd";' >>${.TARGET} + @echo 'const char target_name[] = "${TARGET_ARCH}-undermydesk-freebsd";' >>${.TARGET} + +xregex.h: + @echo '#include <gnuregex.h>' >${.TARGET} .include <bsd.prog.mk> |