# Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Free Software Foundation, Inc.
# This file is part of GDB.
GDB_WARN_CFLAGS = $(WARN_CFLAGS)
GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
-GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " | sed "s/ -Wformat-nonliteral / /g"`
+GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \
+ | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
+
+RDYNAMIC = @RDYNAMIC@
# Where is the INTL library? Typically in ../intl.
INTL = @LIBINTL@
py-cmd.o \
py-frame.o \
py-function.o \
+ py-inferior.o \
+ py-infthread.o \
py-lazy-string.o \
py-objfile.o \
+ py-param.o \
py-prettyprint.o \
py-progspace.o \
py-symbol.o \
python/py-cmd.c \
python/py-frame.c \
python/py-function.c \
+ python/py-inferior.c \
+ python/py-infthread.c \
python/py-lazy-string.c \
python/py-objfile.c \
+ python/py-param.c \
python/py-prettyprint.c \
python/py-progspace.c \
python/py-symbol.c \
amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
amd64-linux-tdep.o amd64nbsd-tdep.o \
amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
- ia64-linux-tdep.o ia64-tdep.o \
+ ia64-hpux-tdep.o ia64-linux-tdep.o ia64-tdep.o \
mips64obsd-tdep.o \
sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o \
sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o
armnbsd-tdep.o armobsd-tdep.o \
arm-tdep.o arm-wince-tdep.o \
avr-tdep.o \
+ bfin-linux-tdep.o bfin-tdep.o \
cris-tdep.o \
dicos-tdep.o \
frv-linux-tdep.o frv-tdep.o \
solib-frv.o solib-irix.o solib-svr4.o solib-target.o \
solib-som.o solib-pa64.o solib-darwin.o \
dbug-rom.o dink32-rom.o ppcbug-rom.o m32r-rom.o dsrec.o monitor.o \
- remote-m32r-sdi.o \
+ remote-m32r-sdi.o remote-mips.o \
xcoffread.o \
symfile-mem.o \
corelow.o \
mi/mi-common.c \
objc-exp.y objc-lang.c \
objfiles.c osabi.c observer.c osdata.c \
+ opencl-lang.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
- progspace.c \
+ proc-service.list progspace.c \
prologue-value.c psymtab.c \
regcache.c reggroups.c remote.c remote-fileio.c reverse.c \
- scm-exp.c scm-lang.c scm-valprint.c \
sentinel-frame.c \
serial.c ser-base.c ser-unix.c \
- solib.c solib-null.c source.c \
+ solib.c solib-target.c source.c \
stabsread.c stack.c std-regs.c symfile.c symfile-mem.c symmisc.c \
symtab.c \
target.c target-descriptions.c target-memory.c \
c-lang.h d-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \
cli/cli-decode.h cli/cli-cmds.h cli/cli-dump.h \
cli/cli-script.h macrotab.h symtab.h version.h gnulib/wchar.in.h \
-gnulib/string.in.h gnulib/str-two-way.h gnulib/extra/link-warning.h \
+gnulib/string.in.h gnulib/str-two-way.h \
gnulib/stdint.in.h remote.h gdb.h sparc-nat.h gdbserver/win32-low.h \
gdbserver/i387-fp.h gdbserver/server.h gdbserver/terminal.h \
gdbserver/mem-break.h gdbserver/wincecompat.h gdbserver/target.h \
amd64-nat.h s390-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
gdbarch.h bsd-uthread.h gdb_thread_db.h gdb_stat.h memory-map.h \
mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
-ser-unix.h scm-lang.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
+ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
objfiles.h vec.h disasm.h mips-tdep.h ser-base.h \
gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \
gdb_locale.h gdb_dirent.h arch-utils.h trad-frame.h gnu-nat.h \
language.h nbsd-tdep.h wrapper.h solib-svr4.h \
macroexp.h ui-file.h regcache.h gdb_string.h tracepoint.h i386-tdep.h \
-inf-child.h p-lang.h event-top.h gdbtypes.h scm-tags.h user-regs.h \
+inf-child.h p-lang.h event-top.h gdbtypes.h user-regs.h \
regformats/regdef.h config/alpha/nm-osf3.h config/i386/nm-i386gnu.h \
-config/i386/nm-fbsd.h config/i386/nm-linux.h \
+config/i386/nm-fbsd.h \
config/nm-nto.h config/sparc/nm-sol2.h config/nm-linux.h \
config/rs6000/nm-rs6000.h top.h bsd-kvm.h gdb-stabs.h reggroups.h \
annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h \
remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
gdb_usleep.h jit.h xml-syscall.h ada-operator.inc microblaze-tdep.h \
-psymtab.h psympriv.h
+psymtab.h psympriv.h progspace.h bfin-tdep.h ia64-hpux-tdep.h
# Header files that already have srcdir in them, or which are in objdir.
ui-out.o cli-out.o \
varobj.o vec.o wrapper.o \
jv-lang.o jv-valprint.o jv-typeprint.o \
- m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
- scm-exp.o scm-lang.o scm-valprint.o \
+ m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o \
sentinel-frame.o \
complaints.o typeprint.o \
ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o \
reggroups.o regset.o \
trad-frame.o \
tramp-frame.o \
- solib.o solib-null.o \
+ solib.o solib-target.o \
prologue-value.o memory-map.o xml-support.o xml-syscall.o \
target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
inferior.o osdata.o gdb_usleep.o record.o gcore.o \
jit.o progspace.o
-# Definitions for the syscall's XML files and dir
-XML_SYSCALLS_DIR = syscalls/
-XML_SYSCALLS_FILES = gdb-syscalls.dtd \
- ppc-linux.xml ppc64-linux.xml \
- i386-linux.xml amd64-linux.xml \
- sparc-linux.xml sparc64-linux.xml
-
TSOBS = inflow.o
-SUBDIRS = @subdirs@
+SUBDIRS = doc @subdirs@ data-directory
CLEANDIRS = $(SUBDIRS) gnulib
+# List of subdirectories in the build tree that must exist.
+# This is used to force build failures in existing trees when
+# a new directory is added.
+# The format here is for the `case' shell command.
+REQUIRED_SUBDIRS = doc | testsuite | gnulib | data-directory
+
# For now, shortcut the "configure GDB for fewer languages" stuff.
YYFILES = c-exp.c \
cp-name-parser.c \
$(COMPILE) $<
$(POSTCOMPILE)
-all: gdb$(EXEEXT) $(CONFIG_ALL) xml-syscall-copy
+all: gdb$(EXEEXT) $(CONFIG_ALL)
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
.PHONY: all-tui
all-tui: $(TUI)$(EXEEXT)
-# This is needed for running GDB from the build directory
-.PHONY: xml-syscall-copy
-xml-syscall-copy:
- if [ "`cd $(srcdir) && pwd`" != "`pwd`" ] ; then \
- mkdir -p ./$(XML_SYSCALLS_DIR) ; \
- list='$(XML_SYSCALLS_FILES)' ; \
- for file in $$list ; do \
- f=$(srcdir)/$(XML_SYSCALLS_DIR)/$$file ; \
- if test -f $$f ; then \
- $(INSTALL_DATA) $$f \
- ./$(XML_SYSCALLS_DIR) ; \
- fi ; \
- done ; \
- fi ;
-
-# This target is responsible for properly installing the syscalls'
-# XML files in the system.
-.PHONY: xml-syscall-install
-xml-syscall-install:
- $(SHELL) $(srcdir)/../mkinstalldirs \
- $(DESTDIR)$(GDB_DATADIR)/$(XML_SYSCALLS_DIR) ; \
- list='$(XML_SYSCALLS_FILES)' ; \
- for file in $$list ; do \
- f=$(srcdir)/$(XML_SYSCALLS_DIR)/$$file ; \
- if test -f $$f ; then \
- $(INSTALL_DATA) $$f \
- $(DESTDIR)$(GDB_DATADIR)/$(XML_SYSCALLS_DIR) ; \
- fi ; \
- done ;
-
installcheck:
# The check target can not use subdir_do, because subdir_do does not
# source file and doesn't care about rebuilding or just wants to save the
# time it takes for make to check that all is up to date.
# install-only is intended to address that need.
-install: all install-only
+install: all
+ @$(MAKE) $(FLAGS_TO_PASS) install-only
-# The "install-only" target also installs the syscalls' XML files in
-# the system.
-install-only: $(CONFIG_INSTALL) xml-syscall-install
+install-only: $(CONFIG_INSTALL)
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
$(INSTALL_DATA) $(srcdir)/gdb.1 \
$(DESTDIR)$(man1dir)/$$transformed_name.1
+install-python:
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
uninstall: force $(CONFIG_UNINSTALL)
transformed_name=`t='$(program_transform_name)'; \
@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=gnulib subdir_do
.PHONY: all-lib
+# Convenience rule to handle recursion.
+.PHONY: all-data-directory
+all-data-directory: data-directory/Makefile
+ @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=data-directory subdir_do
+
# Create a library of the gdb object files and build GDB by linking
# against that.
#
subdir_do: force
@for i in $(DODIRS); do \
+ case $$i in \
+ $(REQUIRED_SUBDIRS)) \
+ if [ ! -f ./$$i/Makefile ] ; then \
+ echo "Missing $$i/Makefile" >&2 ; \
+ exit 1 ; \
+ fi ;; \
+ esac ; \
if [ -f ./$$i/Makefile ] ; then \
if (cd ./$$i; \
$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
CONFIG_LINKS= \
$(SHELL) config.status
+data-directory/Makefile: data-directory/Makefile.in config.status @frags@
+ CONFIG_FILES="data-directory/Makefile" \
+ CONFIG_COMMANDS="depfiles" \
+ CONFIG_HEADERS= \
+ CONFIG_LINKS= \
+ $(SHELL) config.status
+
config.h: stamp-h ; @true
stamp-h: $(srcdir)/config.in config.status
CONFIG_HEADERS=config.h:config.in \
arm-linux-nat.c arm-linux-tdep.c arm-symbian-tdep.c arm-tdep.c \
armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
avr-tdep.c \
+ bfin-linux-tdep.c bfin-tdep.c \
bsd-uthread.c bsd-kvm.c \
core-regset.c corelow.c \
dcache.c dicos-tdep.c darwin-nat.c \
i386-linux-tdep.c i386-nat.c \
i386-sol2-nat.c i386-sol2-tdep.c \
i386gnu-nat.c i386gnu-tdep.c \
+ ia64-hpux-nat.c ia64-hpux-tdep.c \
ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \
inf-ptrace.c inf-ttrace.c \
irix5-nat.c \
mips64obsd-nat.c mips64obsd-tdep.c \
nbsd-nat.c nbsd-tdep.c obsd-tdep.c \
solib-osf.c \
- solib-target.c \
somread.c solib-som.c \
posix-hdep.c \
ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c \
# Some files need explicit build rules (due to -Werror problems) or due
# to sub-directory fun 'n' games.
-hpux-thread.o: $(srcdir)/hpux-thread.c
- $(COMPILE) -I$(srcdir)/osf-share -I$(srcdir)/osf-share/HP800 \
- -I/usr/include/dce $(srcdir)/hpux-thread.c
- $(POSTCOMPILE)
-
# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR.
main.o: $(srcdir)/main.c
$(COMPILE) $(TARGET_SYSTEM_ROOT_DEFINE) -DBINDIR=\"$(bindir)\" $(srcdir)/main.c
# definitly will not work. "monitor.c" needs to be rewritten so that
# it doesn't use format strings and instead uses callbacks.
monitor.o: $(srcdir)/monitor.c
- $(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/monitor.c
+ $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
+ $(COMPILE.post) $(srcdir)/monitor.c
$(POSTCOMPILE)
# Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually
# checks format strings.
printcmd.o: $(srcdir)/printcmd.c
- $(COMPILE.pre) $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS_NO_FORMAT) \
- $(GDB_WERROR_CFLAGS) $(COMPILE.post) $(srcdir)/printcmd.c
+ $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
+ $(COMPILE.post) $(srcdir)/printcmd.c
$(POSTCOMPILE)
# Message files. Based on code in gcc/Makefile.in.
.SUFFIXES: .y .l
.y.c:
- $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS)
- -sed -e '/extern.*malloc/d' \
+ rm -f $@ $@.tmp
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
+ || (rm -f $@; false)
+ sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
-e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e '/^#line.*y.tab.c/d' \
- < $@.tmp > $@.new
- -rm $@.tmp
- mv $@.new ./$*.c
+ -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \
+ < $@.tmp > $@
+ rm -f $@.tmp
.l.c:
if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
$(FLEX) -o$@ $< && \
false; \
fi
-.PRECIOUS: ada-exp.c ada-lex.c
-.PRECIOUS: c-exp.c
-.PRECIOUS: f-exp.c
-.PRECIOUS: jv-exp.c
-.PRECIOUS: m2-exp.c
-.PRECIOUS: objc-exp.c
-.PRECIOUS: p-exp.c
+.PRECIOUS: ada-lex.c
# XML rules
$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-function.c
$(POSTCOMPILE)
+py-inferior.o: $(srcdir)/python/py-inferior.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-inferior.c
+ $(POSTCOMPILE)
+
+py-infthread.o: $(srcdir)/python/py-infthread.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-infthread.c
+ $(POSTCOMPILE)
+
py-lazy-string.o: $(srcdir)/python/py-lazy-string.c
$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-lazy-string.c
$(POSTCOMPILE)
$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-objfile.c
$(POSTCOMPILE)
+py-param.o: $(srcdir)/python/py-param.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-param.c
+ $(POSTCOMPILE)
+
py-prettyprint.o: $(srcdir)/python/py-prettyprint.c
$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-prettyprint.c
$(POSTCOMPILE)