prefix = /usr/local
-program_prefix =
+program_transform_name =
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
READLINE_DEP = $$(READLINE_DIR)
RL_LIB = ./../readline${subdir}/libreadline.a
-# Energize libraries
-ENERGIZE_DIR = ${srcdir}/energize
-ENERGIZE_INCLUDES = -I${ENERGIZE_DIR}
-ENERGIZE_LIB = ${ENERGIZE_DIR}/libconn.a
-
# All the includes used for CFLAGS and for lint.
# -I. for config files.
# -I${srcdir} possibly for regex.h also.
-INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR)
+INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR)
# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
# from the config/ directory.
# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
# TERMCAP comes after readline, since readline depends on it.
CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${MMALLOC_LIB} ${LIBIBERTY} \
- ${XM_CLIBS} ${TM_CLIBS} ${ENERGIZE_LIB}
+ ${XM_CLIBS} ${TM_CLIBS}
CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \
${RL_LIB} ${MMALLOC_LIB}
ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
-ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} \
- ${ENERGIZE_LIB}
+ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
-VERSION = 4.6.1
+VERSION = 4.6.6
DIST=gdb
LINT=/usr/5bin/lint
LINTFLAGS= -I${BFD_DIR}
-# Select the default C++ demangling style to use. The default is "auto",
-# which allows gdb to attempt to pick an appropriate demangling style for
-# the executable it has loaded. It can be set to a specific style ("gnu",
-# "lucid", "cfront", etc) in which case gdb will never attempt to do auto
-# selection of the style unless you do an explicit "set demangle auto".
-# To select one of these as the default, set DEMANGLING_STYLE in the
-# appropriate target dependent makefile fragment.
-DEMANGLING_STYLE = "lucid"
-
-# Select demangler to use.
-DEMANGLER = cplus-dem
-
-# Select options to use when compiling ${DEMANGLER}.c.
-DEMANGLE_OPTS = -DDEMANGLING_STYLE=${DEMANGLING_STYLE}
-
# Host and target-dependent makefile fragments come in here.
####
# End of host and target-dependent makefile fragments
+FLAGS_TO_PASS = \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "CFLAGS=$(CFLAGS)" \
+ "RANLIB=$(RANLIB)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "BISON=$(BISON)"
+
# Source files in the main directory.
# Files which are included via a config/* Makefile fragment
# should *not* be specified here; they're in "ALLDEPFILES".
main.c printcmd.c gdbtypes.c \
remote.c source.c stack.c symmisc.c symtab.c symfile.c \
utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
- ${DEMANGLER}.c mem-break.c target.c inftarg.c \
- dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \
+ mem-break.c target.c inftarg.c \
+ dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
ieee-float.c language.c parse.c buildsym.c objfiles.c \
- minsyms.c mipsread.c maint.c energize.c
+ minsyms.c mipsread.c maint.c
# Source files in subdirectories (which will be handled separately by
# 'make gdb.tar.Z').
SFILES_KGDB = $(SFILES) stuff.c kdb-start.c
# Header files that are not named in config/* Makefile fragments go here.
-HFILES= breakpoint.h buildsym.h call-cmds.h command.h defs.h demangle.h \
+HFILES= breakpoint.h buildsym.h call-cmds.h command.h defs.h \
environ.h expression.h frame.h gdbcmd.h gdbcore.h gdbtypes.h \
gdb-stabs.h \
ieee-float.h inferior.h minimon.h objfiles.h partial-stab.h \
.gdbinit COPYING $(YYFILES) \
copying.c Convex.notes copying.awk \
saber.suppress standalone.c stuff.c kdb-start.c \
- putenv.c
+ putenv.c gcc.patch
# Subdirectories of gdb, which should be included in their entirety in
# gdb-xxx.tar.Z:
values.o eval.o valops.o valarith.o valprint.o printcmd.o \
symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
command.o utils.o expprint.o environ.o version.o gdbtypes.o \
- copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \
+ copying.o $(DEPFILES) mem-break.o target.o \
inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
- buildsym.o objfiles.o minsyms.o maint.o demangle.o energize.o \
- dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o
+ buildsym.o objfiles.o minsyms.o maint.o demangle.o \
+ dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
+ stabsread.o
RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
NTSSTART = kdb-start.o
-SUBDIRS = doc ${ENERGIZE_DIR}
+SUBDIRS = doc
# For now, shortcut the "configure GDB for fewer languages" stuff.
YYFILES = c-exp.tab.c m2-exp.tab.c
${CC} -c ${INTERNAL_CFLAGS} $<
all: gdb
- $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
check:
info: force
- $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" "MAKEINFO=$(MAKEINFO)"
+ $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
install-info: force
- $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
clean-info: force
- $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
gdb.z:gdb.1
nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
mv gdb.t.z gdb.z
install: gdb
- $(INSTALL_PROGRAM) gdb $(bindir)/$(program_prefix)gdb
- $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$(program_prefix)gdb.1
+ -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
+ if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
+ -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
+ -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
+ if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
+ -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
+ -n=`t='$(program_transform_name)'; echo gdb | sed -e "" $$t`; \
+ $(INSTALL_PROGRAM) gdb $(bindir)/$$n; \
+ $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$n.1
$(M_INSTALL)
- $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
init.c: $(srcdir)/munch $(OBS) $(TSOBS)
$(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
#load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
echo "Load .c corresponding to:" $(DEPFILES)
-${ENERGIZE_LIB} :
- @(cd ${ENERGIZE_DIR}; \
- $(MAKE) \
- "against=$(against)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "BISON=$(BISON)")
# This is useful when debugging GDB, because some Unix's don't let you run GDB
# on itself without copying the executable. So "make gdb1" will make
@echo arm-convert.s.
touch xm.h tm.h
-$(GCC) -MM -nostdinc -I/usr/include $(CFLAGS) -I$(BFD_DIR) \
- $(INCLUDE_CFLAGS) `ls $(SOURCES) | grep -v '\.[hy]$$' | \
+ -I${READLINE_DIR} $(INCLUDE_CFLAGS) \
+ `ls $(SOURCES) | grep -v '\.[hy]$$' | \
sort -u` >depend.tmp
# If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
# for xm.h and tm.h. This allows the same "depend" file to be used
@echo "You must configure gdb. Look at the README file for details."
@false
+# This checks the configure.in file versus the config/ directory.
+config-check: config-check-hosts config-check-targets
+config-check-hosts:
+ grep gdb_host= ${srcdir}/configure.in | \
+ sed -e 's/.*gdb_host=//' -e 's/ ;;$$/.mh/' | sort -u >HOSTconf.o
+ (cd ${srcdir}/config; ls *.mh) >HOSTdir.o
+ diff -u HOSTconf.o HOSTdir.o
+
+config-check-targets:
+ grep gdb_target= ${srcdir}/configure.in | \
+ sed -e 's/.*gdb_target=//' -e 's/ ;;$$/.mh/' | sort -u >TARGconf.o
+ (cd ${srcdir}/config; ls *.mt) >TARGdir.o
+ diff -u HOSTconf.o HOSTdir.o
+
# These are not generated by "make depend" because they only are there
# for some machines.
# But these rules don't do what we want; we want to hack the foo.o: tm.h
rm -f init.c version.c
rm -f gdb core gdb.tar gdb.tar.Z make.log
rm -f gdb[0-9]
- @$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)"
+ @$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
rm -f tm.h xm.h config.status
rm -f y.output yacc.acts yacc.tmp
rm -f ${TESTS} Makefile depend
- @$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)"
+ @$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
realclean: clean
rm -f c-exp.tab.c m2-exp.tab.c TAGS
rm -f tm.h xm.h config.status
rm -f Makefile depend
- @$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)"
+ @$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
@for i in $(DODIRS); do \
if [ -d ./$$i ] ; then \
if (cd ./$$i; \
- $(MAKE) \
- "against=$(against)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "BISON=$(BISON)" $(DO)) ; then true ; \
+ $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
else exit 1 ; fi ; \
else true ; fi ; \
done
# Documentation!
# GDB QUICK REFERENCE (TeX dvi file, CM fonts)
refcard.dvi: $(srcdir)/doc/refcard.tex
- ( cd ./doc; $(MAKE) refcard.dvi )
+ ( cd ./doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) )
mv ./doc/refcard.dvi .
# GDB QUICK REFERENCE (PostScript output, common PS fonts)
refcard.ps: $(srcdir)/doc/refcard.tex
- ( cd ./doc; $(MAKE) refcard.ps )
+ ( cd ./doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) )
mv ./doc/refcard.ps .
# GDB MANUAL: TeX dvi file
gdb.dvi: ./doc/gdb-all.texi
- ( cd ./doc; $(MAKE) M4=$(M4) gdb.dvi )
+ ( cd ./doc; $(MAKE) M4=$(M4) gdb.dvi $(FLAGS_TO_PASS) )
mv ./doc/gdb.dvi .
# GDB MANUAL: info file
gdb.info: ./doc/gdb-all.texi
- ( cd ./doc; $(MAKE) M4=$(M4) gdb.info )
+ ( cd ./doc; $(MAKE) M4=$(M4) gdb.info $(FLAGS_TO_PASS) )
mv ./doc/gdb.info* .
./doc/gdb-all.texi:
- (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
+ (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi $(FLAGS_TO_PASS) )
# Make copying.c from COPYING
copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
< y.tab.c > m2-exp.tab.c
-rm y.tab.c
+
+main.o: ${srcdir}/main.c
+ ${CC} -c ${INTERNAL_CFLAGS} -I${READLINE_DIR} $<
+
# The symbol-file readers have dependencies on BFD header files.
dbxread.o: ${srcdir}/dbxread.c
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
dwarfread.o: ${srcdir}/dwarfread.c
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c
+stabsread.o: ${srcdir}/stabsread.c
+ ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/stabsread.c
+
xcoffread.o: ${srcdir}/xcoffread.c
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttyflush.c
-energize.o: ${srcdir}/energize.c
- ${CC} -c ${INTERNAL_CFLAGS} ${ENERGIZE_INCLUDES} ${srcdir}/energize.c
-
lint: $(LINTFILES)
$(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
`echo ${DEPFILES} | sed 's/\.o /\.c /g'
force_update:
-# Generate the demangler linked in with gdb. Also create a standalone
-# demangler if so desired ("make demangle").
-
-${DEMANGLER}.o: ${DEMANGLER}.c
- ${CC} -c ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \
- `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'`
-
-demangle: ${DEMANGLER}.c
- ${CC} -o $@ -DMAIN ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \
- `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'`
-
# GNU Make has an annoying habit of putting *all* the Makefile variables
# into the environment, unless you include this target as a circumvention.
# Rumor is that this will be fixed (and this target can be removed)