gdb/Makefile - gdb

  1. # Copyright (C) 1989-2014 Free Software Foundation, Inc.

  2. # This file is part of GDB.

  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 3 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program.  If not, see <http://www.gnu.org/licenses/>.

  15. prefix = /opt/binutils
  16. exec_prefix = ${prefix}

  17. host_alias = x86_64-unknown-linux-gnu
  18. target_alias = x86_64-unknown-linux-gnu
  19. program_transform_name = s,y,y,
  20. bindir = ${exec_prefix}/bin
  21. libdir = ${exec_prefix}/lib
  22. tooldir = $(libdir)/$(target_alias)

  23. datadir = ${datarootdir}
  24. localedir = ${datadir}/locale
  25. mandir = ${datarootdir}/man
  26. man1dir = $(mandir)/man1
  27. man2dir = $(mandir)/man2
  28. man3dir = $(mandir)/man3
  29. man4dir = $(mandir)/man4
  30. man5dir = $(mandir)/man5
  31. man6dir = $(mandir)/man6
  32. man7dir = $(mandir)/man7
  33. man8dir = $(mandir)/man8
  34. man9dir = $(mandir)/man9
  35. infodir = ${datarootdir}/info
  36. datarootdir = ${prefix}/share
  37. docdir = ${datarootdir}/doc/${PACKAGE}
  38. htmldir = ${docdir}
  39. pdfdir = ${docdir}
  40. includedir = ${prefix}/include

  41. install_sh = ${SHELL} /home/agentzh/git/binutils-gdb/install-sh

  42. # This can be referenced by `LIBINTL' as computed by
  43. # ZW_GNU_GETTEXT_SISTER_DIR.
  44. top_builddir = .

  45. SHELL = /bin/sh
  46. EXEEXT =

  47. AWK = gawk
  48. LN_S = ln -s

  49. INSTALL = /bin/install -c
  50. INSTALL_PROGRAM = /bin/install -c
  51. INSTALL_SCRIPT = /bin/install -c
  52. INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
  53. INSTALL_DATA = /bin/install -c -m 644

  54. DESTDIR =

  55. AR = ar
  56. AR_FLAGS = qv
  57. RANLIB = ranlib
  58. DLLTOOL = dlltool
  59. WINDRES = windres
  60. MIG =
  61. STRIP =

  62. XGETTEXT = /bin/xgettext
  63. GMSGFMT = /bin/msgfmt
  64. MSGMERGE = msgmerge

  65. PACKAGE = gdb
  66. CATALOGS =

  67. # If you are compiling with GCC, make sure that either 1) You have the
  68. # fixed include files where GCC can reach them, or 2) You use the
  69. # -traditional flag.  Otherwise the ioctl calls in inflow.c
  70. # will be incorrectly compiled.  The "fixincludes" script in the gcc
  71. # distribution will fix your include files up.
  72. CC=gcc

  73. # Dependency tracking information.
  74. DEPMODE = depmode=gcc3
  75. DEPDIR = .deps
  76. depcomp = $(SHELL) $(srcdir)/../depcomp

  77. # Note that these are overridden by GNU make-specific code below if
  78. # GNU make is used.  The overrides implement dependency tracking.
  79. COMPILE.pre = $(CC)
  80. COMPILE.post = -c -o $@
  81. COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
  82. POSTCOMPILE = @true

  83. # Directory containing source files.
  84. srcdir = .


  85. YACC=bison -y

  86. # This is used to rebuild ada-lex.c from ada-lex.l.  If the program is
  87. # not defined, but ada-lex.c is present, compilation will continue,
  88. # possibly with a warning.
  89. FLEX = flex

  90. YLWRAP = $(srcdir)/../ylwrap

  91. # where to find makeinfo, preferably one designed for texinfo-2
  92. MAKEINFO = makeinfo --split-size=5000000
  93. MAKEINFOFLAGS =
  94. MAKEINFO_EXTRA_FLAGS =  -DHAVE_MAKEINFO_CLICK
  95. MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)

  96. MAKEHTML = $(MAKEINFO_CMD) --html
  97. MAKEHTMLFLAGS =

  98. # Set this up with gcc if you have gnu ld and the loader will print out
  99. # line numbers for undefined references.
  100. #CC_LD=gcc -static
  101. CC_LD=$(CC)

  102. # Where is our "include" directory?  Typically $(srcdir)/../include.
  103. # This is essentially the header file directory for the library
  104. # routines in libiberty.
  105. INCLUDE_DIR $(srcdir)/../include
  106. INCLUDE_CFLAGS = -I$(INCLUDE_DIR)

  107. # Where is the "-liberty" library?  Typically in ../libiberty.
  108. LIBIBERTY = ../libiberty/libiberty.a

  109. # Where is the BFD library?  Typically in ../bfd.
  110. BFD_DIR = ../bfd
  111. BFD = $(BFD_DIR)/libbfd.a
  112. BFD_SRC = $(srcdir)/$(BFD_DIR)
  113. BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)

  114. # Where is the decnumber library?  Typically in ../libdecnumber.
  115. LIBDECNUMBER_DIR = ../libdecnumber
  116. LIBDECNUMBER = $(LIBDECNUMBER_DIR)/libdecnumber.a
  117. LIBDECNUMBER_SRC = $(srcdir)/$(LIBDECNUMBER_DIR)
  118. LIBDECNUMBER_CFLAGS = -I$(LIBDECNUMBER_DIR) -I$(LIBDECNUMBER_SRC)

  119. # Where is the READLINE library?  Typically in ../readline.
  120. READLINE_DIR = ../readline
  121. READLINE_SRC = $(srcdir)/$(READLINE_DIR)
  122. READLINE = $(READLINE_DIR)/libreadline.a
  123. READLINE_DEPS = $(READLINE)
  124. READLINE_CFLAGS = -I$(READLINE_SRC)/..

  125. # Where is expat?  This will be empty if expat was not available.
  126. LIBEXPAT = -lexpat

  127. # Where is lzma?  This will be empty if lzma was not available.
  128. LIBLZMA = -llzma

  129. # Where is libbabeltrace? This will be empty if lbabeltrace was not
  130. # available.
  131. LIBBABELTRACE =

  132. WARN_CFLAGS =  -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral
  133. WERROR_CFLAGS = -Werror
  134. GDB_WARN_CFLAGS = $(WARN_CFLAGS)
  135. GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)

  136. GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \
  137.                    | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
  138. GDB_WARN_CFLAGS_NO_DEFS = `echo " $(GDB_WARN_CFLAGS) " \
  139.                    | sed "s/ -Wold-style-definition / -Wno-old-style-definition /g"`

  140. RDYNAMIC = -Wl,--dynamic-list=$(srcdir)/proc-service.list

  141. # Where is the INTL library?  Typically in ../intl.
  142. INTL =
  143. INTL_DEPS =
  144. INTL_CFLAGS =

  145. # Did the user give us a --with-gdb-datadir option?
  146. GDB_DATADIR = ${datarootdir}/gdb

  147. # Flags to pass to gdb when invoked with "make run".
  148. GDBFLAGS =

  149. # Helper code from gnulib.
  150. GNULIB_BUILDDIR = build-gnulib
  151. LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
  152. INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import

  153. # Generated headers in the gnulib directory.  These must be listed
  154. # so that they are generated before other files are compiled.
  155. GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h

  156. #
  157. # CLI sub directory definitons
  158. #
  159. SUBDIR_CLI_OBS = \
  160.         cli-dump.o \
  161.         cli-decode.o cli-script.o cli-cmds.o cli-setshow.o \
  162.         cli-logging.o \
  163.         cli-interp.o cli-utils.o
  164. SUBDIR_CLI_SRCS = \
  165.         cli/cli-dump.c \
  166.         cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
  167.         cli/cli-logging.c \
  168.         cli/cli-interp.c cli/cli-utils.c
  169. SUBDIR_CLI_DEPS =
  170. SUBDIR_CLI_LDFLAGS=
  171. SUBDIR_CLI_CFLAGS=

  172. #
  173. # MI sub directory definitons
  174. #
  175. SUBDIR_MI_OBS = \
  176.         mi-out.o mi-console.o \
  177.         mi-cmds.o mi-cmd-catch.o mi-cmd-env.o \
  178.         mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
  179.         mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o \
  180.         mi-cmd-info.o mi-interp.o \
  181.         mi-main.o mi-parse.o mi-getopt.o
  182. SUBDIR_MI_SRCS = \
  183.         mi/mi-out.c mi/mi-console.c \
  184.         mi/mi-cmds.c mi/mi-cmd-catch.c mi/mi-cmd-env.c \
  185.         mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
  186.         mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \
  187.         mi/mi-cmd-target.c mi/mi-cmd-info.c mi/mi-interp.c \
  188.         mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
  189. SUBDIR_MI_DEPS =
  190. SUBDIR_MI_LDFLAGS=
  191. SUBDIR_MI_CFLAGS=

  192. #
  193. # TUI sub directory definitions
  194. #

  195. SUBDIR_TUI_OBS = \
  196.         tui-command.o \
  197.         tui-data.o \
  198.         tui-disasm.o \
  199.         tui-file.o \
  200.         tui-hooks.o \
  201.         tui-interp.o \
  202.         tui-io.o \
  203.         tui-layout.o \
  204.         tui-out.o \
  205.         tui-regs.o \
  206.         tui-source.o \
  207.         tui-stack.o \
  208.         tui-win.o \
  209.         tui-windata.o \
  210.         tui-wingeneral.o \
  211.         tui-winsource.o \
  212.         tui.o

  213. SUBDIR_TUI_SRCS = \
  214.         tui/tui-command.c \
  215.         tui/tui-data.c \
  216.         tui/tui-disasm.c \
  217.         tui/tui-file.c \
  218.         tui/tui-hooks.c \
  219.         tui/tui-interp.c \
  220.         tui/tui-io.c \
  221.         tui/tui-layout.c \
  222.         tui/tui-out.c \
  223.         tui/tui-regs.c \
  224.         tui/tui-source.c \
  225.         tui/tui-stack.c \
  226.         tui/tui-win.c \
  227.         tui/tui-windata.c \
  228.         tui/tui-wingeneral.c \
  229.         tui/tui-winsource.c \
  230.         tui/tui.c

  231. SUBDIR_TUI_DEPS =
  232. SUBDIR_TUI_LDFLAGS=
  233. SUBDIR_TUI_CFLAGS= \
  234.         -DTUI=1

  235. # Guile sub directory definitons for guile support.

  236. SUBDIR_GUILE_OBS = \
  237.         guile.o \
  238.         scm-arch.o \
  239.         scm-auto-load.o \
  240.         scm-block.o \
  241.         scm-breakpoint.o \
  242.         scm-cmd.o \
  243.         scm-disasm.o \
  244.         scm-exception.o \
  245.         scm-frame.o \
  246.         scm-gsmob.o \
  247.         scm-iterator.o \
  248.         scm-lazy-string.o \
  249.         scm-objfile.o \
  250.         scm-math.o \
  251.         scm-param.o \
  252.         scm-ports.o \
  253.         scm-pretty-print.o \
  254.         scm-progspace.o \
  255.         scm-safe-call.o \
  256.         scm-string.o \
  257.         scm-symbol.o \
  258.         scm-symtab.o \
  259.         scm-type.o \
  260.         scm-utils.o \
  261.         scm-value.o
  262. SUBDIR_GUILE_SRCS = \
  263.         guile/guile.c \
  264.         guile/scm-arch.c \
  265.         guile/scm-auto-load.c \
  266.         guile/scm-block.c \
  267.         guile/scm-breakpoint.c \
  268.         guile/scm-cmd.c \
  269.         guile/scm-disasm.c \
  270.         guile/scm-exception.c \
  271.         guile/scm-frame.c \
  272.         guile/scm-gsmob.c \
  273.         guile/scm-iterator.c \
  274.         guile/scm-lazy-string.c \
  275.         guile/scm-objfile.c \
  276.         guile/scm-math.c \
  277.         guile/scm-param.c \
  278.         guile/scm-ports.c \
  279.         guile/scm-pretty-print.c \
  280.         guile/scm-progspace.c \
  281.         guile/scm-safe-call.c \
  282.         guile/scm-string.c \
  283.         guile/scm-symbol.c \
  284.         guile/scm-symtab.c \
  285.         guile/scm-type.c \
  286.         guile/scm-utils.c \
  287.         guile/scm-value.c
  288. SUBDIR_GUILE_DEPS =
  289. SUBDIR_GUILE_LDFLAGS=
  290. SUBDIR_GUILE_CFLAGS=

  291. #
  292. # python sub directory definitons
  293. #
  294. SUBDIR_PYTHON_OBS = \
  295.         python.o \
  296.         py-arch.o \
  297.         py-auto-load.o \
  298.         py-block.o \
  299.         py-bpevent.o \
  300.         py-breakpoint.o \
  301.         py-cmd.o \
  302.         py-continueevent.o \
  303.         py-xmethods.o \
  304.         py-event.o \
  305.         py-evtregistry.o \
  306.         py-evts.o \
  307.         py-exitedevent.o \
  308.         py-finishbreakpoint.o \
  309.         py-frame.o \
  310.         py-framefilter.o \
  311.         py-function.o \
  312.         py-gdb-readline.o \
  313.         py-inferior.o \
  314.         py-infthread.o \
  315.         py-lazy-string.o \
  316.         py-linetable.o \
  317.         py-newobjfileevent.o \
  318.         py-objfile.o \
  319.         py-param.o \
  320.         py-prettyprint.o \
  321.         py-progspace.o \
  322.         py-signalevent.o \
  323.         py-stopevent.o \
  324.         py-symbol.o \
  325.         py-symtab.o \
  326.         py-threadevent.o \
  327.         py-type.o \
  328.         py-utils.o \
  329.         py-value.o \
  330.         py-varobj.o

  331. SUBDIR_PYTHON_SRCS = \
  332.         python/python.c \
  333.         python/py-arch.c \
  334.         python/py-auto-load.c \
  335.         python/py-block.c \
  336.         python/py-bpevent.c \
  337.         python/py-breakpoint.c \
  338.         python/py-cmd.c \
  339.         python/py-continueevent.c \
  340.         python/py-xmethods.c \
  341.         python/py-event.c \
  342.         python/py-evtregistry.c \
  343.         python/py-evts.c \
  344.         python/py-exitedevent.c \
  345.         python/py-finishbreakpoint.c \
  346.         python/py-frame.c \
  347.         python/py-framefilter.c \
  348.         python/py-function.c \
  349.         python/py-gdb-readline.c \
  350.         python/py-inferior.c \
  351.         python/py-infthread.c \
  352.         python/py-lazy-string.c \
  353.         python/py-linetable.c \
  354.         python/py-newobjfileevent.c \
  355.         python/py-objfile.c \
  356.         python/py-param.c \
  357.         python/py-prettyprint.c \
  358.         python/py-progspace.c \
  359.         python/py-signalevent.c \
  360.         python/py-stopevent.c \
  361.         python/py-symbol.c \
  362.         python/py-symtab.c \
  363.         python/py-threadevent.c \
  364.         python/py-type.c \
  365.         python/py-utils.c \
  366.         python/py-value.c \
  367.         python/py-varobj.c
  368. SUBDIR_PYTHON_DEPS =
  369. SUBDIR_PYTHON_LDFLAGS=
  370. SUBDIR_PYTHON_CFLAGS=

  371. # Opcodes currently live in one of two places.  Either they are in the
  372. # opcode library, typically ../opcodes, or they are in a header file
  373. # in INCLUDE_DIR.
  374. # Where is the "-lopcodes" library, with (some of) the opcode tables and
  375. # disassemblers?
  376. OPCODES_DIR = ../opcodes
  377. OPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
  378. OPCODES = $(OPCODES_DIR)/libopcodes.a
  379. # Where are the other opcode tables which only have header file
  380. # versions?
  381. OP_INCLUDE = $(INCLUDE_DIR)/opcode
  382. # Some source files like to use #include "opcodes/file.h"
  383. OPCODES_CFLAGS = -I$(OP_INCLUDE) -I$(OPCODES_SRC)/..

  384. # The simulator is usually nonexistent; targets that include one
  385. # should set this to list all the .o or .a files to be linked in.
  386. SIM =

  387. WIN32LIBS =

  388. # Tcl et al cflags and libraries
  389. TCL =
  390. TCL_CFLAGS =
  391. GDBTKLIBS =
  392. # Extra flags that the GDBTK files need:
  393. GDBTK_CFLAGS =

  394. TK =
  395. TK_CFLAGS =

  396. X11_CFLAGS =
  397. X11_LDFLAGS =
  398. X11_LIBS =

  399. WIN32LDAPP =

  400. LIBGUI = ../libgui/src/libgui.a
  401. GUI_CFLAGS_X = -I./../libgui/src
  402. IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)

  403. ALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS)

  404. # The version of gdbtk we're building. This should be kept
  405. # in sync with GDBTK_VERSION and friends in gdbtk.h.
  406. GDBTK_VERSION = 1.0
  407. GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION)

  408. # Gdbtk requires an absolute path to the source directory or
  409. # the testsuite won't run properly.
  410. GDBTK_SRC_DIR =

  411. SUBDIR_GDBTK_OBS = \
  412.         gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \
  413.         gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o
  414. SUBDIR_GDBTK_SRCS = \
  415.         gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \
  416.         gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \
  417.         gdbtk/generic/gdbtk-interp.c \
  418.         gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \
  419.         gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \
  420.         gdbtk/generic/gdbtk-main.c
  421. SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
  422. SUBDIR_GDBTK_LDFLAGS=
  423. SUBDIR_GDBTK_CFLAGS= -DGDBTK

  424. CONFIG_OBS$(SUBDIR_CLI_OBS) $(SUBDIR_MI_OBS) $(SUBDIR_TUI_OBS) $(SUBDIR_PYTHON_OBS) guile.o elfread.o stap-probe.o posix-hdep.o
  425. CONFIG_SRCS$(SUBDIR_CLI_SRCS) $(SUBDIR_MI_SRCS) $(SUBDIR_TUI_SRCS) $(SUBDIR_PYTHON_SRCS) guile/guile.c
  426. CONFIG_DEPS$(SUBDIR_CLI_DEPS) $(SUBDIR_MI_DEPS) $(SUBDIR_TUI_DEPS) $(SUBDIR_PYTHON_DEPS)
  427. CONFIG_LDFLAGS =
  428. ENABLE_CFLAGS$(SUBDIR_CLI_CFLAGS) $(SUBDIR_MI_CFLAGS) $(SUBDIR_TUI_CFLAGS) $(SUBDIR_PYTHON_CFLAGS)
  429. CONFIG_ALL=  all-po
  430. CONFIG_CLEAN=  clean-po
  431. CONFIG_INSTALL =  install-po install-python
  432. CONFIG_UNINSTALL =  uninstall-po
  433. HAVE_NATIVE_GCORE_TARGET = 1

  434. # -I. for config files.
  435. # -I$(srcdir) for gdb internal headers.
  436. # -I$(srcdir)/config for more generic config files.

  437. # It is also possible that you will need to add -I/usr/include/sys if
  438. # your system doesn't have fcntl.h in /usr/include (which is where it
  439. # should be according to Posix).
  440. DEFS = -DHAVE_CONFIG_H
  441. GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/common -I$(srcdir)/config \
  442.         -DLOCALEDIR="\"$(localedir)\"" $(DEFS)

  443. # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
  444. GLOBAL_CFLAGS = $(MH_CFLAGS)

  445. PROFILE_CFLAGS =

  446. # CFLAGS is specifically reserved for setting from the command line
  447. # when running make.  I.E.  "make CFLAGS=-Wmissing-prototypes".
  448. CFLAGS = -g -O2

  449. # Set by configure, for e.g. expat.  Python installations are such that
  450. # C headers are included using their basename (for example, we #include
  451. # <Python.h> rather than, say, <python/Python.h>).  Since the file names
  452. # are sometimes a little generic, we think that the risk of collision
  453. # with other header files is high.  If that happens, we try to mitigate
  454. # a bit the consequences by putting the Python includes last in the list.
  455. INTERNAL_CPPFLAGS =    -I/usr/include/python2.7 -I/usr/include/python2.7

  456. # Need to pass this to testsuite for "make check".  Probably should be
  457. # consistent with top-level Makefile.in and gdb/testsuite/Makefile.in
  458. # so "make check" has the same result no matter where it is run.
  459. CXXFLAGS = -g -O

  460. # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
  461. INTERNAL_CFLAGS_BASE = \
  462.         $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
  463.         $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
  464.         $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
  465.         $(INTL_CFLAGS) $(INCGNU) $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS)
  466. INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
  467. INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)

  468. # LDFLAGS is specifically reserved for setting from the command line
  469. # when running make.
  470. LDFLAGS =

  471. # Profiling options need to go here to work.
  472. # I think it's perfectly reasonable for a user to set -pg in CFLAGS
  473. # and have it work; that's why CFLAGS is here.
  474. # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
  475. INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS)

  476. # If your system is missing alloca(), or, more likely, it's there but
  477. # it doesn't work, then refer to libiberty.

  478. # Libraries and corresponding dependencies for compiling gdb.
  479. # XM_CLIBS, defined in *config files, have host-dependent libs.
  480. # LIBIBERTY appears twice on purpose.
  481. CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
  482.         $(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) \
  483.         -ldl -ldl -lncurses -lz -lm -ldl     -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic \
  484.         $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) \
  485.         $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU)
  486. CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
  487.         $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)

  488. ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
  489. ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)

  490. DIST=gdb

  491. LINT=/usr/5bin/lint
  492. LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
  493.         $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
  494.         $(INTL_CFLAGS)

  495. RUNTEST = runtest
  496. RUNTESTFLAGS=

  497. # XML files to build in to GDB.
  498. XMLFILES = $(srcdir)/features/gdb-target.dtd $(srcdir)/features/xinclude.dtd \
  499.         $(srcdir)/features/library-list.dtd \
  500.         $(srcdir)/features/library-list-aix.dtd \
  501.         $(srcdir)/features/library-list-svr4.dtd $(srcdir)/features/osdata.dtd \
  502.         $(srcdir)/features/threads.dtd $(srcdir)/features/traceframe-info.dtd \
  503.         $(srcdir)/features/btrace.dtd

  504. # This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX
  505. # interface to the serial port.  Hopefully if get ported to OS/2, VMS,
  506. # etc., then there will be (as part of the C library or perhaps as
  507. # part of libiberty) a POSIX interface.  But at least for now the
  508. # host-dependent makefile fragment might need to use something else
  509. # besides ser-unix.o
  510. SER_HARDWIRE = ser-base.o ser-unix.o ser-pipe.o ser-tcp.o

  511. # The `remote' debugging target is supported for most architectures,
  512. # but not all (e.g. 960)
  513. REMOTE_OBS = remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o \
  514.         remote-notif.o ctf.o tracefile.o tracefile-tfile.o

  515. # This is remote-sim.o if a simulator is to be linked in.
  516. SIM_OBS =

  517. # Target-dependent object files.
  518. TARGET_OBS =  amd64-tdep.o amd64-linux-tdep.o i386-tdep.o i387-tdep.o i386-linux-tdep.o glibc-tdep.o solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o

  519. # All target-dependent objects files that require 64-bit CORE_ADDR
  520. # (used with --enable-targets=all --enable-64-bit-bfd).
  521. ALL_64_TARGET_OBS = \
  522.         aarch64-tdep.o aarch64-linux-tdep.o aarch64-newlib-tdep.o \
  523.         alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
  524.         alphanbsd-tdep.o alphaobsd-tdep.o alpha-tdep.o \
  525.         amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
  526.         amd64-linux-tdep.o amd64nbsd-tdep.o \
  527.         amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
  528.         ia64-hpux-tdep.o ia64-linux-tdep.o ia64-vms-tdep.o ia64-tdep.o \
  529.         mips64obsd-tdep.o \
  530.         sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o \
  531.         sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o

  532. # All other target-dependent objects files (used with --enable-targets=all).
  533. ALL_TARGET_OBS = \
  534.         armbsd-tdep.o arm-linux-tdep.o arm-symbian-tdep.o \
  535.         armnbsd-tdep.o armobsd-tdep.o \
  536.         arm-tdep.o arm-wince-tdep.o \
  537.         avr-tdep.o \
  538.         bfin-linux-tdep.o bfin-tdep.o \
  539.         cris-linux-tdep.o cris-tdep.o \
  540.         dicos-tdep.o \
  541.         fbsd-tdep.o \
  542.         frv-linux-tdep.o frv-tdep.o \
  543.         h8300-tdep.o \
  544.         hppabsd-tdep.o hppanbsd-tdep.o hppaobsd-tdep.o \
  545.         hppa-hpux-tdep.o hppa-linux-tdep.o hppa-tdep.o \
  546.         i386bsd-tdep.o i386-cygwin-tdep.o i386fbsd-tdep.o i386gnu-tdep.o \
  547.         i386-linux-tdep.o i386nbsd-tdep.o i386-nto-tdep.o i386obsd-tdep.o \
  548.         i386-sol2-tdep.o i386-tdep.o i387-tdep.o \
  549.         i386-dicos-tdep.o i386-darwin-tdep.o \
  550.         iq2000-tdep.o \
  551.         linux-tdep.o \
  552.         lm32-tdep.o \
  553.         m32c-tdep.o \
  554.         m32r-linux-tdep.o m32r-tdep.o \
  555.         m68hc11-tdep.o \
  556.         m68kbsd-tdep.o m68klinux-tdep.o m68k-tdep.o \
  557.         m88k-tdep.o \
  558.         mep-tdep.o \
  559.         microblaze-tdep.o microblaze-linux-tdep.o \
  560.         mips-linux-tdep.o \
  561.         mipsnbsd-tdep.o mips-tdep.o \
  562.         mn10300-linux-tdep.o mn10300-tdep.o \
  563.         moxie-tdep.o \
  564.         msp430-tdep.o \
  565.         mt-tdep.o \
  566.         nios2-tdep.o nios2-linux-tdep.o \
  567.         nto-tdep.o \
  568.         ppc-linux-tdep.o ppcfbsd-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o  \
  569.         ppc-sysv-tdep.o ppc64-tdep.o rl78-tdep.o \
  570.         rs6000-aix-tdep.o rs6000-tdep.o solib-aix.o ppc-ravenscar-thread.o \
  571.         rs6000-lynx178-tdep.o \
  572.         rx-tdep.o \
  573.         s390-linux-tdep.o \
  574.         score-tdep.o \
  575.         sh64-tdep.o sh-linux-tdep.o shnbsd-tdep.o sh-tdep.o \
  576.         sparc-linux-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
  577.         sparc-sol2-tdep.o sparc-tdep.o sparc-ravenscar-thread.o \
  578.         spu-tdep.o spu-multiarch.o solib-spu.o \
  579.         tic6x-tdep.o tic6x-linux-tdep.o \
  580.         tilegx-tdep.o tilegx-linux-tdep.o \
  581.         v850-tdep.o \
  582.         vaxnbsd-tdep.o vaxobsd-tdep.o vax-tdep.o \
  583.         xstormy16-tdep.o \
  584.         xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
  585.         glibc-tdep.o \
  586.         bsd-uthread.o \
  587.         nbsd-tdep.o obsd-tdep.o \
  588.         sol2-tdep.o \
  589.         solib-frv.o solib-svr4.o \
  590.         solib-som.o solib-pa64.o solib-darwin.o solib-dsbt.o \
  591.         dbug-rom.o dink32-rom.o ppcbug-rom.o m32r-rom.o dsrec.o monitor.o \
  592.         remote-m32r-sdi.o remote-mips.o \
  593.         xcoffread.o \
  594.         symfile-mem.o \
  595.         windows-tdep.o \
  596.         linux-record.o \
  597.         ravenscar-thread.o

  598. # Host-dependent makefile fragment comes in here.
  599. # Host: GNU/Linux x86-64
  600. NATDEPFILES= inf-ptrace.o fork-child.o \
  601.         x86-nat.o x86-dregs.o amd64-nat.o amd64-linux-nat.o \
  602.         x86-linux-nat.o \
  603.         linux-nat.o linux-osdata.o \
  604.         proc-service.o linux-thread-db.o linux-fork.o \
  605.         linux-procfs.o linux-ptrace.o linux-btrace.o \
  606.         linux-waitpid.o
  607. NAT_FILE= config/nm-linux.h
  608. NAT_CDEPS = $(srcdir)/proc-service.list

  609. # The dynamically loaded libthread_db needs access to symbols in the
  610. # gdb executable.
  611. LOADLIBES = -ldl $(RDYNAMIC)
  612. # End of host-dependent makefile fragment

  613. FLAGS_TO_PASS = \
  614.         "prefix=$(prefix)" \
  615.         "exec_prefix=$(exec_prefix)" \
  616.         "infodir=$(infodir)" \
  617.         "datarootdir=$(datarootdir)" \
  618.         "docdir=$(docdir)" \
  619.         "htmldir=$(htmldir)" \
  620.         "pdfdir=$(pdfdir)" \
  621.         "libdir=$(libdir)" \
  622.         "mandir=$(mandir)" \
  623.         "datadir=$(datadir)" \
  624.         "includedir=$(includedir)" \
  625.         "against=$(against)" \
  626.         "DESTDIR=$(DESTDIR)" \
  627.         "AR=$(AR)" \
  628.         "AR_FLAGS=$(AR_FLAGS)" \
  629.         "CC=$(CC)" \
  630.         "CFLAGS=$(CFLAGS)" \
  631.         "CXX=$(CXX)" \
  632.         "CXXFLAGS=$(CXXFLAGS)" \
  633.         "DLLTOOL=$(DLLTOOL)" \
  634.         "LDFLAGS=$(LDFLAGS)" \
  635.         "RANLIB=$(RANLIB)" \
  636.         "MAKEINFO=$(MAKEINFO)" \
  637.         "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
  638.         "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
  639.         "MAKEHTML=$(MAKEHTML)" \
  640.         "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
  641.         "INSTALL=$(INSTALL)" \
  642.         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  643.         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
  644.         "INSTALL_DATA=$(INSTALL_DATA)" \
  645.         "RUNTEST=$(RUNTEST)" \
  646.         "RUNTESTFLAGS=$(RUNTESTFLAGS)"

  647. # Flags that we pass when building the testsuite.

  648. # empty for native, $(target_alias)/ for cross
  649. target_subdir =

  650. CC_FOR_TARGET = ` \
  651.   if [ -f $${rootme}/../gcc/xgcc ] ; then \
  652.     if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
  653.       echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \
  654.     else \
  655.       echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
  656.     fi; \
  657.   else \
  658.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  659.       echo $(CC); \
  660.     else \
  661.       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
  662.     fi; \
  663.   fi`

  664. CXX = gcc
  665. CXX_FOR_TARGET = ` \
  666.   if [ -f $${rootme}/../gcc/xgcc ] ; then \
  667.     if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
  668.       echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \
  669.     else \
  670.       echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
  671.     fi; \
  672.   else \
  673.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  674.       echo $(CXX); \
  675.     else \
  676.       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
  677.     fi; \
  678.   fi`

  679. # The use of $$(x_FOR_TARGET) reduces the command line length by not
  680. # duplicating the lengthy definition.
  681. TARGET_FLAGS_TO_PASS = \
  682.         "prefix=$(prefix)" \
  683.         "exec_prefix=$(exec_prefix)" \
  684.         "against=$(against)" \
  685.         'CC=$$(CC_FOR_TARGET)' \
  686.         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  687.         "CFLAGS=$(CFLAGS)" \
  688.         'CXX=$$(CXX_FOR_TARGET)' \
  689.         "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
  690.         "CXXFLAGS=$(CXXFLAGS)" \
  691.         "INSTALL=$(INSTALL)" \
  692.         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  693.         "INSTALL_DATA=$(INSTALL_DATA)" \
  694.         "MAKEINFO=$(MAKEINFO)" \
  695.         "MAKEHTML=$(MAKEHTML)" \
  696.         "RUNTEST=$(RUNTEST)" \
  697.         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  698.         "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
  699.         "TESTS=$(TESTS)"

  700. # All source files that go into linking GDB.
  701. # Links made at configuration time should not be specified here, since
  702. # SFILES is used in building the distribution archive.

  703. SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
  704.         ada-varobj.c \
  705.         addrmap.c auto-load.c \
  706.         auxv.c ax-general.c ax-gdb.c \
  707.         agent.c \
  708.         bcache.c \
  709.         bfd-target.c \
  710.         block.c blockframe.c \
  711.         breakpoint.c break-catch-sig.c break-catch-throw.c \
  712.         build-id.c buildsym.c \
  713.         c-exp.y c-lang.c c-typeprint.c c-valprint.c c-varobj.c \
  714.         charset.c common/cleanups.c cli-out.c coffread.c coff-pe-read.c \
  715.         complaints.c completer.c continuations.c corefile.c corelow.c \
  716.         cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
  717.         d-exp.y d-lang.c d-valprint.c \
  718.         cp-name-parser.y \
  719.         dbxread.c demangle.c dictionary.c disasm.c doublest.c dummy-frame.c \
  720.         dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \
  721.         dwarf2-frame-tailcall.c \
  722.         elfread.c environ.c eval.c event-loop.c event-top.c \
  723.         exceptions.c expprint.c extension.c \
  724.         f-exp.y f-lang.c f-typeprint.c f-valprint.c filesystem.c \
  725.         findcmd.c findvar.c frame.c frame-base.c frame-unwind.c \
  726.         gdbarch.c arch-utils.c gdb_bfd.c gdb_obstack.c \
  727.         gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
  728.         go-exp.y go-lang.c go-typeprint.c go-valprint.c \
  729.         inf-loop.c \
  730.         infcall.c \
  731.         infcmd.c inflow.c infrun.c \
  732.         inline-frame.c \
  733.         interps.c \
  734.         jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c jv-varobj.c \
  735.         language.c linespec.c minidebug.c \
  736.         m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \
  737.         macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \
  738.         mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c memory-map.c \
  739.         memrange.c mi/mi-common.c \
  740.         objc-lang.c \
  741.         objfiles.c osabi.c observer.c osdata.c \
  742.         opencl-lang.c \
  743.         p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
  744.         proc-service.list progspace.c \
  745.         prologue-value.c psymtab.c \
  746.         regcache.c reggroups.c remote.c remote-fileio.c remote-notif.c reverse.c \
  747.         sentinel-frame.c \
  748.         serial.c ser-base.c ser-unix.c skip.c \
  749.         solib.c solib-target.c source.c \
  750.         stabsread.c stack.c probe.c stap-probe.c std-regs.c \
  751.         symfile.c symfile-debug.c symfile-mem.c symmisc.c symtab.c \
  752.         target.c target-dcache.c target-descriptions.c target-memory.c \
  753.         thread.c top.c tracepoint.c \
  754.         trad-frame.c \
  755.         tramp-frame.c \
  756.         typeprint.c \
  757.         ui-out.c utils.c ui-file.h ui-file.c \
  758.         user-regs.c \
  759.         valarith.c valops.c valprint.c value.c varobj.c common/vec.c \
  760.         xml-tdesc.c xml-support.c \
  761.         inferior.c gdb_usleep.c \
  762.         record.c record-full.c gcore.c \
  763.         jit.c \
  764.         xml-syscall.c \
  765.         annotate.c common/signals.c copying.c dfp.c gdb.c inf-child.c \
  766.         sol-thread.c windows-termcap.c \
  767.         common/gdb_vecs.c common/common-utils.c common/xml-utils.c \
  768.         common/ptid.c common/buffer.c gdb-dlfcn.c common/agent.c \
  769.         common/format.c common/filestuff.c btrace.c record-btrace.c ctf.c \
  770.         target/waitstatus.c common/print-utils.c common/rsp-low.c \
  771.         common/errors.c common/common-debug.c common/common-exceptions.c

  772. LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c

  773. # Header files that need to have srcdir added.  Note that in the cases
  774. # where we use a macro like $(gdbcmd_h), things are carefully arranged
  775. # so that each .h file is listed exactly once (M-x tags-search works
  776. # wrong if TAGS has files twice).  Because this is tricky to get
  777. # right, it is probably easiest just to list .h files here directly.

  778. HFILES_NO_SRCDIR = \
  779. common/gdb_signals.h nat/gdb_thread_db.h common/gdb_vecs.h \
  780. common/x86-xstate.h nat/linux-ptrace.h nat/mips-linux-watch.h \
  781. proc-utils.h aarch64-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \
  782. ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \
  783. exec.h m32r-tdep.h osabi.h gdbcore.h solib-som.h amd64bsd-nat.h \
  784. i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
  785. ia64-tdep.h ada-lang.h ada-varobj.h varobj.h varobj-iter.h frv-tdep.h \
  786. nto-tdep.h serial.h \
  787. c-lang.h d-lang.h go-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \
  788. cli/cli-decode.h cli/cli-cmds.h cli/cli-utils.h \
  789. cli/cli-script.h macrotab.h symtab.h common/version.h \
  790. gnulib/import/string.in.h gnulib/import/str-two-way.h \
  791. gnulib/import/stdint.in.h remote.h remote-notif.h gdb.h sparc-nat.h \
  792. gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
  793. amd64-nat.h s390-linux-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
  794. gdbarch.h bsd-uthread.h memory-map.h memrange.h obsd-nat.h \
  795. mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
  796. ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
  797. f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
  798. objfiles.h common/vec.h disasm.h mips-tdep.h ser-base.h \
  799. gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \
  800. inflow.h fbsd-nat.h ia64-libunwind-tdep.h completer.h inf-ttrace.h \
  801. solib-target.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \
  802. m2-lang.h stack.h charset.h addrmap.h command.h solist.h source.h \
  803. target.h target-dcache.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \
  804. tui/tui-file.h tui/tui-command.h tui/tui-disasm.h tui/tui-wingeneral.h \
  805. tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \
  806. tui/tui-winsource.h tui/tui-regs.h tui/tui-io.h tui/tui-layout.h \
  807. tui/tui-source.h sol2-tdep.h gregset.h sh-tdep.h sh64-tdep.h \
  808. expression.h score-tdep.h gdb_select.h ser-tcp.h \
  809. extension.h extension-priv.h \
  810. build-id.h buildsym.h valprint.h \
  811. typeprint.h mi/mi-getopt.h mi/mi-parse.h mi/mi-console.h \
  812. mi/mi-out.h mi/mi-main.h mi/mi-common.h mi/mi-cmds.h linux-nat.h \
  813. complaints.h gdb_proc_service.h gdb_regex.h xtensa-tdep.h inf-loop.h \
  814. common/gdb_wait.h common/gdb_assert.h solib.h ppc-tdep.h cp-support.h glibc-tdep.h \
  815. interps.h auxv.h gdbcmd.h tramp-frame.h mipsnbsd-tdep.h        \
  816. amd64-linux-tdep.h linespec.h i387-tdep.h mn10300-tdep.h \
  817. sparc64-tdep.h monitor.h ppcobsd-tdep.h srec.h solib-pa64.h \
  818. coff-pe-read.h parser-defs.h gdb_ptrace.h mips-linux-tdep.h \
  819. m68k-tdep.h spu-tdep.h jv-lang.h environ.h amd64-tdep.h \
  820. doublest.h regset.h hppa-tdep.h ppc-linux-tdep.h ppc64-tdep.h \
  821. rs6000-tdep.h rs6000-aix-tdep.h \
  822. common/gdb_locale.h arch-utils.h trad-frame.h gnu-nat.h \
  823. language.h nbsd-tdep.h solib-svr4.h \
  824. macroexp.h ui-file.h regcache.h tracepoint.h tracefile.h i386-tdep.h \
  825. inf-child.h p-lang.h event-top.h gdbtypes.h user-regs.h \
  826. regformats/regdef.h config/i386/nm-i386gnu.h \
  827. config/i386/nm-fbsd.h \
  828. config/nm-nto.h config/sparc/nm-sol2.h config/nm-linux.h \
  829. top.h bsd-kvm.h gdb-stabs.h reggroups.h \
  830. annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h        \
  831. remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
  832. sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
  833. gdb_usleep.h jit.h xml-syscall.h microblaze-tdep.h \
  834. psymtab.h psympriv.h progspace.h bfin-tdep.h ia64-hpux-tdep.h \
  835. amd64-darwin-tdep.h charset-list.h \
  836. config/djgpp/langinfo.h config/djgpp/nl_types.h darwin-nat.h \
  837. dicos-tdep.h filesystem.h gcore.h gdb_wchar.h hppabsd-tdep.h \
  838. i386-darwin-tdep.h x86-nat.h linux-record.h moxie-tdep.h nios2-tdep.h \
  839. osdata.h procfs.h python/py-event.h python/py-events.h python/py-stopevent.h \
  840. python/python-internal.h python/python.h ravenscar-thread.h record.h \
  841. record-full.h solib-aix.h \
  842. solib-darwin.h solib-ia64-hpux.h solib-spu.h windows-nat.h xcoffread.h \
  843. gnulib/import/extra/snippet/arg-nonnull.h gnulib/import/extra/snippet/c++defs.h \
  844. gnulib/import/extra/snippet/warn-on-use.h \
  845. gnulib/import/stddef.in.h gnulib/import/inttypes.in.h inline-frame.h skip.h \
  846. common/common-utils.h common/xml-utils.h common/buffer.h common/ptid.h \
  847. common/format.h common/host-defs.h utils.h common/queue.h \
  848. nat/linux-osdata.h gdb-dlfcn.h auto-load.h probe.h stap-probe.h \
  849. gdb_bfd.h sparc-ravenscar-thread.h ppc-ravenscar-thread.h nat/linux-btrace.h \
  850. ctf.h nat/x86-cpuid.h nat/x86-gcc-cpuid.h target/resume.h \
  851. target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \
  852. common/print-utils.h common/rsp-low.h nat/x86-dregs.h x86-linux-nat.h \
  853. i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h \
  854. common/common-debug.h common/cleanups.h common/gdb_setjmp.h \
  855. common/common-exceptions.h target/target.h common/symbol.h \
  856. common/common-regcache.h fbsd-tdep.h

  857. # Header files that already have srcdir in them, or which are in objdir.

  858. HFILES_WITH_SRCDIR = ../bfd/bfd.h jit-reader.h


  859. # GDB "info" files, which should be included in their entirety
  860. INFOFILES = gdb.info*

  861. REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar

  862. # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
  863. # default their values the way we do for SER_HARDWIRE; in the future
  864. # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
  865. # variables analogous to SER_HARDWIRE which get defaulted in this
  866. # Makefile.in

  867. DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) \
  868.            $(REMOTE_OBS) $(SIM_OBS)

  869. SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS)
  870. # Don't include YYFILES (*.c) because we already include *.y in SFILES,
  871. # and it's more useful to see it in the .y file.
  872. TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
  873.         $(CONFIG_SRCS)
  874. TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)

  875. COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
  876.         version.o \
  877.         annotate.o \
  878.         addrmap.o \
  879.         auto-load.o auxv.o \
  880.         agent.o \
  881.         bfd-target.o \
  882.         blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o \
  883.         findvar.o regcache.o cleanups.o \
  884.         charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o \
  885.         source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o \
  886.         block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o \
  887.         linespec.o dictionary.o \
  888.         infcall.o \
  889.         infcmd.o infrun.o \
  890.         expprint.o environ.o stack.o thread.o \
  891.         exceptions.o \
  892.         extension.o \
  893.         filesystem.o \
  894.         filestuff.o \
  895.         inf-child.o \
  896.         interps.o \
  897.         minidebug.o \
  898.         main.o \
  899.         macrotab.o macrocmd.o macroexp.o macroscope.o \
  900.         mi-common.o \
  901.         event-loop.o event-top.o inf-loop.o completer.o \
  902.         gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o \
  903.         osabi.o copying.o \
  904.         memattr.o mem-break.o target.o target-dcache.o parse.o language.o \
  905.         build-id.o buildsym.o \
  906.         findcmd.o \
  907.         std-regs.o \
  908.         signals.o \
  909.         exec.o reverse.o \
  910.         bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \
  911.         dbxread.o coffread.o coff-pe-read.o \
  912.         dwarf2read.o mipsread.o stabsread.o corefile.o \
  913.         dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o \
  914.         ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o \
  915.         ada-tasks.o ada-varobj.o c-varobj.o \
  916.         ui-out.o cli-out.o \
  917.         varobj.o vec.o \
  918.         go-lang.o go-valprint.o go-typeprint.o \
  919.         jv-lang.o jv-valprint.o jv-typeprint.o jv-varobj.o \
  920.         m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o \
  921.         sentinel-frame.o \
  922.         complaints.o typeprint.o \
  923.         ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o \
  924.         ada-valprint.o c-valprint.o cp-valprint.o d-valprint.o f-valprint.o \
  925.         m2-valprint.o \
  926.         serial.o mdebugread.o top.o utils.o \
  927.         ui-file.o \
  928.         user-regs.o \
  929.         frame.o frame-unwind.o doublest.o \
  930.         frame-base.o \
  931.         inline-frame.o \
  932.         gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
  933.         cp-namespace.o \
  934.         reggroups.o \
  935.         trad-frame.o \
  936.         tramp-frame.o \
  937.         solib.o solib-target.o \
  938.         prologue-value.o memory-map.o memrange.o \
  939.         xml-support.o xml-syscall.o xml-utils.o \
  940.         target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
  941.         inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o \
  942.         gdb_vecs.o jit.o progspace.o skip.o probe.o \
  943.         common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o \
  944.         format.o registry.o btrace.o record-btrace.o waitstatus.o \
  945.         print-utils.o rsp-low.o errors.o common-debug.o debug.o \
  946.         common-exceptions.o

  947. TSOBS = inflow.o

  948. SUBDIRS = doc  testsuite gdbserver data-directory $(GNULIB_BUILDDIR)
  949. CLEANDIRS = $(SUBDIRS)

  950. # List of subdirectories in the build tree that must exist.
  951. # This is used to force build failures in existing trees when
  952. # a new directory is added.
  953. # The format here is for the `case' shell command.
  954. REQUIRED_SUBDIRS = doc | testsuite | $(GNULIB_BUILDDIR) | data-directory

  955. # For now, shortcut the "configure GDB for fewer languages" stuff.
  956. YYFILES = c-exp.c \
  957.         cp-name-parser.c \
  958.         ada-lex.c \
  959.         ada-exp.c \
  960.         jv-exp.c \
  961.         d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c
  962. YYOBJ = c-exp.o \
  963.         cp-name-parser.o \
  964.         ada-exp.o \
  965.         jv-exp.o \
  966.         d-exp.o f-exp.o go-exp.o m2-exp.o p-exp.o

  967. # Things which need to be built when making a distribution.

  968. DISTSTUFF = $(YYFILES)


  969. # All generated files which can be included by another file.
  970. generated_files = config.h observer.h observer.inc ada-lex.c jit-reader.h \
  971.         $(GNULIB_H) $(NAT_GENERATED_FILES) gcore

  972. .c.o:
  973.         $(COMPILE) $<
  974.         $(POSTCOMPILE)

  975. all: gdb$(EXEEXT) $(CONFIG_ALL)
  976.         @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do

  977. installcheck:

  978. # The check target can not use subdir_do, because subdir_do does not
  979. # use TARGET_FLAGS_TO_PASS.
  980. check: force
  981.         @if [ -f testsuite/Makefile ]; then \
  982.           rootme=`pwd`; export rootme; \
  983.           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  984.           cd testsuite; \
  985.           $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
  986.         else true; fi

  987. check-perf: force
  988.         @if [ -f testsuite/Makefile ]; then \
  989.           rootme=`pwd`; export rootme; \
  990.           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  991.           cd testsuite; \
  992.           $(MAKE) $(TARGET_FLAGS_TO_PASS) check-perf; \
  993.         else true; fi

  994. check-read1: force
  995.         @if [ -f testsuite/Makefile ]; then \
  996.           rootme=`pwd`; export rootme; \
  997.           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  998.           cd testsuite; \
  999.           $(MAKE) $(TARGET_FLAGS_TO_PASS) check-read1; \
  1000.         else true; fi

  1001. # The idea is to parallelize testing of multilibs, for example:
  1002. #   make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
  1003. # will run 3 concurrent sessions of check, eventually testing all 10
  1004. # combinations.  GNU make is required for the % pattern to work, as is
  1005. # a shell that expands alternations within braces.  If GNU make is not
  1006. # used, this rule will harmlessly fail to match.  Used FORCE_PARALLEL to
  1007. # prevent serialized checking due to the passed RUNTESTFLAGS.
  1008. # FIXME: use config.status --config not --version, when available.
  1009. check//%: force
  1010.         @if [ -f testsuite/config.status ]; then \
  1011.           rootme=`pwd`; export rootme; \
  1012.           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  1013.           target=`echo "$@" | sed 's,//.*,,'`; \
  1014.           variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
  1015.           vardots=`echo "$$variant" | sed 's,/,.,g'`; \
  1016.           testdir=testsuite.$$vardots; \
  1017.           if [ ! -f $$testdir/Makefile ] && [ -f testsuite/config.status ]; then \
  1018.             configargs=`cd testsuite && ./config.status --version | \
  1019.               sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
  1020.             $(SHELL) $(srcdir)/../mkinstalldirs $$testdir && \
  1021.             (cd $$testdir && \
  1022.              eval $(SHELL) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
  1023.                            "\"--srcdir=\$$rootsrc/testsuite\"" \
  1024.              ); \
  1025.           else :; fi && cd $$testdir && \
  1026.           $(MAKE) $(TARGET_FLAGS_TO_PASS) \
  1027.             RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
  1028.             FORCE_PARALLEL=$(if $(FORCE_PARALLEL),1,$(if $(RUNTESTFLAGS),,1)) \
  1029.             "$$target"; \
  1030.         else true; fi

  1031. # The set of headers checked by 'check-headers' by default.
  1032. CHECK_HEADERS = $(HFILES_NO_SRCDIR)

  1033. # Try to compile each header in isolation, thus ensuring headers are
  1034. # self-contained.
  1035. #
  1036. # Defaults to checking all $HFILES_NO_SRCDIR headers.
  1037. #
  1038. # Do:
  1039. #
  1040. #    make check-headers CHECK_HEADERS="header.h list.h"
  1041. #
  1042. # to check specific headers.
  1043. #
  1044. check-headers:
  1045.         @echo Checking headers.
  1046.         for i in $(CHECK_HEADERS) ; do \
  1047.                 $(CC) -x c -c -fsyntax-only $(INTERNAL_CFLAGS) \
  1048.                         -include defs.h $(srcdir)/$$i ; \
  1049.         done
  1050. .PHONY: check-headers

  1051. info install-info clean-info dvi pdf install-pdf html install-html: force
  1052.         @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do

  1053. # Traditionally "install" depends on "all".  But it may be useful
  1054. # not to; for example, if the user has made some trivial change to a
  1055. # source file and doesn't care about rebuilding or just wants to save the
  1056. # time it takes for make to check that all is up to date.
  1057. # install-only is intended to address that need.
  1058. install: all
  1059.         @$(MAKE) $(FLAGS_TO_PASS) install-only

  1060. install-only: $(CONFIG_INSTALL)
  1061.         transformed_name=`t='$(program_transform_name)'; \
  1062.                           echo gdb | sed -e "$$t"` ; \
  1063.                 if test "x$$transformed_name" = x; then \
  1064.                   transformed_name=gdb ; \
  1065.                 else \
  1066.                   true ; \
  1067.                 fi ; \
  1068.                 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
  1069.                 $(INSTALL_PROGRAM) gdb$(EXEEXT) \
  1070.                         $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
  1071.                 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
  1072.                 $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
  1073.         if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
  1074.         then \
  1075.           transformed_name=`t='$(program_transform_name)'; \
  1076.                             echo gcore | sed -e "$$t"` ; \
  1077.                   if test "x$$transformed_name" = x; then \
  1078.                     transformed_name=gcore ; \
  1079.                   else \
  1080.                     true ; \
  1081.                   fi ; \
  1082.                   $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
  1083.                   $(INSTALL_SCRIPT) gcore \
  1084.                           $(DESTDIR)$(bindir)/$$transformed_name; \
  1085.         fi
  1086.         @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do

  1087. install-strip:
  1088.         $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  1089.           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  1090.           `test -z '$(STRIP)' || \
  1091.             echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only

  1092. install-guile:
  1093.         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/guile/gdb

  1094. install-python:
  1095.         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb

  1096. uninstall: force $(CONFIG_UNINSTALL)
  1097.         transformed_name=`t='$(program_transform_name)'; \
  1098.                           echo gdb | sed -e $$t` ; \
  1099.                 if test "x$$transformed_name" = x; then \
  1100.                   transformed_name=gdb ; \
  1101.                 else \
  1102.                   true ; \
  1103.                 fi ; \
  1104.                 rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
  1105.                       $(DESTDIR)$(man1dir)/$$transformed_name.1
  1106.         if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
  1107.         then \
  1108.           transformed_name=`t='$(program_transform_name)'; \
  1109.                             echo gcore | sed -e "$$t"` ; \
  1110.                   if test "x$$transformed_name" = x; then \
  1111.                     transformed_name=gcore ; \
  1112.                   else \
  1113.                     true ; \
  1114.                   fi ; \
  1115.                   rm -f $(DESTDIR)$(bindir)/$$transformed_name; \
  1116.         fi
  1117.         @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do

  1118. # The C++ name parser can be built standalone for testing.
  1119. test-cp-name-parser.o: cp-name-parser.c
  1120.         $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
  1121.         $(POSTCOMPILE)

  1122. test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
  1123.         $(CC_LD) $(INTERNAL_LDFLAGS) -o test-cp-name-parser$(EXEEXT) \
  1124.                 test-cp-name-parser.o $(LIBIBERTY)

  1125. # We do this by grepping through sources.  If that turns out to be too slow,
  1126. # maybe we could just require every .o file to have an initialization routine
  1127. # of a given name (top.o -> _initialize_top, etc.).
  1128. #
  1129. # Formatting conventions:  The name of the _initialize_* routines must start
  1130. # in column zero, and must not be inside #if.
  1131. #
  1132. # Note that the set of files with init functions might change, or the names
  1133. # of the functions might change, so this files needs to depend on all the
  1134. # object files that will be linked into gdb.

  1135. # FIXME: There is a problem with this approach - init.c may force
  1136. # unnecessary files to be linked in.

  1137. # FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that
  1138. # the first call is to _initialize_gdbtypes (implemented by explicitly
  1139. # putting that function's name first in the init.l-tmp file).  This is
  1140. # a hack to ensure that all the architecture dependant global
  1141. # builtin_type_* variables are initialized before anything else
  1142. # (per-architecture code is called in the same order that it is
  1143. # registered).  The ``correct fix'' is to have all the builtin types
  1144. # made part of the architecture and initialize them on-demand (using
  1145. # gdbarch_data) just like everything else.  The catch is that other
  1146. # modules still take the address of these builtin types forcing them
  1147. # to be variables, sigh!

  1148. # NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is
  1149. # anchored on the first column and excludes the ``/'' character so
  1150. # that it doesn't add the $(srcdir) prefix to any file that already
  1151. # has an absolute path.  It turns out that $(DEC)'s True64 make
  1152. # automatically adds the $(srcdir) prefixes when it encounters files
  1153. # in sub-directories such as cli/ and mi/.

  1154. # NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates
  1155. # duplicates.  Files in the gdb/ directory can end up appearing in
  1156. # COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file).

  1157. INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS)
  1158. init.c: $(INIT_FILES)
  1159.         @echo Making init.c
  1160.         @rm -f init.c-tmp init.l-tmp
  1161.         @touch init.c-tmp
  1162.         @echo gdbtypes > init.l-tmp
  1163.         @-LANG=C ; export LANG ; \
  1164.         LC_ALL=C ; export LC_ALL ; \
  1165.         echo $(INIT_FILES) | \
  1166.         tr ' ' '\012' | \
  1167.         sed \
  1168.             -e '/^gdbtypes.[co]$$/d' \
  1169.             -e '/^init.[co]$$/d' \
  1170.             -e '/xdr_ld.[co]$$/d' \
  1171.             -e '/xdr_ptrace.[co]$$/d' \
  1172.             -e '/xdr_rdb.[co]$$/d' \
  1173.             -e '/udr.[co]$$/d' \
  1174.             -e '/udip2soc.[co]$$/d' \
  1175.             -e '/udi2go32.[co]$$/d' \
  1176.             -e '/version.[co]$$/d' \
  1177.             -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
  1178.             -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \
  1179.             -e 's/\.[co]$$/.c/' \
  1180.             -e 's,signals\.c,common/signals\.c,' \
  1181.             -e 's|^\([^  /][^     ]*\)|$(srcdir)/\1|g' | \
  1182.         while read f; do \
  1183.             sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \
  1184.         done | \
  1185.         while read f; do \
  1186.             case " $$fs " in \
  1187.                 *" $$f "* ) ;; \
  1188.                 * ) echo $$f ; fs="$$fs $$f";; \
  1189.             esac; \
  1190.         done >> init.l-tmp
  1191.         @echo '/* Do not modify this file.  */' >>init.c-tmp
  1192.         @echo '/* It is created automatically by the Makefile.  */'>>init.c-tmp
  1193.         @echo '#include "defs.h"      /* For initialize_file_ftype.  */' >>init.c-tmp
  1194.         @echo 'extern void initialize_all_files(void);' >>init.c-tmp
  1195.         @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp >>init.c-tmp
  1196.         @echo 'void' >>init.c-tmp
  1197.         @echo 'initialize_all_files (void)' >>init.c-tmp
  1198.         @echo '{' >>init.c-tmp
  1199.         @sed -e 's/\(.*\)/  _initialize_\1 ();/' <init.l-tmp >>init.c-tmp
  1200.         @echo '}' >>init.c-tmp
  1201.         @rm init.l-tmp
  1202.         @mv init.c-tmp init.c

  1203. .PRECIOUS: init.c

  1204. # Create a library of the gdb object files and build GDB by linking
  1205. # against that.
  1206. #
  1207. # init.o is very important.  It pulls in the rest of GDB.
  1208. LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o
  1209. libgdb.a: $(LIBGDB_OBS)
  1210.         -rm -f libgdb.a
  1211.         $(AR) q libgdb.a $(LIBGDB_OBS)
  1212.         $(RANLIB) libgdb.a

  1213. # Removing the old gdb first works better if it is running, at least on SunOS.
  1214. gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
  1215.         rm -f gdb$(EXEEXT)
  1216.         $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
  1217.                 -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
  1218.                 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)

  1219. # Convenience rule to handle recursion.
  1220. $(LIBGNU) $(GNULIB_H): all-lib
  1221. all-lib: $(GNULIB_BUILDDIR)/Makefile
  1222.         @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=$(GNULIB_BUILDDIR) subdir_do
  1223. .PHONY: all-lib

  1224. # Convenience rule to handle recursion.
  1225. .PHONY: all-data-directory
  1226. all-data-directory: data-directory/Makefile
  1227.         @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=data-directory subdir_do

  1228. # This is useful when debugging GDB, because some Unix's don't let you run GDB
  1229. # on itself without copying the executable.  So "make gdb1" will make
  1230. # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
  1231. # Removing gdb1 before the copy is the right thing if gdb1 is open
  1232. # in another process.
  1233. gdb1$(EXEEXT): gdb$(EXEEXT)
  1234.         rm -f gdb1$(EXEEXT)
  1235.         cp gdb$(EXEEXT) gdb1$(EXEEXT)

  1236. # Put the proper machine-specific files first, so M-. on a machine
  1237. # specific routine gets the one for the correct machine.  (FIXME: those
  1238. # files go in twice; we should be removing them from the main list).

  1239. # TAGS depends on all the files that go into it so you can rebuild TAGS
  1240. # with `make TAGS' and not have to say `rm TAGS' first.

  1241. GDB_NM_FILE = config/nm-linux.h
  1242. TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
  1243.         @echo Making TAGS
  1244.         etags `(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
  1245.         `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
  1246.                 echo $(srcdir)/$$i ; \
  1247.         done ; for i in $(TAGFILES_WITH_SRCDIR); do \
  1248.                 echo $$i ; \
  1249.         done) | sed -e 's/\.o$$/\.c/'` \
  1250.         `find $(srcdir)/config -name '*.h' -print`

  1251. tags: TAGS

  1252. clean mostlyclean: $(CONFIG_CLEAN)
  1253.         @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
  1254.         rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp
  1255.         rm -f init.c version.c observer.h observer.inc
  1256.         rm -f gdb$(EXEEXT) core make.log
  1257.         rm -f gdb[0-9]$(EXEEXT)
  1258.         rm -f test-cp-name-parser$(EXEEXT)
  1259.         rm -f xml-builtin.c stamp-xml
  1260.         rm -f $(DEPDIR)/*

  1261. # This used to depend on c-exp.c m2-exp.c TAGS
  1262. # I believe this is wrong; the makefile standards for distclean just
  1263. # describe removing files; the only sort of "re-create a distribution"
  1264. # functionality described is if the distributed files are unmodified.
  1265. # NB: While GDBSERVER might be configured on native systems, it isn't
  1266. # always included in SUBDIRS.  Remove the gdbserver files explicitly.
  1267. distclean: clean
  1268.         @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
  1269.         rm -rf $(GNULIB_BUILDDIR)
  1270.         rm -f gdbserver/config.status gdbserver/config.log
  1271.         rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h
  1272.         rm -f gdbserver/Makefile gdbserver/config.cache
  1273.         rm -f nm.h config.status config.h stamp-h gdb-gdb.gdb jit-reader.h
  1274.         rm -f y.output yacc.acts yacc.tmp y.tab.h
  1275.         rm -f config.log config.cache
  1276.         rm -f Makefile
  1277.         rm -rf $(DEPDIR)

  1278. maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
  1279. realclean: maintainer-clean

  1280. local-maintainer-clean:
  1281.         @echo "This command is intended for maintainers to use;"
  1282.         @echo "it deletes files that may require special tools to rebuild."
  1283.         rm -f c-exp.c \
  1284.                 cp-name-parser.c \
  1285.                 ada-lex.c ada-exp.c \
  1286.                 jv-exp.tab \
  1287.                 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c
  1288.         rm -f TAGS $(INFOFILES)
  1289.         rm -f $(YYFILES)
  1290.         rm -f nm.h config.status

  1291. do-maintainer-clean:
  1292.         @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(CLEANDIRS)" \
  1293.                 subdir_do

  1294. diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
  1295.         cd doc; $(MAKE) $(MFLAGS) diststuff

  1296. subdir_do: force
  1297.         @for i in $(DODIRS); do \
  1298.                 case $$i in \
  1299.                 $(REQUIRED_SUBDIRS)) \
  1300.                         if [ ! -f ./$$i/Makefile ] ; then \
  1301.                                 echo "Missing $$i/Makefile" >&2 ; \
  1302.                                 exit 1 ; \
  1303.                         fi ;; \
  1304.                 esac ; \
  1305.                 if [ -f ./$$i/Makefile ] ; then \
  1306.                         if (cd ./$$i; \
  1307.                                 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
  1308.                         else exit 1 ; fi ; \
  1309.                 else true ; fi ; \
  1310.         done

  1311. Makefile: Makefile.in config.status  ./config/i386/linux64.mh
  1312.         # Regenerate the Makefile and the tm.h / nm.h links.
  1313.         CONFIG_FILES="Makefile" \
  1314.           CONFIG_COMMANDS= \
  1315.           CONFIG_HEADERS= \
  1316.           $(SHELL) config.status

  1317. $(GNULIB_BUILDDIR)/Makefile: gnulib/Makefile.in config.status  ./config/i386/linux64.mh
  1318.         @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
  1319.           CONFIG_COMMANDS="depfiles" \
  1320.           CONFIG_HEADERS= \
  1321.           CONFIG_LINKS= \
  1322.           $(SHELL) config.status

  1323. data-directory/Makefile: data-directory/Makefile.in config.status  ./config/i386/linux64.mh
  1324.         CONFIG_FILES="data-directory/Makefile" \
  1325.           CONFIG_COMMANDS="depfiles" \
  1326.           CONFIG_HEADERS= \
  1327.           CONFIG_LINKS= \
  1328.           $(SHELL) config.status

  1329. .PHONY: run
  1330. run: Makefile
  1331.         ./gdb$(EXEEXT) --data-directory=`pwd`/data-directory $(GDBFLAGS)

  1332. jit-reader.h: $(srcdir)/jit-reader.in
  1333.         $(SHELL) config.status $@

  1334. gcore: $(srcdir)/gcore.in
  1335.         $(SHELL) config.status $@

  1336. config.h: stamp-h ; @true
  1337. stamp-h: $(srcdir)/config.in config.status
  1338.         CONFIG_HEADERS=config.h:config.in \
  1339.           CONFIG_COMMANDS="default depdir" \
  1340.           CONFIG_FILES= \
  1341.           CONFIG_LINKS= \
  1342.           $(SHELL) config.status

  1343. config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh
  1344.         $(SHELL) config.status --recheck

  1345. ACLOCAL = aclocal
  1346. ACLOCAL_AMFLAGS = -I ../config

  1347. # Keep these in sync with the includes in acinclude.m4.
  1348. aclocal_m4_deps = \
  1349.         configure.ac \
  1350.         acx_configure_dir.m4 \
  1351.         libmcheck.m4 \
  1352.         ../bfd/bfd.m4 \
  1353.         ../config/acinclude.m4 \
  1354.         ../config/plugins.m4 \
  1355.         ../config/lead-dot.m4 \
  1356.         ../config/override.m4 \
  1357.         ../config/largefile.m4 \
  1358.         ../config/gettext-sister.m4 \
  1359.         ../config/lib-ld.m4 \
  1360.         ../config/lib-prefix.m4 \
  1361.         ../config/lib-link.m4 \
  1362.         ../config/acx.m4 \
  1363.         ../config/tcl.m4 \
  1364.         ../config/depstand.m4 \
  1365.         ../config/lcmessage.m4 \
  1366.         ../config/codeset.m4 \
  1367.         ../config/zlib.m4

  1368. $(srcdir)/aclocal.m4: # $(aclocal_m4_deps)
  1369.         cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)

  1370. AUTOCONF = autoconf
  1371. configure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
  1372. $(srcdir)/configure: # $(configure_deps)
  1373.         cd $(srcdir) && $(AUTOCONF)

  1374. AUTOHEADER = autoheader
  1375. $(srcdir)/config.in: # $(configure_deps)
  1376.         cd $(srcdir) && $(AUTOHEADER)
  1377.         rm -f stamp-h
  1378.         touch $@

  1379. # automatic rebuilding in automake-generated Makefiles requires
  1380. # this rule in the toplevel Makefile, which, with GNU make, causes
  1381. # the desired updates through the implicit regeneration of the Makefile
  1382. # and all of its prerequisites.
  1383. am--refresh:
  1384.         @:

  1385. force:

  1386. # Documentation!
  1387. # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
  1388. doc/refcard.dvi:
  1389.         cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS)

  1390. # GDB QUICK REFERENCE (PostScript output, common PS fonts)
  1391. doc/refcard.ps:
  1392.         cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS)

  1393. # GDB MANUAL: TeX dvi file
  1394. doc/gdb.dvi:
  1395.         cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS)

  1396. # GDB MANUAL: info file
  1397. doc/gdb.info:
  1398.         cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)

  1399. # Make copying.c from COPYING
  1400. $(srcdir)/copying.c: # $(srcdir)/../COPYING3 $(srcdir)/copying.awk
  1401.         awk -f $(srcdir)/copying.awk \
  1402.                 < $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
  1403.         mv $(srcdir)/copying.tmp $(srcdir)/copying.c

  1404. version.c: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
  1405.         $(SHELL) $(srcdir)/common/create-version.sh $(srcdir) \
  1406.             $(host_alias) $(target_alias) version.c

  1407. observer.h: observer.sh doc/observer.texi
  1408.         ${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h

  1409. observer.inc: observer.sh doc/observer.texi
  1410.         ${srcdir}/observer.sh inc ${srcdir}/doc/observer.texi observer.inc

  1411. lint: $(LINTFILES)
  1412.         $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
  1413.            `echo $(DEPFILES) $(CONFIG_OBS) | sed 's/\.o /\.c /g'`

  1414. gdb.cxref: $(SFILES)
  1415.         cxref -I. $(SFILES) >gdb.cxref

  1416. force_update:

  1417. # GNU Make has an annoying habit of putting *all* the Makefile variables
  1418. # into the environment, unless you include this target as a circumvention.
  1419. # Rumor is that this will be fixed (and this target can be removed)
  1420. # in GNU Make 4.0.
  1421. .NOEXPORT:

  1422. # GNU Make 3.63 has a different problem: it keeps tacking command line
  1423. # overrides onto the definition of $(MAKE).  This variable setting
  1424. # will remove them.
  1425. MAKEOVERRIDES=

  1426. ALLDEPFILES = \
  1427.         aarch64-tdep.c aarch64-linux-tdep.c aarch64-newlib-tdep.c \
  1428.         aarch64-linux-nat.c \
  1429.         aix-thread.c \
  1430.         alphabsd-nat.c alpha-linux-nat.c \
  1431.         alpha-tdep.c alpha-mdebug-tdep.c \
  1432.         alpha-linux-tdep.c \
  1433.         alphabsd-tdep.c alphafbsd-tdep.c alphanbsd-tdep.c alphaobsd-tdep.c \
  1434.         amd64-nat.c amd64-tdep.c \
  1435.         amd64bsd-nat.c amd64fbsd-nat.c amd64fbsd-tdep.c \
  1436.         amd64nbsd-nat.c amd64nbsd-tdep.c \
  1437.         amd64obsd-nat.c amd64obsd-tdep.c \
  1438.         amd64-darwin-tdep.c \
  1439.         amd64-dicos-tdep.c \
  1440.         amd64-linux-nat.c amd64-linux-tdep.c \
  1441.         amd64-sol2-tdep.c \
  1442.         arm-linux-nat.c arm-linux-tdep.c arm-symbian-tdep.c arm-tdep.c \
  1443.         armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
  1444.         avr-tdep.c \
  1445.         bfin-linux-tdep.c bfin-tdep.c \
  1446.         bsd-uthread.c bsd-kvm.c \
  1447.         core-regset.c \
  1448.         dcache.c dicos-tdep.c darwin-nat.c \
  1449.         exec.c \
  1450.         fbsd-nat.c \
  1451.         fbsd-tdep.c \
  1452.         fork-child.c \
  1453.         glibc-tdep.c \
  1454.         go32-nat.c h8300-tdep.c \
  1455.         hppa-tdep.c hppa-hpux-tdep.c hppa-hpux-nat.c \
  1456.         hppa-linux-tdep.c hppa-linux-nat.c \
  1457.         hppabsd-nat.c hppabsd-tdep.c \
  1458.         hppaobsd-tdep.c \
  1459.         hppanbsd-nat.c hppanbsd-tdep.c \
  1460.         i386-tdep.c i386-linux-nat.c \
  1461.         i386v4-nat.c i386-cygwin-tdep.c \
  1462.         i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
  1463.         i386nbsd-nat.c i386nbsd-tdep.c i386obsd-nat.c i386obsd-tdep.c \
  1464.         i387-tdep.c \
  1465.         i386-darwin-tdep.c i386-darwin-nat.c \
  1466.         i386-dicos-tdep.c \
  1467.         i386-linux-tdep.c x86-nat.c \
  1468.         i386-sol2-nat.c i386-sol2-tdep.c \
  1469.         i386gnu-nat.c i386gnu-tdep.c \
  1470.         ia64-hpux-nat.c ia64-hpux-tdep.c \
  1471.         ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c ia64-vms-tdep.c \
  1472.         inf-ptrace.c inf-ttrace.c \
  1473.         irix5-nat.c \
  1474.         ia64-libunwind-tdep.c \
  1475.         linux-fork.c \
  1476.         linux-tdep.c \
  1477.         linux-record.c \
  1478.         lm32-tdep.c \
  1479.         m68hc11-tdep.c \
  1480.         m32r-tdep.c \
  1481.         m32r-linux-nat.c m32r-linux-tdep.c \
  1482.         m68k-tdep.c \
  1483.         m68kbsd-nat.c m68kbsd-tdep.c \
  1484.         m68klinux-nat.c m68klinux-tdep.c \
  1485.         m88k-tdep.c m88kbsd-nat.c \
  1486.         microblaze-tdep.c microblaze-linux-tdep.c \
  1487.         mingw-hdep.c \
  1488.         mips-linux-nat.c mips-linux-tdep.c \
  1489.         mips-tdep.c \
  1490.         mipsnbsd-nat.c mipsnbsd-tdep.c \
  1491.         mips64obsd-nat.c mips64obsd-tdep.c \
  1492.         msp430-tdep.c \
  1493.         nios2-tdep.c nios2-linux-tdep.c \
  1494.         nbsd-nat.c nbsd-tdep.c obsd-nat.c obsd-tdep.c \
  1495.         somread.c solib-som.c \
  1496.         posix-hdep.c \
  1497.         ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c ppc64-tdep.c \
  1498.         ppcfbsd-nat.c ppcfbsd-tdep.c \
  1499.         ppcnbsd-nat.c ppcnbsd-tdep.c \
  1500.         ppcobsd-nat.c ppcobsd-tdep.c \
  1501.         procfs.c \
  1502.         ravenscar-thread.c \
  1503.         remote-m32r-sdi.c remote-mips.c \
  1504.         remote-sim.c \
  1505.         dcache.c \
  1506.         rl78-tdep.c \
  1507.         rs6000-nat.c rs6000-tdep.c solib-aix.c ppc-ravenscar-thread.c \
  1508.         rs6000-lynx178-tdep.c \
  1509.         rx-tdep.c \
  1510.         s390-linux-tdep.c s390-linux-nat.c \
  1511.         score-tdep.c \
  1512.         ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
  1513.         sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
  1514.         sol2-tdep.c \
  1515.         solib-svr4.c \
  1516.         sparc-linux-nat.c sparc-linux-tdep.c \
  1517.         sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-sol2-tdep.c \
  1518.         sparc-nat.c sparc-tdep.c sparc64-linux-nat.c sparc64-linux-tdep.c \
  1519.         sparc64-nat.c sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \
  1520.         sparc64nbsd-nat.c sparc64nbsd-tdep.c \
  1521.         sparc64obsd-nat.c sparc64obsd-tdep.c \
  1522.         sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \
  1523.         sparc-ravenscar-thread.c \
  1524.         spu-linux-nat.c spu-tdep.c spu-multiarch.c solib-spu.c \
  1525.         tilegx-linux-nat.c tilegx-tdep.c tilegx-linux-tdep.c \
  1526.         v850-tdep.c \
  1527.         vax-nat.c vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
  1528.         windows-nat.c windows-tdep.c \
  1529.         xcoffread.c \
  1530.         xstormy16-tdep.c \
  1531.         xtensa-tdep.c xtensa-config.c \
  1532.         xtensa-linux-tdep.c xtensa-linux-nat.c xtensa-xtregs.c

  1533. # Some files need explicit build rules (due to -Werror problems) or due
  1534. # to sub-directory fun 'n' games.

  1535. # FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral
  1536. # errors.  It turns out that that is the least of monitor.c's
  1537. # problems.  The function print_vsprintf appears to be using
  1538. # va_arg(long) to extract CORE_ADDR parameters - something that
  1539. # definitly will not work.  "monitor.c" needs to be rewritten so that
  1540. # it doesn't use format strings and instead uses callbacks.
  1541. monitor.o: $(srcdir)/monitor.c
  1542.         $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
  1543.                 $(COMPILE.post) $(srcdir)/monitor.c
  1544.         $(POSTCOMPILE)

  1545. # Do not try to build "printcmd.c" with -Wformat-nonliteral.  It manually
  1546. # checks format strings.
  1547. printcmd.o: $(srcdir)/printcmd.c
  1548.         $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
  1549.                 $(COMPILE.post) $(srcdir)/printcmd.c
  1550.         $(POSTCOMPILE)

  1551. # ada-exp.c can appear in srcdir, for releases; or in ., for
  1552. # development builds.
  1553. ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`

  1554. # Some versions of flex give output that triggers
  1555. # -Wold-style-definition.
  1556. ada-exp.o: ada-exp.c
  1557.         $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_DEFS) \
  1558.                 $(COMPILE.post) $(ADA_EXP_C)
  1559.         $(POSTCOMPILE)

  1560. # Message files.  Based on code in gcc/Makefile.in.

  1561. # Rules for generating translated message descriptions.  Disabled by
  1562. # autoconf if the tools are not available.

  1563. .SUFFIXES: .po .gmo .pox .pot
  1564. .PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot

  1565. all-po: $(CATALOGS)

  1566. # This notation should be acceptable to all Make implementations used
  1567. # by people who are interested in updating .po files.
  1568. update-po: $(CATALOGS:.gmo=.pox)

  1569. # N.B. We do not attempt to copy these into $(srcdir).  The snapshot
  1570. # script does that.
  1571. .po.gmo:
  1572.         -test -d po || mkdir po
  1573.         $(GMSGFMT) --statistics -o $@ $<

  1574. # The new .po has to be gone over by hand, so we deposit it into
  1575. # build/po with a different extension.  If build/po/$(PACKAGE).pot
  1576. # exists, use it (it was just created), else use the one in srcdir.
  1577. .po.pox:
  1578.         -test -d po || mkdir po
  1579.         $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
  1580.                         then echo po/$(PACKAGE).pot; \
  1581.                         else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@

  1582. # This rule has to look for .gmo modules in both srcdir and the cwd,
  1583. # and has to check that we actually have a catalog for each language,
  1584. # in case they weren't built or included with the distribution.
  1585. install-po:
  1586.         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
  1587.         cats="$(CATALOGS)"; for cat in $$cats; do \
  1588.           lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  1589.           if [ -f $$cat ]; then :; \
  1590.           elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
  1591.           else continue; \
  1592.           fi; \
  1593.           dir=$(localedir)/$$lang/LC_MESSAGES; \
  1594.           echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
  1595.           $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
  1596.           echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  1597.           $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  1598.         done
  1599. uninstall-po:
  1600.         cats="$(CATALOGS)"; for cat in $$cats; do \
  1601.           lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  1602.           if [ -f $$cat ]; then :; \
  1603.           elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
  1604.           else continue; \
  1605.           fi; \
  1606.           dir=$(localedir)/$$lang/LC_MESSAGES; \
  1607.           rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
  1608.         done
  1609. # Delete po/*.gmo only if we are not building in the source directory.
  1610. clean-po:
  1611.         -if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi

  1612. # Rule for regenerating the message template (gdb.pot).  Instead of
  1613. # forcing everyone to edit POTFILES.in, which proved impractical, this
  1614. # rule has no dependencies and always regenerates gdb.pot.  This is
  1615. # relatively harmless since the .po files do not directly depend on
  1616. # it.  The .pot file is left in the build directory.  Since GDB's
  1617. # Makefile lacks a cannonical list of sources (missing xm, tm and nm
  1618. # files) force this rule.
  1619. $(PACKAGE).pot: po/$(PACKAGE).pot
  1620. po/$(PACKAGE).pot: force
  1621.         -test -d po || mkdir po
  1622.         sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)


  1623. #
  1624. # YACC/LEX dependencies
  1625. #
  1626. # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
  1627. # exist in srcdir, then compiled in objdir to LANG-exp.o.  If we
  1628. # said LANG-exp.c rather than ./c-exp.c some makes would
  1629. # sometimes re-write it into $(srcdir)/c-exp.c.  Remove bogus
  1630. # decls for malloc/realloc/free which conflict with everything else.
  1631. # Strictly speaking c-exp.c should therefore depend on
  1632. # Makefile.in, but that was a pretty big annoyance.

  1633. .SUFFIXES: .y .l
  1634. .y.c:
  1635.         rm -f $@ $@.tmp
  1636.         $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
  1637.                 || (rm -f $@; false)
  1638.         sed -e '/extern.*malloc/d' \
  1639.              -e '/extern.*realloc/d' \
  1640.              -e '/extern.*free/d' \
  1641.              -e '/include.*malloc.h/d' \
  1642.              -e 's/\([^x]\)malloc/\1xmalloc/g' \
  1643.              -e 's/\([^x]\)realloc/\1xrealloc/g' \
  1644.              -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
  1645.              -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
  1646.              -e '/^#line.*y.tab.c/d' \
  1647.              -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \
  1648.           < $@.tmp > $@
  1649.         rm -f $@.tmp
  1650. .l.c:
  1651.         if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
  1652.             $(FLEX) -o$@ $< && \
  1653.             rm -f $@.new && \
  1654.             sed -e '/extern.*malloc/d' \
  1655.                 -e '/extern.*realloc/d' \
  1656.                 -e '/extern.*free/d' \
  1657.                 -e '/include.*malloc.h/d' \
  1658.                 -e 's/\([^x]\)malloc/\1xmalloc/g' \
  1659.                 -e 's/\([^x]\)realloc/\1xrealloc/g' \
  1660.                 -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
  1661.                 -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
  1662.                 -e 's/yy_flex_xrealloc/yyxrealloc/g' \
  1663.               < $@ > $@.new && \
  1664.             rm -f $@ && \
  1665.             mv $@.new $@; \
  1666.         elif [ -f $@ ]; then \
  1667.             echo "Warning: $*.c older than $*.l and flex not available."; \
  1668.         else \
  1669.             echo "$@ missing and flex not available."; \
  1670.             false; \
  1671.         fi

  1672. .PRECIOUS: ada-lex.c

  1673. # XML rules

  1674. xml-builtin.c: stamp-xml; @true
  1675. stamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES)
  1676.         rm -f xml-builtin.tmp
  1677.         AWK="$(AWK)" \
  1678.           $(SHELL) $(srcdir)/features/feature_to_c.sh \
  1679.           xml-builtin.tmp $(XMLFILES)
  1680.         $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin.c
  1681.         echo stamp > stamp-xml

  1682. .PRECIOUS: xml-builtin.c

  1683. #
  1684. # gdb/cli/ dependencies
  1685. #
  1686. # Need to explicitly specify the compile rule as make will do nothing
  1687. # or try to compile the object file into the sub-directory.

  1688. cli-cmds.o: $(srcdir)/cli/cli-cmds.c
  1689.         $(COMPILE) $(srcdir)/cli/cli-cmds.c
  1690.         $(POSTCOMPILE)

  1691. cli-decode.o: $(srcdir)/cli/cli-decode.c
  1692.         $(COMPILE) $(srcdir)/cli/cli-decode.c
  1693.         $(POSTCOMPILE)

  1694. cli-dump.o: $(srcdir)/cli/cli-dump.c
  1695.         $(COMPILE) $(srcdir)/cli/cli-dump.c
  1696.         $(POSTCOMPILE)

  1697. cli-interp.o: $(srcdir)/cli/cli-interp.c
  1698.         $(COMPILE) $(srcdir)/cli/cli-interp.c
  1699.         $(POSTCOMPILE)

  1700. cli-logging.o: $(srcdir)/cli/cli-logging.c
  1701.         $(COMPILE) $(srcdir)/cli/cli-logging.c
  1702.         $(POSTCOMPILE)

  1703. cli-script.o: $(srcdir)/cli/cli-script.c
  1704.         $(COMPILE) $(srcdir)/cli/cli-script.c
  1705.         $(POSTCOMPILE)

  1706. cli-setshow.o: $(srcdir)/cli/cli-setshow.c
  1707.         $(COMPILE) $(srcdir)/cli/cli-setshow.c
  1708.         $(POSTCOMPILE)

  1709. cli-utils.o: $(srcdir)/cli/cli-utils.c
  1710.         $(COMPILE) $(srcdir)/cli/cli-utils.c
  1711.         $(POSTCOMPILE)


  1712. #
  1713. # GDBTK sub-directory
  1714. #
  1715. # Need to explicitly specify the compile rule as make will do nothing
  1716. # or try to compile the object file into the mi directory.

  1717. all-gdbtk: insight$(EXEEXT)

  1718. install-gdbtk:
  1719.         transformed_name=`t='$(program_transform_name)'; \
  1720.                   echo insight | sed -e $$t` ; \
  1721.         if test "x$$transformed_name" = x; then \
  1722.           transformed_name=insight ; \
  1723.         else \
  1724.           true ; \
  1725.         fi ; \
  1726.         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
  1727.         $(INSTALL_PROGRAM) insight$(EXEEXT) \
  1728.                 $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
  1729.         $(SHELL) $(srcdir)/../mkinstalldirs \
  1730.                 $(DESTDIR)$(GDBTK_LIBRARY) ; \
  1731.         $(SHELL) $(srcdir)/../mkinstalldirs \
  1732.                 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \
  1733.         $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \
  1734.                 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
  1735.         $(SHELL) $(srcdir)/../mkinstalldirs \
  1736.                 $(DESTDIR)$(GDBTK_LIBRARY)/images \
  1737.                 $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \
  1738.         $(SHELL) $(srcdir)/../mkinstalldirs \
  1739.                 $(DESTDIR)$(GDBTK_LIBRARY)/help \
  1740.                 $(DESTDIR)$(GDBTK_LIBRARY)/help/images \
  1741.                 $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
  1742.         cd $(srcdir)/gdbtk/library ; \
  1743.         for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html  help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \
  1744.           do \
  1745.                 $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
  1746.           done ;

  1747. uninstall-gdbtk:
  1748.         transformed_name=`t='$(program_transform_name)'; \
  1749.                   echo insight | sed -e $$t` ; \
  1750.         if test "x$$transformed_name" = x; then \
  1751.                 transformed_name=insight ; \
  1752.         else \
  1753.                 true ; \
  1754.         fi ; \
  1755.         rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
  1756.         rm -rf $(DESTDIR)$(GDBTK_LIBRARY)

  1757. clean-gdbtk:
  1758.         rm -f insight$(EXEEXT)

  1759. # Removing the old gdb first works better if it is running, at least on SunOS.
  1760. insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \
  1761.                 $(CDEPS) $(TDEPLIBS)
  1762.         rm -f insight$(EXEEXT)
  1763.         $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
  1764.                 -o insight$(EXEEXT) gdbtk-main.o libgdb.a \
  1765.                 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)

  1766. gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
  1767.         $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o

  1768. all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \
  1769.                 $(ITK_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
  1770.                 $(GDBTK_CFLAGS) \
  1771.                 -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
  1772.                 -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"

  1773. gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c
  1774.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk.c
  1775.         $(POSTCOMPILE)

  1776. gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c
  1777.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-bp.c
  1778.         $(POSTCOMPILE)

  1779. gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c
  1780.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-cmds.c
  1781.         $(POSTCOMPILE)

  1782. gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c
  1783.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-hooks.c
  1784.         $(POSTCOMPILE)

  1785. gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c
  1786.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-interp.c
  1787.         $(POSTCOMPILE)

  1788. gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c
  1789.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-main.c
  1790.         $(POSTCOMPILE)

  1791. gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c
  1792.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-register.c
  1793.         $(POSTCOMPILE)

  1794. gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c
  1795.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-stack.c
  1796.         $(POSTCOMPILE)

  1797. gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c
  1798.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-varobj.c
  1799.         $(POSTCOMPILE)

  1800. gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
  1801.         $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
  1802.         $(POSTCOMPILE)


  1803. #
  1804. # gdb/mi/ dependencies
  1805. #
  1806. # Need to explicitly specify the compile rule as make will do nothing
  1807. # or try to compile the object file into the sub-directory.

  1808. mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c
  1809.         $(COMPILE) $(srcdir)/mi/mi-cmd-break.c
  1810.         $(POSTCOMPILE)

  1811. mi-cmd-catch.o: $(srcdir)/mi/mi-cmd-catch.c
  1812.         $(COMPILE) $(srcdir)/mi/mi-cmd-catch.c
  1813.         $(POSTCOMPILE)

  1814. mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c
  1815.         $(COMPILE) $(srcdir)/mi/mi-cmd-disas.c
  1816.         $(POSTCOMPILE)

  1817. mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c
  1818.         $(COMPILE) $(srcdir)/mi/mi-cmd-env.c
  1819.         $(POSTCOMPILE)

  1820. mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c
  1821.         $(COMPILE) $(srcdir)/mi/mi-cmd-file.c
  1822.         $(POSTCOMPILE)

  1823. mi-cmd-info.o: $(srcdir)/mi/mi-cmd-info.c
  1824.         $(COMPILE) $(srcdir)/mi/mi-cmd-info.c
  1825.         $(POSTCOMPILE)

  1826. mi-cmds.o: $(srcdir)/mi/mi-cmds.c
  1827.         $(COMPILE) $(srcdir)/mi/mi-cmds.c
  1828.         $(POSTCOMPILE)

  1829. mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c
  1830.         $(COMPILE) $(srcdir)/mi/mi-cmd-stack.c
  1831.         $(POSTCOMPILE)

  1832. mi-cmd-target.o: $(srcdir)/mi/mi-cmd-target.c
  1833.         $(COMPILE) $(srcdir)/mi/mi-cmd-target.c
  1834.         $(POSTCOMPILE)

  1835. mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c
  1836.         $(COMPILE) $(srcdir)/mi/mi-cmd-var.c
  1837.         $(POSTCOMPILE)

  1838. mi-console.o: $(srcdir)/mi/mi-console.c
  1839.         $(COMPILE) $(srcdir)/mi/mi-console.c
  1840.         $(POSTCOMPILE)

  1841. mi-getopt.o: $(srcdir)/mi/mi-getopt.c
  1842.         $(COMPILE) $(srcdir)/mi/mi-getopt.c
  1843.         $(POSTCOMPILE)

  1844. mi-interp.o: $(srcdir)/mi/mi-interp.c
  1845.         $(COMPILE) $(srcdir)/mi/mi-interp.c
  1846.         $(POSTCOMPILE)

  1847. mi-main.o: $(srcdir)/mi/mi-main.c
  1848.         $(COMPILE) $(srcdir)/mi/mi-main.c
  1849.         $(POSTCOMPILE)

  1850. mi-out.o: $(srcdir)/mi/mi-out.c
  1851.         $(COMPILE) $(srcdir)/mi/mi-out.c
  1852.         $(POSTCOMPILE)

  1853. mi-parse.o: $(srcdir)/mi/mi-parse.c
  1854.         $(COMPILE) $(srcdir)/mi/mi-parse.c
  1855.         $(POSTCOMPILE)

  1856. mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c
  1857.         $(COMPILE) $(srcdir)/mi/mi-symbol-cmds.c
  1858.         $(POSTCOMPILE)

  1859. mi-common.o: $(srcdir)/mi/mi-common.c
  1860.         $(COMPILE) $(srcdir)/mi/mi-common.c
  1861.         $(POSTCOMPILE)

  1862. # gdb/common/ dependencies
  1863. #
  1864. # Need to explicitly specify the compile rule as make will do nothing
  1865. # or try to compile the object file into the sub-directory.

  1866. signals.o: $(srcdir)/common/signals.c
  1867.         $(COMPILE) $(srcdir)/common/signals.c
  1868.         $(POSTCOMPILE)

  1869. common-utils.o: ${srcdir}/common/common-utils.c
  1870.         $(COMPILE) $(srcdir)/common/common-utils.c
  1871.         $(POSTCOMPILE)

  1872. gdb_vecs.o: ${srcdir}/common/gdb_vecs.c
  1873.         $(COMPILE) $(srcdir)/common/gdb_vecs.c
  1874.         $(POSTCOMPILE)

  1875. xml-utils.o: ${srcdir}/common/xml-utils.c
  1876.         $(COMPILE) $(srcdir)/common/xml-utils.c
  1877.         $(POSTCOMPILE)

  1878. ptid.o: ${srcdir}/common/ptid.c
  1879.         $(COMPILE) $(srcdir)/common/ptid.c
  1880.         $(POSTCOMPILE)

  1881. buffer.o: ${srcdir}/common/buffer.c
  1882.         $(COMPILE) $(srcdir)/common/buffer.c
  1883.         $(POSTCOMPILE)

  1884. filestuff.o: $(srcdir)/common/filestuff.c
  1885.         $(COMPILE) $(srcdir)/common/filestuff.c
  1886.         $(POSTCOMPILE)

  1887. format.o: ${srcdir}/common/format.c
  1888.         $(COMPILE) $(srcdir)/common/format.c
  1889.         $(POSTCOMPILE)

  1890. common-agent.o: $(srcdir)/common/agent.c
  1891.         $(COMPILE) $(srcdir)/common/agent.c
  1892.         $(POSTCOMPILE)

  1893. vec.o: ${srcdir}/common/vec.c
  1894.         $(COMPILE) $(srcdir)/common/vec.c
  1895.         $(POSTCOMPILE)

  1896. print-utils.o: ${srcdir}/common/print-utils.c
  1897.         $(COMPILE) $(srcdir)/common/print-utils.c
  1898.         $(POSTCOMPILE)

  1899. rsp-low.o: ${srcdir}/common/rsp-low.c
  1900.         $(COMPILE) $(srcdir)/common/rsp-low.c
  1901.         $(POSTCOMPILE)

  1902. errors.o: ${srcdir}/common/errors.c
  1903.         $(COMPILE) $(srcdir)/common/errors.c
  1904.         $(POSTCOMPILE)

  1905. common-debug.o: ${srcdir}/common/common-debug.c
  1906.         $(COMPILE) $(srcdir)/common/common-debug.c
  1907.         $(POSTCOMPILE)

  1908. cleanups.o: ${srcdir}/common/cleanups.c
  1909.         $(COMPILE) $(srcdir)/common/cleanups.c
  1910.         $(POSTCOMPILE)

  1911. common-exceptions.o: ${srcdir}/common/common-exceptions.c
  1912.         $(COMPILE) $(srcdir)/common/common-exceptions.c
  1913.         $(POSTCOMPILE)

  1914. #
  1915. # gdb/target/ dependencies
  1916. #
  1917. # Need to explicitly specify the compile rule as make will do nothing
  1918. # or try to compile the object file into the sub-directory.

  1919. waitstatus.o: ${srcdir}/target/waitstatus.c
  1920.         $(COMPILE) $(srcdir)/target/waitstatus.c
  1921.         $(POSTCOMPILE)

  1922. # gdb/nat/ dependencies
  1923. #
  1924. # Need to explicitly specify the compile rule as make will do nothing
  1925. # or try to compile the object file into the sub-directory.

  1926. x86-dregs.o: ${srcdir}/nat/x86-dregs.c
  1927.         $(COMPILE) $(srcdir)/nat/x86-dregs.c
  1928.         $(POSTCOMPILE)

  1929. linux-btrace.o: ${srcdir}/nat/linux-btrace.c
  1930.         $(COMPILE) $(srcdir)/nat/linux-btrace.c
  1931.         $(POSTCOMPILE)

  1932. linux-osdata.o: ${srcdir}/nat/linux-osdata.c
  1933.         $(COMPILE) $(srcdir)/nat/linux-osdata.c
  1934.         $(POSTCOMPILE)

  1935. linux-procfs.o: $(srcdir)/nat/linux-procfs.c
  1936.         $(COMPILE) $(srcdir)/nat/linux-procfs.c
  1937.         $(POSTCOMPILE)

  1938. linux-ptrace.o: $(srcdir)/nat/linux-ptrace.c
  1939.         $(COMPILE) $(srcdir)/nat/linux-ptrace.c
  1940.         $(POSTCOMPILE)

  1941. linux-waitpid.o: ${srcdir}/nat/linux-waitpid.c
  1942.         $(COMPILE) $(srcdir)/nat/linux-waitpid.c
  1943.         $(POSTCOMPILE)

  1944. mips-linux-watch.o: ${srcdir}/nat/mips-linux-watch.c
  1945.         $(COMPILE) $(srcdir)/nat/mips-linux-watch.c
  1946.         $(POSTCOMPILE)

  1947. #
  1948. # gdb/tui/ dependencies
  1949. #
  1950. # Need to explicitly specify the compile rule as make will do nothing
  1951. # or try to compile the object file into the sub-directory.

  1952. tui.o: $(srcdir)/tui/tui.c
  1953.         $(COMPILE) $(srcdir)/tui/tui.c
  1954.         $(POSTCOMPILE)

  1955. tui-command.o: $(srcdir)/tui/tui-command.c
  1956.         $(COMPILE) $(srcdir)/tui/tui-command.c
  1957.         $(POSTCOMPILE)

  1958. tui-data.o: $(srcdir)/tui/tui-data.c
  1959.         $(COMPILE) $(srcdir)/tui/tui-data.c
  1960.         $(POSTCOMPILE)

  1961. tui-disasm.o: $(srcdir)/tui/tui-disasm.c
  1962.         $(COMPILE) $(srcdir)/tui/tui-disasm.c
  1963.         $(POSTCOMPILE)

  1964. tui-file.o: $(srcdir)/tui/tui-file.c
  1965.         $(COMPILE) $(srcdir)/tui/tui-file.c
  1966.         $(POSTCOMPILE)

  1967. tui-hooks.o: $(srcdir)/tui/tui-hooks.c
  1968.         $(COMPILE) $(srcdir)/tui/tui-hooks.c
  1969.         $(POSTCOMPILE)

  1970. tui-interp.o: $(srcdir)/tui/tui-interp.c
  1971.         $(COMPILE) $(srcdir)/tui/tui-interp.c
  1972.         $(POSTCOMPILE)

  1973. tui-io.o: $(srcdir)/tui/tui-io.c
  1974.         $(COMPILE) $(srcdir)/tui/tui-io.c
  1975.         $(POSTCOMPILE)

  1976. tui-layout.o: $(srcdir)/tui/tui-layout.c
  1977.         $(COMPILE) $(srcdir)/tui/tui-layout.c
  1978.         $(POSTCOMPILE)

  1979. tui-out.o: $(srcdir)/tui/tui-out.c
  1980.         $(COMPILE) $(srcdir)/tui/tui-out.c
  1981.         $(POSTCOMPILE)

  1982. tui-regs.o: $(srcdir)/tui/tui-regs.c
  1983.         $(COMPILE) $(srcdir)/tui/tui-regs.c
  1984.         $(POSTCOMPILE)

  1985. tui-source.o: $(srcdir)/tui/tui-source.c
  1986.         $(COMPILE) $(srcdir)/tui/tui-source.c
  1987.         $(POSTCOMPILE)

  1988. tui-stack.o: $(srcdir)/tui/tui-stack.c
  1989.         $(COMPILE) $(srcdir)/tui/tui-stack.c
  1990.         $(POSTCOMPILE)

  1991. tui-win.o: $(srcdir)/tui/tui-win.c
  1992.         $(COMPILE) $(srcdir)/tui/tui-win.c
  1993.         $(POSTCOMPILE)

  1994. tui-windata.o: $(srcdir)/tui/tui-windata.c
  1995.         $(COMPILE) $(srcdir)/tui/tui-windata.c
  1996.         $(POSTCOMPILE)

  1997. tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c
  1998.         $(COMPILE) $(srcdir)/tui/tui-wingeneral.c
  1999.         $(POSTCOMPILE)

  2000. tui-winsource.o: $(srcdir)/tui/tui-winsource.c
  2001.         $(COMPILE) $(srcdir)/tui/tui-winsource.c
  2002.         $(POSTCOMPILE)

  2003. # gdb/guile dependencies
  2004. #
  2005. # Need to explicitly specify the compile rule as make will do nothing
  2006. # or try to compile the object file into the sub-directory.

  2007. guile.o: $(srcdir)/guile/guile.c
  2008.         $(COMPILE) $(srcdir)/guile/guile.c
  2009.         $(POSTCOMPILE)

  2010. scm-arch.o: $(srcdir)/guile/scm-arch.c
  2011.         $(COMPILE) $(srcdir)/guile/scm-arch.c
  2012.         $(POSTCOMPILE)

  2013. scm-auto-load.o: $(srcdir)/guile/scm-auto-load.c
  2014.         $(COMPILE) $(srcdir)/guile/scm-auto-load.c
  2015.         $(POSTCOMPILE)

  2016. scm-block.o: $(srcdir)/guile/scm-block.c
  2017.         $(COMPILE) $(srcdir)/guile/scm-block.c
  2018.         $(POSTCOMPILE)

  2019. scm-breakpoint.o: $(srcdir)/guile/scm-breakpoint.c
  2020.         $(COMPILE) $(srcdir)/guile/scm-breakpoint.c
  2021.         $(POSTCOMPILE)

  2022. scm-cmd.o: $(srcdir)/guile/scm-cmd.c
  2023.         $(COMPILE) $(srcdir)/guile/scm-cmd.c
  2024.         $(POSTCOMPILE)

  2025. scm-disasm.o: $(srcdir)/guile/scm-disasm.c
  2026.         $(COMPILE) $(srcdir)/guile/scm-disasm.c
  2027.         $(POSTCOMPILE)

  2028. scm-exception.o: $(srcdir)/guile/scm-exception.c
  2029.         $(COMPILE) $(srcdir)/guile/scm-exception.c
  2030.         $(POSTCOMPILE)

  2031. scm-frame.o: $(srcdir)/guile/scm-frame.c
  2032.         $(COMPILE) $(srcdir)/guile/scm-frame.c
  2033.         $(POSTCOMPILE)

  2034. scm-gsmob.o: $(srcdir)/guile/scm-gsmob.c
  2035.         $(COMPILE) $(srcdir)/guile/scm-gsmob.c
  2036.         $(POSTCOMPILE)

  2037. scm-iterator.o: $(srcdir)/guile/scm-iterator.c
  2038.         $(COMPILE) $(srcdir)/guile/scm-iterator.c
  2039.         $(POSTCOMPILE)

  2040. scm-lazy-string.o: $(srcdir)/guile/scm-lazy-string.c
  2041.         $(COMPILE) $(srcdir)/guile/scm-lazy-string.c
  2042.         $(POSTCOMPILE)

  2043. scm-math.o: $(srcdir)/guile/scm-math.c
  2044.         $(COMPILE) $(srcdir)/guile/scm-math.c
  2045.         $(POSTCOMPILE)

  2046. scm-objfile.o: $(srcdir)/guile/scm-objfile.c
  2047.         $(COMPILE) $(srcdir)/guile/scm-objfile.c
  2048.         $(POSTCOMPILE)

  2049. scm-param.o: $(srcdir)/guile/scm-param.c
  2050.         $(COMPILE) $(srcdir)/guile/scm-param.c
  2051.         $(POSTCOMPILE)

  2052. scm-ports.o: $(srcdir)/guile/scm-ports.c
  2053.         $(COMPILE) $(srcdir)/guile/scm-ports.c
  2054.         $(POSTCOMPILE)

  2055. scm-pretty-print.o: $(srcdir)/guile/scm-pretty-print.c
  2056.         $(COMPILE) $(srcdir)/guile/scm-pretty-print.c
  2057.         $(POSTCOMPILE)

  2058. scm-progspace.o: $(srcdir)/guile/scm-progspace.c
  2059.         $(COMPILE) $(srcdir)/guile/scm-progspace.c
  2060.         $(POSTCOMPILE)

  2061. scm-safe-call.o: $(srcdir)/guile/scm-safe-call.c
  2062.         $(COMPILE) $(srcdir)/guile/scm-safe-call.c
  2063.         $(POSTCOMPILE)

  2064. scm-string.o: $(srcdir)/guile/scm-string.c
  2065.         $(COMPILE) $(srcdir)/guile/scm-string.c
  2066.         $(POSTCOMPILE)

  2067. scm-symbol.o: $(srcdir)/guile/scm-symbol.c
  2068.         $(COMPILE) $(srcdir)/guile/scm-symbol.c
  2069.         $(POSTCOMPILE)

  2070. scm-symtab.o: $(srcdir)/guile/scm-symtab.c
  2071.         $(COMPILE) $(srcdir)/guile/scm-symtab.c
  2072.         $(POSTCOMPILE)

  2073. scm-type.o: $(srcdir)/guile/scm-type.c
  2074.         $(COMPILE) $(srcdir)/guile/scm-type.c
  2075.         $(POSTCOMPILE)

  2076. scm-utils.o: $(srcdir)/guile/scm-utils.c
  2077.         $(COMPILE) $(srcdir)/guile/scm-utils.c
  2078.         $(POSTCOMPILE)

  2079. scm-value.o: $(srcdir)/guile/scm-value.c
  2080.         $(COMPILE) $(srcdir)/guile/scm-value.c
  2081.         $(POSTCOMPILE)

  2082. # gdb/python/ dependencies
  2083. #
  2084. # Need to explicitly specify the compile rule as make will do nothing
  2085. # or try to compile the object file into the sub-directory.

  2086. # Flags needed to compile Python code
  2087. PYTHON_CFLAGS= -fno-strict-aliasing -DNDEBUG -fwrapv

  2088. python.o: $(srcdir)/python/python.c
  2089.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python.c
  2090.         $(POSTCOMPILE)

  2091. py-arch.o: $(srcdir)/python/py-arch.c
  2092.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-arch.c
  2093.         $(POSTCOMPILE)

  2094. py-auto-load.o: $(srcdir)/python/py-auto-load.c
  2095.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-auto-load.c
  2096.         $(POSTCOMPILE)

  2097. py-block.o: $(srcdir)/python/py-block.c
  2098.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-block.c
  2099.         $(POSTCOMPILE)

  2100. py-bpevent.o: $(srcdir)/python/py-bpevent.c
  2101.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-bpevent.c
  2102.         $(POSTCOMPILE)

  2103. py-breakpoint.o: $(srcdir)/python/py-breakpoint.c
  2104.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-breakpoint.c
  2105.         $(POSTCOMPILE)

  2106. py-cmd.o: $(srcdir)/python/py-cmd.c
  2107.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-cmd.c
  2108.         $(POSTCOMPILE)

  2109. py-continueevent.o: $(srcdir)/python/py-continueevent.c
  2110.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-continueevent.c
  2111.         $(POSTCOMPILE)

  2112. py-xmethods.o: $(srcdir)/python/py-xmethods.c
  2113.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-xmethods.c
  2114.         $(POSTCOMPILE)

  2115. py-event.o: $(srcdir)/python/py-event.c
  2116.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-event.c
  2117.         $(POSTCOMPILE)

  2118. py-evtregistry.o: $(srcdir)/python/py-evtregistry.c
  2119.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-evtregistry.c
  2120.         $(POSTCOMPILE)

  2121. py-evts.o: $(srcdir)/python/py-evts.c
  2122.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-evts.c
  2123.         $(POSTCOMPILE)

  2124. py-exitedevent.o: $(srcdir)/python/py-exitedevent.c
  2125.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-exitedevent.c
  2126.         $(POSTCOMPILE)

  2127. py-finishbreakpoint.o: $(srcdir)/python/py-finishbreakpoint.c
  2128.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-finishbreakpoint.c
  2129.         $(POSTCOMPILE)

  2130. py-frame.o: $(srcdir)/python/py-frame.c
  2131.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-frame.c
  2132.         $(POSTCOMPILE)

  2133. py-framefilter.o: $(srcdir)/python/py-framefilter.c
  2134.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-framefilter.c
  2135.         $(POSTCOMPILE)

  2136. py-function.o: $(srcdir)/python/py-function.c
  2137.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-function.c
  2138.         $(POSTCOMPILE)

  2139. py-gdb-readline.o: $(srcdir)/python/py-gdb-readline.c
  2140.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-gdb-readline.c
  2141.         $(POSTCOMPILE)

  2142. py-inferior.o: $(srcdir)/python/py-inferior.c
  2143.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-inferior.c
  2144.         $(POSTCOMPILE)

  2145. py-infthread.o: $(srcdir)/python/py-infthread.c
  2146.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-infthread.c
  2147.         $(POSTCOMPILE)

  2148. py-lazy-string.o: $(srcdir)/python/py-lazy-string.c
  2149.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-lazy-string.c
  2150.         $(POSTCOMPILE)

  2151. py-linetable.o: $(srcdir)/python/py-linetable.c
  2152.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-linetable.c
  2153.         $(POSTCOMPILE)

  2154. py-newobjfileevent.o: $(srcdir)/python/py-newobjfileevent.c
  2155.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-newobjfileevent.c
  2156.         $(POSTCOMPILE)

  2157. py-objfile.o: $(srcdir)/python/py-objfile.c
  2158.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-objfile.c
  2159.         $(POSTCOMPILE)

  2160. py-param.o: $(srcdir)/python/py-param.c
  2161.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-param.c
  2162.         $(POSTCOMPILE)

  2163. py-prettyprint.o: $(srcdir)/python/py-prettyprint.c
  2164.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-prettyprint.c
  2165.         $(POSTCOMPILE)

  2166. py-progspace.o: $(srcdir)/python/py-progspace.c
  2167.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-progspace.c
  2168.         $(POSTCOMPILE)

  2169. py-signalevent.o: $(srcdir)/python/py-signalevent.c
  2170.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-signalevent.c
  2171.         $(POSTCOMPILE)

  2172. py-stopevent.o: $(srcdir)/python/py-stopevent.c
  2173.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-stopevent.c
  2174.         $(POSTCOMPILE)

  2175. py-symbol.o: $(srcdir)/python/py-symbol.c
  2176.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-symbol.c
  2177.         $(POSTCOMPILE)

  2178. py-symtab.o: $(srcdir)/python/py-symtab.c
  2179.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-symtab.c
  2180.         $(POSTCOMPILE)

  2181. py-threadevent.o: $(srcdir)/python/py-threadevent.c
  2182.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-threadevent.c
  2183.         $(POSTCOMPILE)

  2184. py-type.o: $(srcdir)/python/py-type.c
  2185.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-type.c
  2186.         $(POSTCOMPILE)

  2187. py-utils.o: $(srcdir)/python/py-utils.c
  2188.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-utils.c
  2189.         $(POSTCOMPILE)

  2190. py-value.o: $(srcdir)/python/py-value.c
  2191.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-value.c
  2192.         $(POSTCOMPILE)

  2193. py-varobj.o: $(srcdir)/python/py-varobj.c
  2194.         $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-varobj.c
  2195.         $(POSTCOMPILE)

  2196. #
  2197. # Dependency tracking.  Most of this is conditional on GNU Make being
  2198. # found by configure; if GNU Make is not found, we fall back to a
  2199. # simpler scheme.
  2200. #

  2201. ifeq ($(DEPMODE),depmode=gcc3)
  2202. # Note that we put the dependencies into a .Tpo file, then move them
  2203. # into place if the compile succeeds.  We need this because gcc does
  2204. # not atomically write the dependency output file.
  2205. override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
  2206.         -MF $(DEPDIR)/$(basename $(@F)).Tpo
  2207. override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
  2208.         $(DEPDIR)/$(basename $(@F)).Po
  2209. else
  2210. override COMPILE.pre = source='$<' object='$@' libtool=no \
  2211.         DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
  2212. # depcomp handles atomicity for us, so we don't need a postcompile
  2213. # step.
  2214. override POSTCOMPILE =
  2215. endif

  2216. # A list of all the objects we might care about in this build, for
  2217. # dependency tracking.
  2218. all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \
  2219.         test-cp-name-parser.o

  2220. # Ensure that generated files are created early.  Use order-only
  2221. # dependencies if available.  They require GNU make 3.80 or newer,
  2222. # and the .VARIABLES variable was introduced at the same time.
  2223. ifdef .VARIABLES
  2224. $(all_object_files): | $(generated_files)
  2225. else
  2226. $(all_object_files) : $(generated_files)
  2227. endif

  2228. # Dependencies.
  2229. -include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))

  2230. ### end of the gdb Makefile.in.