1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1999-05-02 11:32:14 +00:00
|
|
|
|
|
|
|
.include "../Makefile.inc0"
|
1996-05-07 23:19:49 +00:00
|
|
|
|
1999-05-02 11:32:14 +00:00
|
|
|
.PATH: ${SRCDIR}/binutils
|
|
|
|
|
1999-05-11 08:07:51 +00:00
|
|
|
PROG= gdb
|
|
|
|
XSRCS= annotate.c ax-general.c ax-gdb.c bcache.c blockframe.c \
|
1999-05-02 11:32:14 +00:00
|
|
|
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 \
|
2000-04-29 09:03:49 +00:00
|
|
|
coffread.c command.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.c fork-child.c freebsd-uthread.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 \
|
|
|
|
typeprint.c utils.c valarith.c valops.c valprint.c values.c \
|
|
|
|
version.c serial.c ser-unix.c ser-tcp.c callback.c
|
1999-05-02 11:32:14 +00:00
|
|
|
SRCS= init.c ${XSRCS}
|
1997-01-15 22:37:09 +00:00
|
|
|
|
1999-05-02 11:32:14 +00:00
|
|
|
.if exists(${.CURDIR}/Makefile.${MACHINE_ARCH})
|
|
|
|
.include "${.CURDIR}/Makefile.${MACHINE_ARCH}"
|
1998-04-30 08:03:50 +00:00
|
|
|
.endif
|
1999-05-02 11:32:14 +00:00
|
|
|
|
|
|
|
#CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
|
|
|
|
CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH}
|
|
|
|
CFLAGS+= -I${SRCDIR}/binutils
|
|
|
|
CFLAGS+= -I${SRCDIR}/bfd
|
|
|
|
CFLAGS+= -I${GDBDIR}/gdb
|
|
|
|
CFLAGS+= -I${GDBDIR}/gdb/config
|
2000-03-27 18:02:04 +00:00
|
|
|
DPADD= ${RELTOP}/libbfd/libbfd.a
|
1999-05-02 11:32:14 +00:00
|
|
|
DPADD+= ${RELTOP}/libopcodes/libopcodes.a
|
|
|
|
DPADD+= ${LIBREADLINE}
|
|
|
|
DPADD+= ${LIBGNUREGEX}
|
|
|
|
DPADD+= ${RELTOP}/libiberty/libiberty.a
|
|
|
|
DPADD+= ${LIBTERMCAP}
|
2000-04-04 11:12:55 +00:00
|
|
|
LDADD+= ${RELTOP}/libbfd/libbfd.a
|
2000-03-27 18:02:04 +00:00
|
|
|
LDADD+= ${RELTOP}/libopcodes/libopcodes.a
|
|
|
|
LDADD+= -lreadline
|
|
|
|
LDADD+= -lgnuregex
|
|
|
|
LDADD+= ${RELTOP}/libiberty/libiberty.a
|
|
|
|
LDADD+= -ltermcap
|
1999-05-02 11:32:14 +00:00
|
|
|
|
|
|
|
GDBDIR= ${.CURDIR}/../../../../contrib/gdb
|
1997-01-15 22:37:09 +00:00
|
|
|
.PATH: ${GDBDIR}/gdb
|
1999-05-02 11:32:14 +00:00
|
|
|
.PATH: ${SRCDIR}/opcodes
|
1997-01-15 22:37:09 +00:00
|
|
|
|
1998-04-30 08:03:50 +00:00
|
|
|
CFLAGS+= -DFREEBSD_ELF
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1999-05-02 11:32:14 +00:00
|
|
|
CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline
|
1997-01-15 22:37:09 +00:00
|
|
|
# use phkmalloc
|
|
|
|
CFLAGS+= -DNO_MMALLOC
|
|
|
|
# uncomment the next line if you want to debug gdb
|
|
|
|
#CFLAGS+= -g
|
1998-05-04 17:56:22 +00:00
|
|
|
YFLAGS=
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1998-05-04 17:56:22 +00:00
|
|
|
CLEANFILES= init.c init.c-tmp
|
1997-03-29 10:33:13 +00:00
|
|
|
|
1997-05-01 00:18:51 +00:00
|
|
|
# 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
|
|
|
|
# of a given name (remote-udi.o -> _initialize_remote_udi, etc.).
|
|
|
|
#
|
|
|
|
# Formatting conventions: The name of the _initialize_* routines must start
|
|
|
|
# in column zero, and must not be inside #if.
|
|
|
|
#
|
|
|
|
# Note that the set of files with init functions might change, or the names
|
|
|
|
# of the functions might change, so this files needs to depend on all the
|
|
|
|
# object files that will be linked into gdb.
|
|
|
|
|
1997-05-01 13:40:57 +00:00
|
|
|
init.c: ${XSRCS}
|
1999-05-11 08:07:51 +00:00
|
|
|
@${ECHO} Making ${.TARGET}
|
1997-05-01 00:18:51 +00:00
|
|
|
@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 'void initialize_all_files () {' >>init.c-tmp
|
1997-05-01 13:40:57 +00:00
|
|
|
@for i in ${.ALLSRC} ; do \
|
1997-05-01 00:18:51 +00:00
|
|
|
filename=`echo $$i | sed \
|
|
|
|
-e '/^Onindy.c/d' \
|
|
|
|
-e '/^nindy.c/d' \
|
|
|
|
-e '/ttyflush.c/d' \
|
|
|
|
-e '/xdr_ld.c/d' \
|
|
|
|
-e '/xdr_ptrace.c/d' \
|
|
|
|
-e '/xdr_rdb.c/d' \
|
|
|
|
-e '/udr.c/d' \
|
|
|
|
-e '/udip2soc.c/d' \
|
|
|
|
-e '/udi2go32.c/d' \
|
|
|
|
-e '/version.c/d' \
|
|
|
|
-e '/^[a-z0-9A-Z_]*_[SU].c/d' \
|
|
|
|
-e '/[a-z0-9A-Z_]*-exp.tab.c/d'` ; \
|
|
|
|
case $$filename in \
|
|
|
|
"") ;; \
|
1997-05-01 13:40:57 +00:00
|
|
|
*) sed <$$filename >>init.c-tmp -n \
|
1997-05-01 00:18:51 +00:00
|
|
|
-e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' ; ;; \
|
|
|
|
esac ; \
|
1997-05-01 00:26:43 +00:00
|
|
|
done
|
1997-05-01 00:18:51 +00:00
|
|
|
@echo '}' >>init.c-tmp
|
1997-05-01 16:24:37 +00:00
|
|
|
@mv init.c-tmp ${.TARGET}
|
1997-05-01 13:40:57 +00:00
|
|
|
|
1997-05-01 00:18:51 +00:00
|
|
|
.PRECIOUS: init.c
|
1997-05-01 00:26:43 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|