1998-03-19 15:21:19 +00:00
|
|
|
# $Id: Makefile,v 1.30 1998/03/07 08:54:42 bde Exp $
|
1996-05-07 23:19:49 +00:00
|
|
|
|
1994-06-10 13:42:18 +00:00
|
|
|
PROG = gdb
|
1997-01-15 22:37:09 +00:00
|
|
|
|
|
|
|
GDBDIR= ${.CURDIR}/../../../../contrib/gdb
|
|
|
|
.PATH: ${GDBDIR}/gdb
|
|
|
|
.PATH: ${GDBDIR}/opcodes
|
|
|
|
|
1994-06-10 13:42:18 +00:00
|
|
|
BINDIR= /usr/bin
|
1997-05-01 00:18:51 +00:00
|
|
|
XSRCS = annotate.c blockframe.c breakpoint.c buildsym.c c-lang.c \
|
1994-12-30 23:27:33 +00:00
|
|
|
c-typeprint.c c-valprint.c ch-lang.c ch-typeprint.c \
|
1997-04-07 08:08:20 +00:00
|
|
|
ch-valprint.c coffread.c command.c complaints.c copying.c \
|
1997-01-15 22:37:09 +00:00
|
|
|
corelow.c cp-valprint.c \
|
|
|
|
dcache.c dbxread.c demangle.c dwarfread.c \
|
1994-12-30 23:27:33 +00:00
|
|
|
elfread.c environ.c eval.c exec.c expprint.c \
|
1997-04-07 08:08:20 +00:00
|
|
|
findvar.c fork-child.c freebsd-nat.c gdbtypes.c \
|
1997-01-15 22:37:09 +00:00
|
|
|
i386-tdep.c infcmd.c inflow.c infptrace.c \
|
1997-05-02 11:22:51 +00:00
|
|
|
infrun.c inftarg.c language.c \
|
1994-12-30 23:27:33 +00:00
|
|
|
m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
|
|
|
|
mem-break.c minsyms.c objfiles.c parse.c \
|
1995-01-06 21:26:39 +00:00
|
|
|
printcmd.c remote.c remote-utils.c solib.c source.c \
|
1994-12-30 23:27:33 +00:00
|
|
|
stabsread.c stack.c symfile.c symmisc.c \
|
|
|
|
symtab.c target.c thread.c top.c \
|
|
|
|
typeprint.c utils.c valarith.c valops.c \
|
1997-05-01 00:18:51 +00:00
|
|
|
valprint.c values.c version.c \
|
|
|
|
serial.c ser-unix.c ser-tcp.c mdebugread.c \
|
1997-03-29 10:33:13 +00:00
|
|
|
c-exp.c f-exp.c m2-exp.c i387-tdep.c \
|
1997-01-15 22:37:09 +00:00
|
|
|
kvm-fbsd.c bcache.c \
|
|
|
|
corefile.c ch-exp.c f-lang.c scm-exp.c scm-lang.c \
|
|
|
|
scm-valprint.c f-typeprint.c f-valprint.c nlmread.c \
|
|
|
|
callback.c
|
1997-05-01 00:18:51 +00:00
|
|
|
XSRCS+= i386-dis.c dis-buf.c disassemble.c
|
1997-05-01 13:40:57 +00:00
|
|
|
SRCS= init.c ${XSRCS}
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1997-01-15 22:37:09 +00:00
|
|
|
CFLAGS+= -I$(.CURDIR) -I${DESTDIR}/usr/include/readline -I$(.CURDIR)/../bfd
|
|
|
|
# use phkmalloc
|
|
|
|
CFLAGS+= -DNO_MMALLOC
|
|
|
|
# uncomment the next line if you want to debug gdb
|
|
|
|
#CFLAGS+= -g
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1997-05-01 16:24:37 +00:00
|
|
|
CLEANFILES+= c-exp.c f-exp.c m2-exp.c init.c y.tab.h init.c-tmp
|
1997-03-29 10:33:13 +00:00
|
|
|
|
1997-01-15 22:37:09 +00:00
|
|
|
.if exists(${.OBJDIR}/../bfd)
|
1998-03-07 08:55:00 +00:00
|
|
|
LIBBFD= ${.OBJDIR}/../bfd/libbfd.a
|
1997-01-15 22:37:09 +00:00
|
|
|
.else
|
1998-03-07 08:55:00 +00:00
|
|
|
LIBBFD= ${.CURDIR}/../bfd/libbfd.a
|
1997-01-15 22:37:09 +00:00
|
|
|
.endif
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1996-06-24 04:26:21 +00:00
|
|
|
.if exists(${.OBJDIR}/../libiberty)
|
1998-03-07 08:55:00 +00:00
|
|
|
LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a
|
1994-06-10 13:42:18 +00:00
|
|
|
.else
|
1998-03-07 08:55:00 +00:00
|
|
|
LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a
|
1994-06-10 13:42:18 +00:00
|
|
|
.endif
|
|
|
|
|
1998-03-07 08:55:00 +00:00
|
|
|
DPADD= ${LIBBFD} ${LIBREADLINE} ${LIBGNUREGEX} ${LIBIBERTY} ${LIBTERMCAP}
|
|
|
|
LDADD= ${LIBBFD} -lreadline -lgnuregex ${LIBIBERTY} -ltermcap
|
|
|
|
DPADD+= ${LIBIBERTY}
|
|
|
|
LDADD+= ${LIBIBERTY}
|
1994-06-10 13:42:18 +00:00
|
|
|
|
1998-03-19 15:21:19 +00:00
|
|
|
.ORDER: c-exp.c f-exp.c m2-exp.c
|
|
|
|
|
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}
|
1997-05-01 16:24:37 +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>
|