host_alias = @host_alias@
target_alias = @target_alias@
program_transform_name = @program_transform_name@
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
+bindir = @bindir@
+libdir = @libdir@
tooldir = $(libdir)/$(target_alias)
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
+datadir = @datadir@
+mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
-infodir = $(prefix)/info
-includedir = $(prefix)/include
-docdir = $(datadir)/doc
+infodir = @infodir@
+includedir = @includedir@
SHELL = /bin/sh
# Where is the MMALLOC library? Typically in ../mmalloc.
# Note that mmalloc can still be used on systems without mmap().
-# To use your system malloc, comment out the following defines.
+# To use your system malloc, in the host makefile fragment set MMALLOC_CFLAGS
+# to -DNO_MMALLOC and set MMALLOC to empty.
+# To use mmalloc but not use heap checking, in the host makefile fragment set
+# MMALLOC_CFLAGS to the value below but add -DNO_MMCHECK.
+# To use mmalloc and heap checking on a system where the C runtime allocates
+# memory that is never freed, in the host makefile fragment set MMALLOC_CFLAGS
+# to the value below and add -DFORCE_MMCHECK=1
MMALLOC_DIR = ../mmalloc
MMALLOC_SRC = $(srcdir)/$(MMALLOC_DIR)
MMALLOC = $(MMALLOC_DIR)/libmmalloc.a
-# To use your system malloc, uncomment MMALLOC_DISABLE.
-#MMALLOC_DISABLE = -DNO_MMALLOC
-# To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
-#MMALLOC_CHECK = -DNO_MMALLOC_CHECK
-MMALLOC_CFLAGS = -I$(MMALLOC_SRC) $(MMALLOC_CHECK) $(MMALLOC_DISABLE)
+MMALLOC_CFLAGS = -I$(MMALLOC_SRC)
# Where is the BFD library? Typically in ../bfd.
BFD_DIR = ../bfd
#start-sanitize-gdbtk
# Where is the TCL library? Typically in ../tcl.
-TCL = @TCLLIB@
+LIB_INSTALL_DIR = $(libdir)
+TCL = @TCL_LD_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@
TCL_CFLAGS = @TCLHDIR@
# Where is the TK library? Typically in ../tk.
-TK = @TKLIB@
+TK = @TK_BUILD_LIB_SPEC@
TK_CFLAGS = @TKHDIR@
-X11_CFLAGS = @X_CFLAGS@ $(X11_EXTRA_CFLAGS)
-X11_LDFLAGS = @X_LDFLAGS@
-X11_LIBS = @X_LIBS@ $(X11_EXTRA_LIBS)
+X11_CFLAGS = @TK_XINCLUDES@
+X11_LDFLAGS =
+X11_LIBS =
ENABLE_GDBTK= @ENABLE_GDBTK@
#end-sanitize-gdbtk
ENABLE_CFLAGS= @ENABLE_CFLAGS@
-ENABLE_CLIBS= @ENABLE_CLIBS@
-ENABLE_OBS= @ENABLE_OBS@
# -I. for config files.
# -I$(srcdir) for gdb internal headers and possibly for gnu-regex.h also.
# Profiling options need to go here to work.
# I think it's perfectly reasonable for a user to set -pg in CFLAGS
# and have it work; that's why CFLAGS is here.
-INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS)
+INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS) @CONFIG_LDFLAGS@ @HLDFLAGS@
+HLDENV = @HLDENV@
# We are using our own version of REGEX now to be consistent across
# machines.
# LIBIBERTY appears twice on purpose.
# If you have the Cygnus libraries installed,
# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS='
-INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty $(ENABLE_CLIBS) \
+INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \
$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) @LIBS@ \
-lmmalloc -liberty
-CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(LIBIBERTY) $(ENABLE_CLIBS) \
+CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(LIBIBERTY) \
$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) @LIBS@ \
$(MMALLOC) $(LIBIBERTY)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
# Links made at configuration time should not be specified here, since
# SFILES is used in building the distribution archive.
-SFILES = bcache.c blockframe.c breakpoint.c buildsym.c callback.c c-exp.y \
+SFILES = 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 \
- corefile.c cp-valprint.c dbxread.c demangle.c dwarfread.c \
+ corefile.c cp-valprint.c \
+ dbxread.c demangle.c dwarfread.c dwarf2read.c \
elfread.c environ.c eval.c expprint.c \
f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
gdbtypes.c infcmd.c inflow.c infrun.c language.c \
printcmd.c remote.c remote-nrom.c scm-exp.c scm-lang.c scm-valprint.c \
source.c stabsread.c stack.c symfile.c symmisc.c \
symtab.c target.c thread.c top.c \
- typeprint.c utils.c valarith.c valops.c \
- valprint.c values.c serial.c ser-unix.c mdebugread.c os9kread.c
+ typeprint.c utils.c \
+ valarith.c valops.c valprint.c values.c \
+ serial.c ser-unix.c mdebugread.c os9kread.c
LINTFILES = $(SFILES) $(YYFILES) init.c
bfd_h = $(BFD_DIR)/bfd.h
wait_h = $(INCLUDE_DIR)/wait.h
dis-asm_h = $(INCLUDE_DIR)/dis-asm.h
+remote-sim_h = $(INCLUDE_DIR)/remote-sim.h
dcache_h = dcache.h
-remote_utils_h = $(dcache_h) serial.h target.h remote-utils.h remote-sim.h
+remote_utils_h = $(dcache_h) serial.h target.h remote-utils.h $(remote-sim_h)
readline_headers = \
$(READLINE_SRC)/chardefs.h \
nindy-share/env.h nindy-share/stop.h \
vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \
vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \
- vx-share/xdr_ptrace.h vx-share/xdr_rdb.h thread.h \
- dcache.h remote-utils.h remote-sim.h top.h somsolib.h
+ vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \
+ dcache.h remote-utils.h top.h somsolib.h
# Header files that already have srcdir in them, or which are in objdir.
# Makefile.in
DEPFILES = $(TDEPFILES) $(XDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \
- $(REMOTE_OBS) $(SIM_OBS) $(ENABLE_OBS)
+ $(REMOTE_OBS) $(SIM_OBS) @CONFIG_OBS@
SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES)
# Don't include YYFILES (*.tab.c) because we already include *.y in SFILES,
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
dbxread.o coffread.o elfread.o \
- dwarfread.o mipsread.o stabsread.o corefile.o \
+ dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
c-lang.o ch-exp.o ch-lang.o f-lang.o m2-lang.o \
scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
- nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o callback.o
+ nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
OBS = $(COMMON_OBS) $(ANNOTATE_OBS) main.o
$(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1
# start-sanitize-gdbtk
if [ x"$(ENABLE_GDBTK)" != x ] ; then \
- $(INSTALL_DATA) $(srcdir)/gdbtk.tcl $(libdir)/gdbtk.tcl ; \
+ $(INSTALL_DATA) $(srcdir)/gdbtk.tcl $(datadir)/gdbtk.tcl ; \
else \
true ; \
fi
rm -f $(bindir)/$$transformed_name $(man1dir)/$$transformed_name.1
# start-sanitize-gdbtk
if [ x"$(ENABLE_GDBTK)" != x ] ; then \
- rm -f $(libdir)/gdbtk.tcl ; \
+ rm -f $(datadir)/gdbtk.tcl ; \
fi
# end-sanitize-gdbtk
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
@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
- @for i in $(OBS) $(TSOBS); do \
- filename=`echo $$i | sed \
- -e '/^Onindy.o/d' \
+ @echo '#include "ansidecl.h"' >>init.c-tmp
+ @echo 'extern void initialize_all_files PARAMS ((void));' >>init.c-tmp
+ @echo 'void initialize_all_files PARAMS ((void)) {' >>init.c-tmp
+ @echo $(OBS) $(TSOBS) | \
+ tr ' ' '\012' | \
+ sed -e '/^Onindy.o/d' \
-e '/^nindy.o/d' \
-e '/ttyflush.o/d' \
-e '/xdr_ld.o/d' \
-e '/version.o/d' \
-e '/^[a-z0-9A-Z_]*_[SU].o/d' \
-e '/[a-z0-9A-Z_]*-exp.tab.o/d' \
- -e 's/\.o/.c/'` ; \
- case $$filename in \
- "") ;; \
- *) sed <$(srcdir)/$$filename >>init.c-tmp -n \
- -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' ; ;; \
- esac ; \
- done
+ -e 's/\.o/.c/' \
+ -e 's|\([^ ][^ ]*\)|$(srcdir)/\1|g' | \
+ xargs grep '^_initialize_[a-z_0-9A-Z]* *(' | \
+ sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 PARAMS ((void)); \1 ();}/' >>init.c-tmp
@echo '}' >>init.c-tmp
@mv init.c-tmp init.c
# Removing the old gdb first works better if it is running, at least on SunOS.
gdb: $(OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
rm -f gdb
- $(CC_LD) $(INTERNAL_LDFLAGS) -o gdb \
+ $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) -o gdb \
init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
nlm: force
annotate.o: annotate.c $(defs_h) annotate.h $(value_h) target.h $(gdbtypes_h)
-arm-tdep.o: arm-tdep.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h)
+arm-tdep.o: arm-tdep.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
+ $(gdbcore_h)
bcache.o: bcache.c bcache.h $(defs_h)
objfiles.h symfile.h target.h
breakpoint.o: breakpoint.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) language.h target.h thread.h gdb_string.h
+ $(inferior_h) language.h target.h gdbthread.h gdb_string.h
buildsym.o: buildsym.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
objfiles.h symfile.h $(symtab_h) gdb_string.h
-callback.o: callback.c $(defs_h) callback.h
-
c-lang.o: c-lang.c c-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
language.h parser-defs.h $(symtab_h)
$(inferior_h) target.h language.h gdb_string.h
corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
- target.h thread.h gdb_string.h
+ target.h gdbthread.h gdb_string.h
cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
$(gdbtypes_h) $(symtab_h) $(value_h) gdb_string.h
-dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) gdb_string.h
+dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) gdb_string.h $(gdbcore_h)
dbxread.o: dbxread.c $(breakpoint_h) buildsym.h $(command_h) \
complaints.h $(defs_h) $(expression_h) gdb-stabs.h $(gdbcore_h) \
$(expression_h) $(gdbtypes_h) language.h objfiles.h symfile.h \
$(symtab_h) gdb_string.h
+dwarf2read.o: dwarf2read.c $(bfd_h) buildsym.h $(defs_h) \
+ $(expression_h) $(gdbtypes_h) language.h objfiles.h symfile.h \
+ $(symtab_h) gdb_string.h
+
elfread.o: elfread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
- gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
+ gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h \
+ $(BFD_SRC)/elf-bfd.h $(INCLUDE_DIR)/elf/mips.h
environ.o: environ.c $(defs_h) environ.h $(gdbcore_h) gdb_string.h
gdb_string.h
fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) target.h terminal.h thread.h gdb_string.h
+ $(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
# start-sanitize-gdbtk
gdbtk.o: gdbtk.c $(defs_h) $(symtab_h) $(inferior_h) $(command_h) \
$(bfd_h) symfile.h objfiles.h target.h gdb_string.h
$(CC) -c $(INTERNAL_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
- $(srcdir)/gdbtk.c -DGDBTK_FILENAME=\"$(libdir)/gdbtk.tcl\"
+ $(srcdir)/gdbtk.c -DGDBTK_FILENAME=\"$(datadir)/gdbtk.tcl\"
# end-sanitize-gdbtk
gdbtypes.o: gdbtypes.c $(bfd_h) complaints.h $(defs_h) $(expression_h) \
i386ly-nat.o: i386ly-nat.c $(defs_h) $(frame_h) $(inferior_h) target.h
-i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(inferior_h) target.h
+i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(inferior_h) target.h $(gdbcore_h)
i386m3-nat.o: i386m3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) target.h
$(inferior_h) language.h
i960-tdep.o: i960-tdep.c $(floatformat_h) $(defs_h) $(expression_h) \
- $(frame_h) $(gdbtypes_h) $(symtab_h) $(value_h)
+ $(frame_h) $(gdbtypes_h) $(symtab_h) $(value_h) $(gdbcore_h)
infcmd.o: infcmd.c $(defs_h) environ.h $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) target.h language.h gdb_string.h
inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
- signals.h target.h terminal.h thread.h gdb_string.h
+ signals.h target.h terminal.h gdbthread.h gdb_string.h
infptrace.o: infptrace.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
gdb_string.h $(wait_h) $(command_h)
infrun.o: infrun.c $(wait_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) target.h thread.h gdb_string.h
+ $(inferior_h) target.h gdbthread.h gdb_string.h
inftarg.o: inftarg.c $(wait_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
target.h terminal.h $(command_h)
$(value_h) gdb_string.h
m2-valprint.o: m2-valprint.c $(defs_h) $(gdbtypes_h) $(symtab_h) \
- valprint.h
+ valprint.h m2-lang.h
m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(value_h) language.h target.h \
$(wait_h) $(gdbcmd_h) $(gdbcore_h)
-m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h)
+m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
+ $(gdbcore_h) gdb_string.h
m68kly-nat.o: m68kly-nat.c $(defs_h) $(frame_h) $(inferior_h) target.h
os9kread.o: os9kread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \
$(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) language.h \
- objfiles.h partial-stab.h stabsread.h symfile.h $(symtab_h) \
+ objfiles.h stabsread.h symfile.h $(symtab_h) \
target.h gdb_string.h
mem-break.o: mem-break.c $(defs_h)
ttyflush.o: nindy-share/ttyflush.c
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/ttyflush.c
-nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h)
+nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcore_h)
ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h)
somsolib.o: somsolib.c $(defs_h)
+hpux-thread.o: hpux-thread.c $(defs_h) gdbthread.h target.h inferior.h
+ $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \
+ -I$(srcdir)/osf-share/HP800 -I/usr/include/dce $(srcdir)/hpux-thread.c
+
hpread.o: hpread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
vx-share/ptrace.h vx-share/xdr_ld.h vx-share/xdr_ptrace.h \
vx-share/xdr_rdb.h gdb_string.h
+remote-wiggler.o: remote-wiggler.c $(wait_h) complaints.h $(defs_h) \
+ $(gdbcmd_h) $(gdbcore_h) $(inferior_h) target.h
+
remote-utils.o: remote-utils.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) $(remote_utils_h) gdb_string.h
rom68k-rom.o: rom68k-rom.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) target.h serial.h terminal.h
-rs6000-nat.o: rs6000-nat.c $(bfd_h) $(defs_h) $(inferior_h) target.h
+rs6000-nat.o: rs6000-nat.c $(bfd_h) $(defs_h) $(inferior_h) target.h \
+ xcoffsolib.h
rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
target.h xcoffsolib.h
scm-lang.h scm-tags.h
scm-lang.o: $(defs_h) $(value_h) parser-defs.h language.h c-lang.h \
- scm-lang.h scm-tags.h gdb_string.h
+ scm-lang.h scm-tags.h gdb_string.h $(gdbcore_h)
scm-valprint.o: $(defs_h) $(value_h) parser-defs.h language.h \
- scm-lang.h valprint.h
+ scm-lang.h valprint.h $(gdbcore_h)
ser-go32.o: ser-go32.c $(defs_h) serial.h
target.h
sparc-tdep.o: sparc-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) objfiles.h symfile.h target.h
+ $(inferior_h) objfiles.h symfile.h target.h gdb_string.h
sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) target.h
target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \
objfiles.h symfile.h target.h gdb_string.h
-thread.o: thread.c $(defs_h) thread.h $(gdbcmd_h)
+thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h)
top.o: top.c top.h $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.h \
$(defs_h) $(gdbcmd_h) $(inferior_h) language.h signals.h \
valprint.o: valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
- $(value_h) gdb_string.h
+ $(value_h) gdb_string.h valprint.h
values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdbtypes_h) $(symtab_h) target.h $(value_h) \
vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h)
-w65-tdep.o : w65-tdep.c
+w65-tdep.o : w65-tdep.c $(gdbcore_h)
win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
gdb_string.h
xcoffsolib.o: xcoffsolib.c $(bfd_h) $(defs_h) xcoffsolib.h
z8k-tdep.o: z8k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h) $(frame_h) \
- $(gdbcmd_h) $(gdbtypes_h) $(symtab_h)
+ $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(gdbcore_h)
c-exp.tab.o: c-exp.tab.c c-lang.h $(defs_h) $(expression_h) \
$(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \