Move unittests object files to unittests subdirectory
[external/binutils.git] / gdb / Makefile.in
1 # Copyright (C) 1989-2017 Free Software Foundation, Inc.
2
3 # This file is part of GDB.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 # Please keep lists in this file sorted alphabetically, with one item per line.
19 # Here are the general guidelines for ordering files and directories:
20 #
21 #   - Files come before directories.
22 #   - The extensions are not taken into account when comparing filenames, except
23 #     if the filenames are otherwise equal.
24 #   - A filename that is a prefix of another one comes before.
25 #   - Underscores and dashes are treated equally, and come before alphanumeric
26 #     characters.
27 #
28 # For example:
29 #
30 # SOME_FILES = \
31 #       foo.c \
32 #       foo.h \
33 #       foo-bar.c \
34 #       foobar.c \
35 #       foo/bar.c
36
37 prefix = @prefix@
38 exec_prefix = @exec_prefix@
39
40 host_alias = @host_alias@
41 target_alias = @target_alias@
42 program_transform_name = @program_transform_name@
43 bindir = @bindir@
44 libdir = @libdir@
45 tooldir = $(libdir)/$(target_alias)
46
47 datadir = @datadir@
48 localedir = @localedir@
49 mandir = @mandir@
50 man1dir = $(mandir)/man1
51 man2dir = $(mandir)/man2
52 man3dir = $(mandir)/man3
53 man4dir = $(mandir)/man4
54 man5dir = $(mandir)/man5
55 man6dir = $(mandir)/man6
56 man7dir = $(mandir)/man7
57 man8dir = $(mandir)/man8
58 man9dir = $(mandir)/man9
59 infodir = @infodir@
60 datarootdir = @datarootdir@
61 docdir = @docdir@
62 htmldir = @htmldir@
63 pdfdir = @pdfdir@
64 includedir = @includedir@
65
66 install_sh = @install_sh@
67
68 # This can be referenced by `LIBINTL' as computed by
69 # ZW_GNU_GETTEXT_SISTER_DIR.
70 top_builddir = .
71
72 SHELL = @SHELL@
73 EXEEXT = @EXEEXT@
74
75 AWK = @AWK@
76 LN_S = @LN_S@
77
78 INSTALL = @INSTALL@
79 INSTALL_PROGRAM = @INSTALL_PROGRAM@
80 INSTALL_SCRIPT = @INSTALL_SCRIPT@
81 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
82 INSTALL_DATA = @INSTALL_DATA@
83
84 DESTDIR =
85
86 AR = @AR@
87 AR_FLAGS = qv
88 RANLIB = @RANLIB@
89 DLLTOOL = @DLLTOOL@
90 WINDRES = @WINDRES@
91 MIG = @MIG@
92 STRIP = @STRIP@
93
94 XGETTEXT = @XGETTEXT@
95 GMSGFMT = @GMSGFMT@
96 MSGMERGE = msgmerge
97
98 PACKAGE = @PACKAGE@
99 CATALOGS = @CATALOGS@
100
101 # If you are compiling with GCC, make sure that either 1) You have the
102 # fixed include files where GCC can reach them, or 2) You use the
103 # -traditional flag.  Otherwise the ioctl calls in inflow.c
104 # will be incorrectly compiled.  The "fixincludes" script in the gcc
105 # distribution will fix your include files up.
106 CC = @CC@
107 CXX = @CXX@
108 CXX_DIALECT = @CXX_DIALECT@
109
110 # Dependency tracking information.
111 DEPMODE = @CCDEPMODE@
112 DEPDIR = @DEPDIR@
113 depcomp = $(SHELL) $(srcdir)/../depcomp
114
115 # Note that these are overridden by GNU make-specific code below if
116 # GNU make is used.  The overrides implement dependency tracking.
117 COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
118 COMPILE.post = -c -o $@
119 COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
120 POSTCOMPILE = @true
121
122 # Directory containing source files.
123 srcdir = @srcdir@
124 VPATH = @srcdir@
125 top_srcdir = @top_srcdir@
126
127 YACC = @YACC@
128
129 # This is used to rebuild ada-lex.c from ada-lex.l.  If the program is
130 # not defined, but ada-lex.c is present, compilation will continue,
131 # possibly with a warning.
132 FLEX = flex
133
134 YLWRAP = $(srcdir)/../ylwrap
135
136 # where to find makeinfo, preferably one designed for texinfo-2
137 MAKEINFO = @MAKEINFO@
138 MAKEINFOFLAGS = @MAKEINFOFLAGS@
139 MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
140 MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
141
142 MAKEHTML = $(MAKEINFO_CMD) --html
143 MAKEHTMLFLAGS =
144
145 # Set this up with gcc if you have gnu ld and the loader will print out
146 # line numbers for undefined references.
147 #CC_LD = g++ -static
148 CC_LD = $(CXX) $(CXX_DIALECT)
149
150 # Where is our "include" directory?  Typically $(srcdir)/../include.
151 # This is essentially the header file directory for the library
152 # routines in libiberty.
153 INCLUDE_DIR = $(srcdir)/../include
154 INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
155
156 # Where is the "-liberty" library?  Typically in ../libiberty.
157 LIBIBERTY = ../libiberty/libiberty.a
158
159 # Where is the BFD library?  Typically in ../bfd.
160 BFD_DIR = ../bfd
161 BFD = $(BFD_DIR)/libbfd.a
162 BFD_SRC = $(srcdir)/$(BFD_DIR)
163 BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
164
165 # This is where we get zlib from.  zlibdir is -L../zlib and zlibinc is
166 # -I../zlib, unless we were configured with --with-system-zlib, in which
167 # case both are empty.
168 ZLIB = @zlibdir@ -lz
169 ZLIBINC = @zlibinc@
170
171 # Where is the decnumber library?  Typically in ../libdecnumber.
172 LIBDECNUMBER_DIR = ../libdecnumber
173 LIBDECNUMBER = $(LIBDECNUMBER_DIR)/libdecnumber.a
174 LIBDECNUMBER_SRC = $(srcdir)/$(LIBDECNUMBER_DIR)
175 LIBDECNUMBER_CFLAGS = -I$(LIBDECNUMBER_DIR) -I$(LIBDECNUMBER_SRC)
176
177 # Where is the READLINE library?  Typically in ../readline.
178 READLINE_DIR = ../readline
179 READLINE_SRC = $(srcdir)/$(READLINE_DIR)
180 READLINE = @READLINE@
181 READLINE_DEPS = @READLINE_DEPS@
182 READLINE_CFLAGS = @READLINE_CFLAGS@
183
184 # Where is expat?  This will be empty if expat was not available.
185 LIBEXPAT = @LIBEXPAT@
186
187 # Where is lzma?  This will be empty if lzma was not available.
188 LIBLZMA = @LIBLZMA@
189
190 # Where is libbabeltrace? This will be empty if lbabeltrace was not
191 # available.
192 LIBBABELTRACE = @LIBBABELTRACE@
193
194 # Where is libipt?  This will be empty if libipt was not available.
195 LIBIPT = @LIBIPT@
196
197 # Where is libmpfr?  This will be empty if libmpfr was not available.
198 LIBMPFR = @LIBMPFR@
199
200 WARN_CFLAGS = @WARN_CFLAGS@
201 WERROR_CFLAGS = @WERROR_CFLAGS@
202 GDB_WARN_CFLAGS = $(WARN_CFLAGS)
203 GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
204
205 GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \
206                    | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
207 GDB_WARN_CFLAGS_NO_DEFS = `echo " $(GDB_WARN_CFLAGS) " \
208                    | sed "s/ -Wold-style-definition / -Wno-old-style-definition /g"`
209
210 RDYNAMIC = @RDYNAMIC@
211
212 # Where is the INTL library?  Typically in ../intl.
213 INTL = @LIBINTL@
214 INTL_DEPS = @LIBINTL_DEP@
215 INTL_CFLAGS = @INCINTL@
216
217 # Where is the ICONV library?  This will be empty if in libc or not available.
218 LIBICONV = @LIBICONV@
219
220 # Did the user give us a --with-gdb-datadir option?
221 GDB_DATADIR = @GDB_DATADIR@
222
223 # Flags to pass to gdb when invoked with "make run".
224 GDBFLAGS =
225
226 # Helper code from gnulib.
227 GNULIB_BUILDDIR = build-gnulib
228 LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
229 INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import
230
231 # Generated headers in the gnulib directory.  These must be listed
232 # so that they are generated before other files are compiled.
233 GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
234
235 #
236 # CLI sub directory definitons
237 #
238 SUBDIR_CLI_SRCS = \
239         cli/cli-cmds.c \
240         cli/cli-decode.c \
241         cli/cli-dump.c \
242         cli/cli-interp.c \
243         cli/cli-logging.c \
244         cli/cli-script.c \
245         cli/cli-setshow.c \
246         cli/cli-utils.c
247
248 SUBDIR_CLI_OBS = $(patsubst %.c,%.o,$(SUBDIR_CLI_SRCS))
249
250 SUBDIR_CLI_DEPS =
251 SUBDIR_CLI_LDFLAGS =
252 SUBDIR_CLI_CFLAGS =
253
254 #
255 # MI sub directory definitons
256 #
257 SUBDIR_MI_SRCS = \
258         mi/mi-cmd-break.c \
259         mi/mi-cmd-catch.c \
260         mi/mi-cmd-disas.c \
261         mi/mi-cmd-env.c \
262         mi/mi-cmd-file.c \
263         mi/mi-cmd-info.c \
264         mi/mi-cmd-stack.c \
265         mi/mi-cmd-target.c \
266         mi/mi-cmd-var.c \
267         mi/mi-cmds.c \
268         mi/mi-console.c \
269         mi/mi-getopt.c \
270         mi/mi-interp.c \
271         mi/mi-main.c \
272         mi/mi-out.c \
273         mi/mi-parse.c \
274         mi/mi-symbol-cmds.c
275
276 SUBDIR_MI_OBS = $(patsubst %.c,%.o,$(SUBDIR_MI_SRCS))
277
278 SUBDIR_MI_DEPS =
279 SUBDIR_MI_LDFLAGS =
280 SUBDIR_MI_CFLAGS =
281
282 #
283 # TUI sub directory definitions
284 #
285 SUBDIR_TUI_SRCS = \
286         tui/tui.c \
287         tui/tui-command.c \
288         tui/tui-data.c \
289         tui/tui-disasm.c \
290         tui/tui-file.c \
291         tui/tui-hooks.c \
292         tui/tui-interp.c \
293         tui/tui-io.c \
294         tui/tui-layout.c \
295         tui/tui-out.c \
296         tui/tui-regs.c \
297         tui/tui-source.c \
298         tui/tui-stack.c \
299         tui/tui-win.c \
300         tui/tui-windata.c \
301         tui/tui-wingeneral.c \
302         tui/tui-winsource.c
303
304 SUBDIR_TUI_OBS = $(patsubst %.c,%.o,$(SUBDIR_TUI_SRCS))
305
306 SUBDIR_TUI_DEPS =
307 SUBDIR_TUI_LDFLAGS =
308 SUBDIR_TUI_CFLAGS = -DTUI=1
309
310 #
311 # GCC Compile support sub-directory definitions
312 #
313 SUBDIR_GCC_COMPILE_SRCS = \
314         compile/compile.c \
315         compile/compile-c-support.c \
316         compile/compile-c-symbols.c \
317         compile/compile-c-types.c \
318         compile/compile-loc2c.c \
319         compile/compile-object-load.c \
320         compile/compile-object-load.h \
321         compile/compile-object-run.c \
322         compile/compile-object-run.h
323
324 SUBDIR_GCC_COMPILE_OBS = $(patsubst %.c,%.o,$(filter %.c,$(SUBDIR_GCC_COMPILE_SRCS)))
325
326 #
327 # Guile sub directory definitons for guile support.
328 #
329 SUBDIR_GUILE_OBS = \
330         guile.o \
331         scm-arch.o \
332         scm-auto-load.o \
333         scm-block.o \
334         scm-breakpoint.o \
335         scm-cmd.o \
336         scm-disasm.o \
337         scm-exception.o \
338         scm-frame.o \
339         scm-gsmob.o \
340         scm-iterator.o \
341         scm-lazy-string.o \
342         scm-math.o \
343         scm-objfile.o \
344         scm-param.o \
345         scm-ports.o \
346         scm-pretty-print.o \
347         scm-progspace.o \
348         scm-safe-call.o \
349         scm-string.o \
350         scm-symbol.o \
351         scm-symtab.o \
352         scm-type.o \
353         scm-utils.o \
354         scm-value.o
355
356 SUBDIR_GUILE_SRCS = \
357         guile/guile.c \
358         guile/scm-arch.c \
359         guile/scm-auto-load.c \
360         guile/scm-block.c \
361         guile/scm-breakpoint.c \
362         guile/scm-cmd.c \
363         guile/scm-disasm.c \
364         guile/scm-exception.c \
365         guile/scm-frame.c \
366         guile/scm-gsmob.c \
367         guile/scm-iterator.c \
368         guile/scm-lazy-string.c \
369         guile/scm-math.c \
370         guile/scm-objfile.c \
371         guile/scm-param.c \
372         guile/scm-ports.c \
373         guile/scm-pretty-print.c \
374         guile/scm-progspace.c \
375         guile/scm-safe-call.c \
376         guile/scm-string.c \
377         guile/scm-symbol.c \
378         guile/scm-symtab.c \
379         guile/scm-type.c \
380         guile/scm-utils.c \
381         guile/scm-value.c
382
383 SUBDIR_GUILE_DEPS =
384 SUBDIR_GUILE_LDFLAGS =
385 SUBDIR_GUILE_CFLAGS =
386
387 #
388 # python sub directory definitons
389 #
390 SUBDIR_PYTHON_OBS = \
391         py-arch.o \
392         py-auto-load.o \
393         py-block.o \
394         py-bpevent.o \
395         py-breakpoint.o \
396         py-cmd.o \
397         py-continueevent.o \
398         py-event.o \
399         py-evtregistry.o \
400         py-evts.o \
401         py-exitedevent.o \
402         py-finishbreakpoint.o \
403         py-frame.o \
404         py-framefilter.o \
405         py-function.o \
406         py-gdb-readline.o \
407         py-inferior.o \
408         py-infevents.o \
409         py-infthread.o \
410         py-instruction.o \
411         py-lazy-string.o \
412         py-linetable.o \
413         py-newobjfileevent.o \
414         py-objfile.o \
415         py-param.o \
416         py-prettyprint.o \
417         py-progspace.o \
418         py-record.o \
419         py-record-btrace.o \
420         py-record-full.o \
421         py-signalevent.o \
422         py-stopevent.o \
423         py-symbol.o \
424         py-symtab.o \
425         py-threadevent.o \
426         py-type.o \
427         py-unwind.o \
428         py-utils.o \
429         py-value.o \
430         py-varobj.o \
431         py-xmethods.o \
432         python.o
433
434 SUBDIR_PYTHON_SRCS = \
435         python/py-arch.c \
436         python/py-auto-load.c \
437         python/py-block.c \
438         python/py-bpevent.c \
439         python/py-breakpoint.c \
440         python/py-cmd.c \
441         python/py-continueevent.c \
442         python/py-event.c \
443         python/py-evtregistry.c \
444         python/py-evts.c \
445         python/py-exitedevent.c \
446         python/py-finishbreakpoint.c \
447         python/py-frame.c \
448         python/py-framefilter.c \
449         python/py-function.c \
450         python/py-gdb-readline.c \
451         python/py-inferior.c \
452         python/py-infevents.c \
453         python/py-infthread.c \
454         python/py-instruction.c \
455         python/py-lazy-string.c \
456         python/py-linetable.c \
457         python/py-newobjfileevent.c \
458         python/py-objfile.c \
459         python/py-param.c \
460         python/py-prettyprint.c \
461         python/py-progspace.c \
462         python/py-record.c \
463         python/py-record-btrace.c \
464         python/py-record-full.c \
465         python/py-signalevent.c \
466         python/py-stopevent.c \
467         python/py-symbol.c \
468         python/py-symtab.c \
469         python/py-threadevent.c \
470         python/py-type.c \
471         python/py-unwind.c \
472         python/py-utils.c \
473         python/py-value.c \
474         python/py-varobj.c \
475         python/py-xmethods.c \
476         python/python.c
477
478 SUBDIR_PYTHON_DEPS =
479 SUBDIR_PYTHON_LDFLAGS =
480 SUBDIR_PYTHON_CFLAGS =
481
482 SUBDIR_UNITTESTS_SRCS = \
483         unittests/array-view-selftests.c \
484         unittests/common-utils-selftests.c \
485         unittests/environ-selftests.c \
486         unittests/function-view-selftests.c \
487         unittests/lookup_name_info-selftests.c \
488         unittests/memory-map-selftests.c \
489         unittests/memrange-selftests.c \
490         unittests/offset-type-selftests.c \
491         unittests/optional-selftests.c \
492         unittests/ptid-selftests.c \
493         unittests/rsp-low-selftests.c \
494         unittests/scoped_restore-selftests.c \
495         unittests/xml-utils-selftests.c
496
497 SUBDIR_UNITTESTS_OBS = $(patsubst %.c,%.o,$(SUBDIR_UNITTESTS_SRCS))
498
499 # Opcodes currently live in one of two places.  Either they are in the
500 # opcode library, typically ../opcodes, or they are in a header file
501 # in INCLUDE_DIR.
502 # Where is the "-lopcodes" library, with (some of) the opcode tables and
503 # disassemblers?
504 OPCODES_DIR = ../opcodes
505 OPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
506 OPCODES = $(OPCODES_DIR)/libopcodes.a
507 # Where are the other opcode tables which only have header file
508 # versions?
509 OP_INCLUDE = $(INCLUDE_DIR)/opcode
510 # Some source files like to use #include "opcodes/file.h"
511 OPCODES_CFLAGS = -I$(OP_INCLUDE) -I$(OPCODES_SRC)/..
512
513 # The simulator is usually nonexistent; targets that include one
514 # should set this to list all the .o or .a files to be linked in.
515 SIM = @SIM@
516
517 WIN32LIBS = @WIN32LIBS@
518
519 # Tcl et al cflags and libraries
520 TCL = @TCL_LIBRARY@
521 TCL_CFLAGS = @TCL_INCLUDE@
522 GDBTKLIBS = @GDBTKLIBS@
523 # Extra flags that the GDBTK files need:
524 GDBTK_CFLAGS = @GDBTK_CFLAGS@
525
526 TK = @TK_LIBRARY@
527 TK_CFLAGS = @TK_INCLUDE@
528
529 X11_CFLAGS = @TK_XINCLUDES@
530 X11_LDFLAGS =
531 X11_LIBS =
532
533 WIN32LDAPP = @WIN32LDAPP@
534
535 LIBGUI = @LIBGUI@
536 GUI_CFLAGS_X = @GUI_CFLAGS_X@
537 IDE_CFLAGS = $(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
538
539 ALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS)
540
541 # The version of gdbtk we're building. This should be kept
542 # in sync with GDBTK_VERSION and friends in gdbtk.h.
543 GDBTK_VERSION = 1.0
544 GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION)
545
546 # Gdbtk requires an absolute path to the source directory or
547 # the testsuite won't run properly.
548 GDBTK_SRC_DIR = @GDBTK_SRC_DIR@
549
550 SUBDIR_GDBTK_OBS = \
551         gdbtk.o \
552         gdbtk-bp.o \
553         gdbtk-cmds.o \
554         gdbtk-hooks.o \
555         gdbtk-interp.o \
556         gdbtk-register.o \
557         gdbtk-stack.o \
558         gdbtk-varobj.o \
559         gdbtk-wrapper.o
560
561 SUBDIR_GDBTK_SRCS = \
562         gdbtk/generic/gdbtk.c \
563         gdbtk/generic/gdbtk-bp.c \
564         gdbtk/generic/gdbtk-cmds.c \
565         gdbtk/generic/gdbtk-hooks.c \
566         gdbtk/generic/gdbtk-interp.c \
567         gdbtk/generic/gdbtk-main.c \
568         gdbtk/generic/gdbtk-register.c \
569         gdbtk/generic/gdbtk-stack.c \
570         gdbtk/generic/gdbtk-varobj.c \
571         gdbtk/generic/gdbtk-wrapper.c
572
573 SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
574 SUBDIR_GDBTK_LDFLAGS =
575 SUBDIR_GDBTK_CFLAGS = -DGDBTK
576
577 CONFIG_OBS = @CONFIG_OBS@
578 CONFIG_SRCS = @CONFIG_SRCS@
579 CONFIG_DEPS = @CONFIG_DEPS@
580 CONFIG_LDFLAGS = @CONFIG_LDFLAGS@
581 ENABLE_CFLAGS = @ENABLE_CFLAGS@
582 CONFIG_ALL = @CONFIG_ALL@
583 CONFIG_CLEAN = @CONFIG_CLEAN@
584 CONFIG_INSTALL = @CONFIG_INSTALL@
585 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
586 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
587
588 CONFIG_SRC_SUBDIR = arch cli mi compile tui unittests
589 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
590
591 # -I. for config files.
592 # -I$(srcdir) for gdb internal headers.
593 # -I$(srcdir)/config for more generic config files.
594
595 # It is also possible that you will need to add -I/usr/include/sys if
596 # your system doesn't have fcntl.h in /usr/include (which is where it
597 # should be according to Posix).
598 DEFS = @DEFS@
599 GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/common -I$(srcdir)/config \
600         -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
601
602 # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
603 GLOBAL_CFLAGS = $(MH_CFLAGS)
604
605 PROFILE_CFLAGS = @PROFILE_CFLAGS@
606
607 # These are specifically reserved for setting from the command line
608 # when running make.  I.E.: "make CFLAGS=-Wmissing-prototypes".
609 CFLAGS = @CFLAGS@
610 CXXFLAGS = @CXXFLAGS@
611
612 # Set by configure, for e.g. expat.  Python installations are such that
613 # C headers are included using their basename (for example, we #include
614 # <Python.h> rather than, say, <python/Python.h>).  Since the file names
615 # are sometimes a little generic, we think that the risk of collision
616 # with other header files is high.  If that happens, we try to mitigate
617 # a bit the consequences by putting the Python includes last in the list.
618 INTERNAL_CPPFLAGS = @CPPFLAGS@ @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
619
620 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
621 INTERNAL_CFLAGS_BASE = \
622         $(CXXFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
623         $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
624         $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
625         $(INTL_CFLAGS) $(INCGNU) $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS)
626 INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
627 INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
628
629 # LDFLAGS is specifically reserved for setting from the command line
630 # when running make.
631 LDFLAGS = @LDFLAGS@
632
633 # Profiling options need to go here to work.
634 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
635 # and have it work; that's why CFLAGS is here.
636 # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
637 INTERNAL_LDFLAGS = \
638         $(CXXFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \
639         $(LDFLAGS) $(CONFIG_LDFLAGS)
640
641 # If your system is missing alloca(), or, more likely, it's there but
642 # it doesn't work, then refer to libiberty.
643
644 # Libraries and corresponding dependencies for compiling gdb.
645 # XM_CLIBS, defined in *config files, have host-dependent libs.
646 # LIBIBERTY appears twice on purpose.
647 CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(ZLIB) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
648         $(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) \
649         @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
650         $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
651         $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV) $(LIBMPFR)
652 CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
653         $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
654
655 ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
656 ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
657
658 DIST = gdb
659
660 LINT = /usr/5bin/lint
661 LINTFLAGS = $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
662         $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
663         $(INTL_CFLAGS)
664
665 RUNTEST = runtest
666 RUNTESTFLAGS =
667
668 # XML files to build in to GDB.
669 XMLFILES = \
670         $(srcdir)/features/btrace.dtd \
671         $(srcdir)/features/btrace-conf.dtd \
672         $(srcdir)/features/gdb-target.dtd \
673         $(srcdir)/features/library-list.dtd \
674         $(srcdir)/features/library-list-aix.dtd \
675         $(srcdir)/features/library-list-svr4.dtd \
676         $(srcdir)/features/osdata.dtd \
677         $(srcdir)/features/threads.dtd \
678         $(srcdir)/features/traceframe-info.dtd \
679         $(srcdir)/features/xinclude.dtd
680
681 # Build the ser-*.o files the host supports.  This includes ser-unix.o
682 # for any system that supports a POSIX interface to the serial port.
683 # See configure.ac.
684 SER_HARDWIRE = @SER_HARDWIRE@
685
686 # The `remote' debugging target is supported for most architectures,
687 # but not all (e.g. 960)
688 REMOTE_OBS = \
689         ax-gdb.o \
690         ax-general.o \
691         ctf.o \
692         dcache.o \
693         remote.o \
694         remote-fileio.o \
695         remote-notif.o \
696         tracefile.o \
697         tracefile-tfile.o \
698         tracepoint.o
699
700 # This is remote-sim.o if a simulator is to be linked in.
701 SIM_OBS = @SIM_OBS@
702
703 # Target-dependent object files.
704 TARGET_OBS = @TARGET_OBS@
705
706 # All target-dependent objects files that require 64-bit CORE_ADDR
707 # (used with --enable-targets=all --enable-64-bit-bfd).
708 ALL_64_TARGET_OBS = \
709         aarch64-fbsd-tdep.o \
710         aarch64-linux-tdep.o \
711         aarch64-newlib-tdep.o \
712         aarch64-tdep.o \
713         alpha-bsd-tdep.o \
714         alpha-linux-tdep.o \
715         alpha-mdebug-tdep.o \
716         alpha-nbsd-tdep.o \
717         alpha-obsd-tdep.o \
718         alpha-tdep.o \
719         amd64-darwin-tdep.o \
720         amd64-dicos-tdep.o \
721         amd64-fbsd-tdep.o \
722         amd64-linux-tdep.o \
723         amd64-nbsd-tdep.o \
724         amd64-obsd-tdep.o \
725         amd64-sol2-tdep.o \
726         amd64-tdep.o \
727         amd64-windows-tdep.o \
728         arch/aarch64.o \
729         arch/aarch64-insn.o \
730         arch/amd64.o \
731         ia64-linux-tdep.o \
732         ia64-tdep.o \
733         ia64-vms-tdep.o \
734         mips64-obsd-tdep.o \
735         sparc64-fbsd-tdep.o \
736         sparc64-linux-tdep.o \
737         sparc64-nbsd-tdep.o \
738         sparc64-obsd-tdep.o \
739         sparc64-sol2-tdep.o \
740         sparc64-tdep.o
741
742 # All other target-dependent objects files (used with --enable-targets=all).
743 ALL_TARGET_OBS = \
744         arc-tdep.o \
745         arch/arm.o \
746         arch/arm-get-next-pcs.o \
747         arch/arm-linux.o \
748         arch/i386.o \
749         arm-bsd-tdep.o \
750         arm-fbsd-tdep.o \
751         arm-linux-tdep.o \
752         arm-nbsd-tdep.o \
753         arm-obsd-tdep.o \
754         arm-symbian-tdep.o \
755         arm-tdep.o \
756         arm-wince-tdep.o \
757         avr-tdep.o \
758         bfin-linux-tdep.o \
759         bfin-tdep.o \
760         bsd-uthread.o \
761         cris-linux-tdep.o \
762         cris-tdep.o \
763         dicos-tdep.o \
764         fbsd-tdep.o \
765         frv-linux-tdep.o \
766         frv-tdep.o \
767         ft32-tdep.o \
768         glibc-tdep.o \
769         h8300-tdep.o \
770         hppa-bsd-tdep.o \
771         hppa-linux-tdep.o \
772         hppa-nbsd-tdep.o \
773         hppa-obsd-tdep.o \
774         hppa-tdep.o \
775         i386-bsd-tdep.o \
776         i386-cygwin-tdep.o \
777         i386-darwin-tdep.o \
778         i386-dicos-tdep.o \
779         i386-fbsd-tdep.o \
780         i386-gnu-tdep.o \
781         i386-go32-tdep.o \
782         i386-linux-tdep.o \
783         i386-nbsd-tdep.o \
784         i386-nto-tdep.o \
785         i386-obsd-tdep.o \
786         i386-sol2-tdep.o \
787         i386-tdep.o \
788         i387-tdep.o \
789         iq2000-tdep.o \
790         linux-record.o \
791         linux-tdep.o \
792         lm32-tdep.o \
793         m32c-tdep.o \
794         m32r-linux-tdep.o \
795         m32r-tdep.o \
796         m68hc11-tdep.o \
797         m68k-bsd-tdep.o \
798         m68k-linux-tdep.o \
799         m68k-tdep.o \
800         m88k-tdep.o \
801         mep-tdep.o \
802         microblaze-linux-tdep.o \
803         microblaze-tdep.o \
804         mips-fbsd-tdep.o \
805         mips-linux-tdep.o \
806         mips-nbsd-tdep.o \
807         mips-sde-tdep.o \
808         mips-tdep.o \
809         mn10300-linux-tdep.o \
810         mn10300-tdep.o \
811         moxie-tdep.o \
812         msp430-tdep.o \
813         mt-tdep.o \
814         nbsd-tdep.o \
815         nds32-tdep.o \
816         nios2-linux-tdep.o \
817         nios2-tdep.o \
818         nto-tdep.o \
819         obsd-tdep.o \
820         ppc-fbsd-tdep.o \
821         ppc-linux-tdep.o \
822         ppc-nbsd-tdep.o \
823         ppc-obsd-tdep.o \
824         ppc-ravenscar-thread.o \
825         ppc-sysv-tdep.o \
826         ppc64-tdep.o \
827         ravenscar-thread.o \
828         rl78-tdep.o \
829         rs6000-aix-tdep.o \
830         rs6000-lynx178-tdep.o \
831         rs6000-tdep.o \
832         rx-tdep.o \
833         s390-linux-tdep.o \
834         score-tdep.o \
835         sh-linux-tdep.o \
836         sh-nbsd-tdep.o \
837         sh-tdep.o \
838         sh64-tdep.o \
839         sol2-tdep.o \
840         solib-aix.o \
841         solib-darwin.o \
842         solib-dsbt.o \
843         solib-frv.o \
844         solib-spu.o \
845         solib-svr4.o \
846         sparc-linux-tdep.o \
847         sparc-nbsd-tdep.o \
848         sparc-obsd-tdep.o \
849         sparc-ravenscar-thread.o \
850         sparc-sol2-tdep.o \
851         sparc-tdep.o \
852         spu-multiarch.o \
853         spu-tdep.o \
854         symfile-mem.o \
855         tic6x-linux-tdep.o \
856         tic6x-tdep.o \
857         tilegx-linux-tdep.o \
858         tilegx-tdep.o \
859         v850-tdep.o \
860         vax-nbsd-tdep.o \
861         vax-tdep.o \
862         windows-tdep.o \
863         xcoffread.o \
864         xstormy16-tdep.o \
865         xtensa-config.o \
866         xtensa-linux-tdep.o \
867         xtensa-tdep.o
868
869 # The following native-target dependent variables are defined on
870 # configure.nat.
871 NAT_FILE = @NAT_FILE@
872 NATDEPFILES = @NATDEPFILES@
873 NAT_CDEPS = @NAT_CDEPS@
874 LOADLIBES = @LOADLIBES@
875 MH_CFLAGS = @MH_CFLAGS@
876 XM_CLIBS = @XM_CLIBS@
877 NAT_GENERATED_FILES = @NAT_GENERATED_FILES@
878 HAVE_NATIVE_GCORE_HOST = @HAVE_NATIVE_GCORE_HOST@
879
880 # Native-target dependent makefile fragment comes in here.
881 @nat_makefile_frag@
882
883 # End of native-target dependent variables.
884
885 FLAGS_TO_PASS = \
886         "prefix=$(prefix)" \
887         "exec_prefix=$(exec_prefix)" \
888         "infodir=$(infodir)" \
889         "datarootdir=$(datarootdir)" \
890         "docdir=$(docdir)" \
891         "htmldir=$(htmldir)" \
892         "pdfdir=$(pdfdir)" \
893         "libdir=$(libdir)" \
894         "mandir=$(mandir)" \
895         "datadir=$(datadir)" \
896         "includedir=$(includedir)" \
897         "against=$(against)" \
898         "DESTDIR=$(DESTDIR)" \
899         "AR=$(AR)" \
900         "AR_FLAGS=$(AR_FLAGS)" \
901         "CC=$(CC)" \
902         "CFLAGS=$(CFLAGS)" \
903         "CXX=$(CXX)" \
904         "CXX_DIALECT=$(CXX_DIALECT)" \
905         "CXXFLAGS=$(CXXFLAGS)" \
906         "DLLTOOL=$(DLLTOOL)" \
907         "LDFLAGS=$(LDFLAGS)" \
908         "RANLIB=$(RANLIB)" \
909         "MAKEINFO=$(MAKEINFO)" \
910         "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
911         "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
912         "MAKEHTML=$(MAKEHTML)" \
913         "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
914         "INSTALL=$(INSTALL)" \
915         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
916         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
917         "INSTALL_DATA=$(INSTALL_DATA)" \
918         "RUNTEST=$(RUNTEST)" \
919         "RUNTESTFLAGS=$(RUNTESTFLAGS)"
920
921 # Flags that we pass when building the testsuite.
922
923 # empty for native, $(target_alias)/ for cross
924 target_subdir = @target_subdir@
925
926 CC_FOR_TARGET = ` \
927   if [ -f $${rootme}/../gcc/xgcc ] ; then \
928     if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
929       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/; \
930     else \
931       echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
932     fi; \
933   else \
934     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
935       echo $(CC); \
936     else \
937       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
938     fi; \
939   fi`
940
941 CXX_FOR_TARGET = ` \
942   if [ -f $${rootme}/../gcc/xg++ ] ; then \
943     if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
944       echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \
945     else \
946       echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
947     fi; \
948   else \
949     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
950       echo $(CXX); \
951     else \
952       t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
953     fi; \
954   fi`
955
956 # The use of $$(x_FOR_TARGET) reduces the command line length by not
957 # duplicating the lengthy definition.
958 TARGET_FLAGS_TO_PASS = \
959         "prefix=$(prefix)" \
960         "exec_prefix=$(exec_prefix)" \
961         "against=$(against)" \
962         'CC=$$(CC_FOR_TARGET)' \
963         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
964         "CFLAGS=$(CFLAGS)" \
965         'CXX=$$(CXX_FOR_TARGET)' \
966         "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
967         "CXXFLAGS=$(CXXFLAGS)" \
968         "INSTALL=$(INSTALL)" \
969         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
970         "INSTALL_DATA=$(INSTALL_DATA)" \
971         "MAKEINFO=$(MAKEINFO)" \
972         "MAKEHTML=$(MAKEHTML)" \
973         "RUNTEST=$(RUNTEST)" \
974         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
975         "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
976         "TESTS=$(TESTS)"
977
978 # All source files that go into linking GDB.
979 # Links made at configuration time should not be specified here, since
980 # SFILES is used in building the distribution archive.
981
982 SFILES = \
983         ada-exp.y \
984         ada-lang.c \
985         ada-tasks.c \
986         ada-typeprint.c \
987         ada-valprint.c \
988         ada-varobj.c \
989         addrmap.c \
990         agent.c \
991         annotate.c \
992         arch-utils.c \
993         arch/i386.c \
994         auto-load.c \
995         auxv.c \
996         ax-gdb.c \
997         ax-general.c \
998         bcache.c \
999         bfd-target.c \
1000         block.c \
1001         blockframe.c \
1002         break-catch-sig.c \
1003         break-catch-syscall.c \
1004         break-catch-throw.c \
1005         breakpoint.c \
1006         btrace.c \
1007         build-id.c \
1008         buildsym.c \
1009         c-exp.y \
1010         c-lang.c \
1011         c-typeprint.c \
1012         c-valprint.c \
1013         c-varobj.c \
1014         charset.c \
1015         cli-out.c \
1016         coff-pe-read.c \
1017         coffread.c \
1018         complaints.c \
1019         completer.c \
1020         continuations.c \
1021         copying.c \
1022         corefile.c \
1023         corelow.c \
1024         cp-abi.c \
1025         cp-name-parser.y \
1026         cp-namespace.c \
1027         cp-support.c \
1028         cp-valprint.c \
1029         ctf.c \
1030         d-exp.y \
1031         d-lang.c \
1032         d-namespace.c \
1033         d-valprint.c \
1034         dbxread.c \
1035         demangle.c \
1036         dictionary.c \
1037         disasm.c \
1038         disasm-selftests.c \
1039         dtrace-probe.c \
1040         dummy-frame.c \
1041         dwarf2-frame.c \
1042         dwarf2-frame-tailcall.c \
1043         dwarf2expr.c \
1044         dwarf2loc.c \
1045         dwarf2read.c \
1046         elfread.c \
1047         eval.c \
1048         event-loop.c \
1049         event-top.c \
1050         exceptions.c \
1051         expprint.c \
1052         extension.c \
1053         f-exp.y \
1054         f-lang.c \
1055         f-typeprint.c \
1056         f-valprint.c \
1057         filesystem.c \
1058         findcmd.c \
1059         findvar.c \
1060         frame.c \
1061         frame-base.c \
1062         frame-unwind.c \
1063         gcore.c \
1064         gdb.c \
1065         gdb_bfd.c \
1066         gdb-dlfcn.c \
1067         gdb_obstack.c \
1068         gdb_regex.c \
1069         gdb_usleep.c \
1070         gdbarch.c \
1071         gdbarch-selftests.c \
1072         gdbtypes.c \
1073         gnu-v2-abi.c \
1074         gnu-v3-abi.c \
1075         go-exp.y \
1076         go-lang.c \
1077         go-typeprint.c \
1078         go-valprint.c \
1079         inf-child.c \
1080         inf-loop.c \
1081         infcall.c \
1082         infcmd.c \
1083         inferior.c \
1084         inflow.c \
1085         infrun.c \
1086         inline-frame.c \
1087         interps.c \
1088         jit.c \
1089         language.c \
1090         linespec.c \
1091         location.c \
1092         m2-exp.y \
1093         m2-lang.c \
1094         m2-typeprint.c \
1095         m2-valprint.c \
1096         macrocmd.c \
1097         macroexp.c \
1098         macroscope.c \
1099         macrotab.c \
1100         main.c \
1101         maint.c \
1102         mdebugread.c \
1103         mem-break.c \
1104         memattr.c \
1105         memory-map.c \
1106         memrange.c \
1107         minidebug.c \
1108         minsyms.c \
1109         mipsread.c \
1110         namespace.c \
1111         objc-lang.c \
1112         objfiles.c \
1113         observer.c \
1114         opencl-lang.c \
1115         osabi.c \
1116         osdata.c \
1117         p-exp.y \
1118         p-lang.c \
1119         p-typeprint.c \
1120         p-valprint.c \
1121         parse.c \
1122         printcmd.c \
1123         probe.c \
1124         producer.c \
1125         proc-service.list \
1126         progspace.c \
1127         progspace-and-thread.c \
1128         prologue-value.c \
1129         psymtab.c \
1130         record.c \
1131         record-btrace.c \
1132         record-full.c \
1133         regcache.c \
1134         reggroups.c \
1135         remote.c \
1136         remote-fileio.c \
1137         remote-notif.c \
1138         reverse.c \
1139         rust-exp.y \
1140         rust-lang.c \
1141         selftest-arch.c \
1142         sentinel-frame.c \
1143         ser-base.c \
1144         ser-event.c \
1145         ser-unix.c \
1146         serial.c \
1147         skip.c \
1148         sol-thread.c \
1149         solib.c \
1150         solib-target.c \
1151         source.c \
1152         stabsread.c \
1153         stack.c \
1154         stap-probe.c \
1155         std-regs.c \
1156         stub-termcap.c \
1157         symfile.c \
1158         symfile-debug.c \
1159         symfile-mem.c \
1160         symmisc.c \
1161         symtab.c \
1162         target.c \
1163         target-dcache.c \
1164         target-descriptions.c \
1165         target-memory.c \
1166         thread.c \
1167         tid-parse.c \
1168         top.c \
1169         tracepoint.c \
1170         trad-frame.c \
1171         tramp-frame.c \
1172         target-float.c \
1173         typeprint.c \
1174         ui-file.c \
1175         ui-file.h \
1176         ui-out.c \
1177         user-regs.c \
1178         utils.c \
1179         valarith.c \
1180         valops.c \
1181         valprint.c \
1182         value.c \
1183         varobj.c \
1184         xml-support.c \
1185         xml-syscall.c \
1186         xml-tdesc.c \
1187         common/agent.c \
1188         common/btrace-common.c \
1189         common/buffer.c \
1190         common/cleanups.c \
1191         common/common-debug.c \
1192         common/common-exceptions.c \
1193         common/common-regcache.c \
1194         common/common-utils.c \
1195         common/errors.c \
1196         common/environ.c \
1197         common/fileio.c \
1198         common/filestuff.c \
1199         common/format.c \
1200         common/job-control.c \
1201         common/gdb_tilde_expand.c \
1202         common/gdb_vecs.c \
1203         common/new-op.c \
1204         common/print-utils.c \
1205         common/ptid.c \
1206         common/rsp-low.c \
1207         common/run-time-clock.c \
1208         common/selftest.c \
1209         common/signals.c \
1210         common/signals-state-save-restore.c \
1211         common/vec.c \
1212         common/xml-utils.c \
1213         mi/mi-common.c \
1214         target/waitstatus.c \
1215         $(SUBDIR_GCC_COMPILE_SRCS)
1216
1217 LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
1218
1219 # Header files that need to have srcdir added.  Note that in the cases
1220 # where we use a macro like $(gdbcmd_h), things are carefully arranged
1221 # so that each .h file is listed exactly once (M-x tags-search works
1222 # wrong if TAGS has files twice).  Because this is tricky to get
1223 # right, it is probably easiest just to list .h files here directly.
1224
1225 HFILES_NO_SRCDIR = \
1226         aarch64-tdep.h \
1227         ada-lang.h \
1228         addrmap.h \
1229         alpha-bsd-tdep.h \
1230         alpha-tdep.h \
1231         amd64-darwin-tdep.h \
1232         amd64-linux-tdep.h \
1233         amd64-nat.h \
1234         amd64-tdep.h \
1235         annotate.h \
1236         arc-tdep.h \
1237         arch-utils.h \
1238         arm-linux-tdep.h \
1239         arm-tdep.h \
1240         auto-load.h \
1241         auxv.h \
1242         ax.h \
1243         ax-gdb.h \
1244         bcache.h \
1245         bfd-target.h \
1246         bfin-tdep.h \
1247         block.h \
1248         breakpoint.h \
1249         bsd-kvm.h \
1250         bsd-uthread.h \
1251         build-id.h \
1252         buildsym.h \
1253         c-lang.h \
1254         charset.h \
1255         charset-list.h \
1256         cli-out.h \
1257         coff-pe-read.h \
1258         command.h \
1259         complaints.h \
1260         completer.h \
1261         cp-abi.h \
1262         cp-support.h \
1263         ctf.h \
1264         d-lang.h \
1265         darwin-nat.h \
1266         dcache.h \
1267         defs.h \
1268         dicos-tdep.h \
1269         dictionary.h \
1270         disasm.h \
1271         dummy-frame.h \
1272         dwarf2-frame.h \
1273         dwarf2-frame-tailcall.h \
1274         dwarf2expr.h \
1275         dwarf2loc.h \
1276         event-loop.h \
1277         event-top.h \
1278         exceptions.h \
1279         exec.h \
1280         expression.h \
1281         extension.h \
1282         extension-priv.h \
1283         f-lang.h \
1284         fbsd-nat.h \
1285         fbsd-tdep.h \
1286         filesystem.h \
1287         frame.h \
1288         frame-base.h \
1289         frame-unwind.h \
1290         frv-tdep.h \
1291         ft32-tdep.h \
1292         gcore.h \
1293         gdb_bfd.h \
1294         gdb_curses.h \
1295         gdb-dlfcn.h \
1296         gdb_expat.h \
1297         gdb_obstack.h \
1298         gdb_proc_service.h \
1299         gdb_regex.h \
1300         gdb_select.h \
1301         gdb-stabs.h \
1302         gdb_usleep.h \
1303         gdb_vfork.h \
1304         gdb_wchar.h \
1305         gdbarch.h \
1306         gdbcmd.h \
1307         gdbcore.h \
1308         gdbthread.h \
1309         gdbtypes.h \
1310         glibc-tdep.h \
1311         gnu-nat.h \
1312         go-lang.h \
1313         gregset.h \
1314         hppa-bsd-tdep.h \
1315         hppa-linux-offsets.h \
1316         hppa-tdep.h \
1317         i386-bsd-nat.h \
1318         i386-darwin-tdep.h \
1319         i386-linux-nat.h \
1320         i386-linux-tdep.h \
1321         i386-tdep.h \
1322         i387-tdep.h \
1323         ia64-libunwind-tdep.h \
1324         ia64-tdep.h \
1325         inf-child.h \
1326         inf-loop.h \
1327         inf-ptrace.h \
1328         infcall.h \
1329         inferior.h \
1330         inflow.h \
1331         inline-frame.h \
1332         interps.h \
1333         jit.h \
1334         language.h \
1335         linespec.h \
1336         linux-fork.h \
1337         linux-nat.h \
1338         linux-record.h \
1339         linux-tdep.h \
1340         location.h \
1341         m2-lang.h \
1342         m32r-tdep.h \
1343         m68k-tdep.h \
1344         m88k-tdep.h \
1345         macroexp.h \
1346         macroscope.h \
1347         macrotab.h \
1348         main.h \
1349         mdebugread.h \
1350         memattr.h \
1351         memory-map.h \
1352         memrange.h \
1353         microblaze-tdep.h \
1354         mips-linux-tdep.h \
1355         mips-nbsd-tdep.h \
1356         mips-tdep.h \
1357         mn10300-tdep.h \
1358         moxie-tdep.h \
1359         nbsd-nat.h \
1360         nbsd-tdep.h \
1361         nds32-tdep.h \
1362         nios2-tdep.h \
1363         nto-tdep.h \
1364         objc-lang.h \
1365         objfiles.h \
1366         obsd-nat.h \
1367         obsd-tdep.h \
1368         osabi.h \
1369         osdata.h \
1370         p-lang.h \
1371         parser-defs.h \
1372         ppc-fbsd-tdep.h \
1373         ppc-linux-tdep.h \
1374         ppc-nbsd-tdep.h \
1375         ppc-obsd-tdep.h \
1376         ppc-ravenscar-thread.h \
1377         ppc-tdep.h \
1378         ppc64-tdep.h \
1379         probe.h \
1380         proc-utils.h \
1381         procfs.h \
1382         progspace.h \
1383         progspace-and-thread.h \
1384         prologue-value.h \
1385         psympriv.h \
1386         psymtab.h \
1387         ravenscar-thread.h \
1388         record.h \
1389         record-full.h \
1390         regcache.h \
1391         reggroups.h \
1392         regset.h \
1393         remote.h \
1394         remote-fileio.h \
1395         remote-notif.h \
1396         rs6000-aix-tdep.h \
1397         rs6000-tdep.h \
1398         s390-linux-tdep.h \
1399         score-tdep.h \
1400         selftest-arch.h \
1401         sentinel-frame.h \
1402         ser-base.h \
1403         ser-event.h \
1404         ser-tcp.h \
1405         ser-unix.h \
1406         serial.h \
1407         sh-tdep.h \
1408         sh64-tdep.h \
1409         sim-regno.h \
1410         skip.h \
1411         sol2-tdep.h \
1412         solib.h \
1413         solib-aix.h \
1414         solib-darwin.h \
1415         solib-spu.h \
1416         solib-svr4.h \
1417         solib-target.h \
1418         solist.h \
1419         source.h \
1420         sparc-nat.h \
1421         sparc-ravenscar-thread.h \
1422         sparc-tdep.h \
1423         sparc64-tdep.h \
1424         spu-tdep.h \
1425         stabsread.h \
1426         stack.h \
1427         stap-probe.h \
1428         symfile.h \
1429         symtab.h \
1430         target.h \
1431         target-dcache.h \
1432         target-descriptions.h \
1433         terminal.h \
1434         tid-parse.h \
1435         top.h \
1436         tracefile.h \
1437         tracepoint.h \
1438         trad-frame.h \
1439         target-float.h \
1440         tramp-frame.h \
1441         typeprint.h \
1442         ui-file.h \
1443         ui-out.h \
1444         user-regs.h \
1445         utils.h \
1446         valprint.h \
1447         value.h \
1448         varobj.h \
1449         varobj-iter.h \
1450         vax-tdep.h \
1451         windows-nat.h \
1452         windows-tdep.h \
1453         x86-bsd-nat.h \
1454         x86-linux-nat.h \
1455         x86-nat.h \
1456         xcoffread.h \
1457         xml-support.h \
1458         xml-syscall.h \
1459         xml-tdesc.h \
1460         xtensa-tdep.h \
1461         arch/aarch64.h \
1462         arch/aarch64-insn.h \
1463         arch/arm.h \
1464         arch/i386.h \
1465         cli/cli-cmds.h \
1466         cli/cli-decode.h \
1467         cli/cli-script.h \
1468         cli/cli-setshow.h \
1469         cli/cli-utils.h \
1470         common/buffer.h \
1471         common/cleanups.h \
1472         common/common-debug.h \
1473         common/common-defs.h \
1474         common/common-exceptions.h \
1475         common/common-gdbthread.h \
1476         common/common-regcache.h \
1477         common/common-types.h \
1478         common/common-utils.h \
1479         common/job-control.h \
1480         common/errors.h \
1481         common/environ.h \
1482         common/fileio.h \
1483         common/format.h \
1484         common/gdb_assert.h \
1485         common/gdb_tilde_expand.h \
1486         common/gdb_locale.h \
1487         common/gdb_setjmp.h \
1488         common/gdb_signals.h \
1489         common/gdb_sys_time.h \
1490         common/gdb_vecs.h \
1491         common/gdb_wait.h \
1492         common/common-inferior.h \
1493         common/host-defs.h \
1494         common/print-utils.h \
1495         common/ptid.h \
1496         common/queue.h \
1497         common/rsp-low.h \
1498         common/run-time-clock.h \
1499         common/signals-state-save-restore.h \
1500         common/symbol.h \
1501         common/vec.h \
1502         common/version.h \
1503         common/x86-xstate.h \
1504         common/xml-utils.h \
1505         compile/compile.h \
1506         config/nm-linux.h \
1507         config/nm-nto.h \
1508         config/djgpp/langinfo.h \
1509         config/djgpp/nl_types.h \
1510         config/i386/nm-fbsd.h \
1511         config/i386/nm-i386gnu.h \
1512         config/sparc/nm-sol2.h \
1513         gnulib/import/inttypes.in.h \
1514         gnulib/import/stddef.in.h \
1515         gnulib/import/stdint.in.h \
1516         gnulib/import/str-two-way.h \
1517         gnulib/import/string.in.h \
1518         gnulib/import/extra/snippet/arg-nonnull.h \
1519         gnulib/import/extra/snippet/c++defs.h \
1520         gnulib/import/extra/snippet/warn-on-use.h \
1521         mi/mi-cmds.h \
1522         mi/mi-common.h \
1523         mi/mi-console.h \
1524         mi/mi-getopt.h \
1525         mi/mi-main.h \
1526         mi/mi-out.h \
1527         mi/mi-parse.h \
1528         nat/aarch64-linux.h \
1529         nat/aarch64-linux-hw-point.h \
1530         nat/amd64-linux-siginfo.h \
1531         nat/gdb_ptrace.h \
1532         nat/gdb_thread_db.h \
1533         nat/fork-inferior.h \
1534         nat/linux-btrace.h \
1535         nat/linux-namespaces.h \
1536         nat/linux-nat.h \
1537         nat/linux-osdata.h \
1538         nat/linux-personality.h \
1539         nat/linux-ptrace.h \
1540         nat/linux-waitpid.h \
1541         nat/mips-linux-watch.h \
1542         nat/ppc-linux.h \
1543         nat/x86-cpuid.h \
1544         nat/x86-dregs.h \
1545         nat/x86-gcc-cpuid.h \
1546         nat/x86-linux.h \
1547         nat/x86-linux-dregs.h \
1548         python/py-event.h \
1549         python/py-events.h \
1550         python/py-stopevent.h \
1551         python/python.h \
1552         python/python-internal.h \
1553         regformats/regdef.h \
1554         target/resume.h \
1555         target/target.h \
1556         target/wait.h \
1557         target/waitstatus.h \
1558         tui/tui.h \
1559         tui/tui-command.h \
1560         tui/tui-data.h \
1561         tui/tui-disasm.h \
1562         tui/tui-file.h \
1563         tui/tui-hooks.h \
1564         tui/tui-io.h \
1565         tui/tui-layout.h \
1566         tui/tui-regs.h \
1567         tui/tui-source.h \
1568         tui/tui-stack.h \
1569         tui/tui-win.h \
1570         tui/tui-windata.h \
1571         tui/tui-wingeneral.h \
1572         tui/tui-winsource.h
1573
1574 # Header files that already have srcdir in them, or which are in objdir.
1575
1576 HFILES_WITH_SRCDIR = \
1577         ../bfd/bfd.h \
1578         jit-reader.h
1579
1580 # GDB "info" files, which should be included in their entirety
1581 INFOFILES = gdb.info*
1582
1583 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1584 # default their values the way we do for SER_HARDWIRE; in the future
1585 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1586 # variables analogous to SER_HARDWIRE which get defaulted in this
1587 # Makefile.in
1588
1589 DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) \
1590            $(REMOTE_OBS) $(SIM_OBS)
1591
1592 SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS)
1593 # Don't include YYFILES (*.c) because we already include *.y in SFILES,
1594 # and it's more useful to see it in the .y file.
1595 TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
1596         $(CONFIG_SRCS)
1597 TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
1598
1599 COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
1600         ada-lang.o \
1601         ada-tasks.o \
1602         ada-typeprint.o \
1603         ada-valprint.o \
1604         ada-varobj.o \
1605         addrmap.o \
1606         agent.o \
1607         annotate.o \
1608         arch-utils.o \
1609         auto-load.o \
1610         auxv.o \
1611         bcache.o \
1612         bfd-target.o \
1613         block.o \
1614         blockframe.o \
1615         break-catch-sig.o \
1616         break-catch-syscall.o \
1617         break-catch-throw.o \
1618         breakpoint.o \
1619         btrace.o \
1620         btrace-common.o \
1621         buffer.o \
1622         build-id.o \
1623         buildsym.o \
1624         c-lang.o \
1625         c-typeprint.o \
1626         c-valprint.o \
1627         c-varobj.o \
1628         charset.o \
1629         cleanups.o \
1630         cli-out.o \
1631         coff-pe-read.o \
1632         coffread.o \
1633         common-agent.o \
1634         common-debug.o \
1635         common-exceptions.o \
1636         job-control.o \
1637         common-regcache.o \
1638         common-utils.o \
1639         complaints.o \
1640         completer.o \
1641         continuations.o \
1642         copying.o \
1643         corefile.o \
1644         corelow.o \
1645         cp-abi.o \
1646         cp-namespace.o \
1647         cp-support.o \
1648         cp-valprint.o \
1649         d-lang.o \
1650         d-namespace.o \
1651         d-valprint.o \
1652         dbxread.o \
1653         debug.o \
1654         demangle.o \
1655         dictionary.o \
1656         disasm.o \
1657         disasm-selftests.o \
1658         dummy-frame.o \
1659         dwarf2-frame.o \
1660         dwarf2-frame-tailcall.o \
1661         dwarf2expr.o \
1662         dwarf2loc.o \
1663         dwarf2read.o \
1664         environ.o \
1665         errors.o \
1666         eval.o \
1667         event-loop.o \
1668         event-top.o \
1669         exceptions.o \
1670         exec.o \
1671         expprint.o \
1672         extension.o \
1673         f-lang.o \
1674         f-typeprint.o \
1675         f-valprint.o \
1676         fileio.o \
1677         filename-seen-cache.o \
1678         filestuff.o \
1679         filesystem.o \
1680         findcmd.o \
1681         findvar.o \
1682         format.o \
1683         frame.o \
1684         frame-base.o \
1685         frame-unwind.o \
1686         gcore.o \
1687         gdb_bfd.o \
1688         gdb_tilde_expand.o \
1689         gdb-dlfcn.o \
1690         gdb_obstack.o \
1691         gdb_regex.o \
1692         gdb_usleep.o \
1693         gdb_vecs.o \
1694         gdbarch.o \
1695         gdbarch-selftests.o \
1696         gdbtypes.o \
1697         gnu-v2-abi.o \
1698         gnu-v3-abi.o \
1699         go-lang.o \
1700         go-typeprint.o \
1701         go-valprint.o \
1702         inf-child.o \
1703         inf-loop.o \
1704         infcall.o \
1705         infcmd.o \
1706         inferior.o \
1707         infrun.o \
1708         inline-frame.o \
1709         interps.o \
1710         jit.o \
1711         language.o \
1712         linespec.o \
1713         location.o \
1714         m2-lang.o \
1715         m2-typeprint.o \
1716         m2-valprint.o \
1717         macrocmd.o \
1718         macroexp.o \
1719         macroscope.o \
1720         macrotab.o \
1721         main.o \
1722         maint.o \
1723         mdebugread.o \
1724         mem-break.o \
1725         memattr.o \
1726         memory-map.o \
1727         memrange.o \
1728         mi/mi-common.o \
1729         minidebug.o \
1730         minsyms.o \
1731         mipsread.o \
1732         namespace.o \
1733         new-op.o \
1734         objc-lang.o \
1735         objfiles.o \
1736         observer.o \
1737         opencl-lang.o \
1738         osabi.o \
1739         osdata.o \
1740         p-lang.o \
1741         p-typeprint.o \
1742         p-valprint.o \
1743         parse.o \
1744         print-utils.o \
1745         printcmd.o \
1746         probe.o \
1747         producer.o \
1748         progspace.o \
1749         progspace-and-thread.o \
1750         prologue-value.o \
1751         psymtab.o \
1752         ptid.o \
1753         record.o \
1754         record-btrace.o \
1755         record-full.o \
1756         regcache.o \
1757         reggroups.o \
1758         registry.o \
1759         reverse.o \
1760         rsp-low.o \
1761         run-time-clock.o \
1762         rust-lang.o \
1763         selftest.o \
1764         selftest-arch.o \
1765         sentinel-frame.o \
1766         ser-event.o \
1767         serial.o \
1768         signals.o \
1769         signals-state-save-restore.o \
1770         skip.o \
1771         solib.o \
1772         solib-target.o \
1773         source.o \
1774         stabsread.o \
1775         stack.o \
1776         std-regs.o \
1777         symfile.o \
1778         symfile-debug.o \
1779         symmisc.o \
1780         symtab.o \
1781         target.o \
1782         target-dcache.o \
1783         target-descriptions.o \
1784         target-memory.o \
1785         thread.o \
1786         thread-fsm.o \
1787         tid-parse.o \
1788         top.o \
1789         trad-frame.o \
1790         tramp-frame.o \
1791         target-float.o \
1792         typeprint.o \
1793         ui-file.o \
1794         ui-out.o \
1795         user-regs.o \
1796         utils.o \
1797         valarith.o \
1798         valops.o \
1799         valprint.o \
1800         value.o \
1801         varobj.o \
1802         vec.o \
1803         version.o \
1804         waitstatus.o \
1805         xml-builtin.o \
1806         xml-support.o \
1807         xml-syscall.o \
1808         xml-tdesc.o \
1809         xml-utils.o \
1810         $(SUBDIR_GCC_COMPILE_OBS)
1811
1812 TSOBS = inflow.o
1813
1814 SUBDIRS = doc @subdirs@ data-directory $(GNULIB_BUILDDIR)
1815 CLEANDIRS = $(SUBDIRS)
1816
1817 # List of subdirectories in the build tree that must exist.
1818 # This is used to force build failures in existing trees when
1819 # a new directory is added.
1820 # The format here is for the `case' shell command.
1821 REQUIRED_SUBDIRS = doc | testsuite | $(GNULIB_BUILDDIR) | data-directory
1822
1823 # For now, shortcut the "configure GDB for fewer languages" stuff.
1824 YYFILES = \
1825         ada-exp.c \
1826         ada-lex.c \
1827         c-exp.c \
1828         cp-name-parser.c \
1829         d-exp.c \
1830         f-exp.c \
1831         go-exp.c \
1832         m2-exp.c \
1833         p-exp.c \
1834         rust-exp.c
1835
1836 YYOBJ = \
1837         ada-exp.o \
1838         c-exp.o \
1839         cp-name-parser.o \
1840         d-exp.o \
1841         f-exp.o \
1842         go-exp.o \
1843         m2-exp.o \
1844         p-exp.o \
1845         rust-exp.o
1846
1847 # Things which need to be built when making a distribution.
1848
1849 DISTSTUFF = $(YYFILES)
1850
1851
1852 # All generated files which can be included by another file.
1853 generated_files = \
1854         ada-lex.c \
1855         config.h \
1856         gcore \
1857         jit-reader.h \
1858         observer.h \
1859         observer.inc \
1860         $(GNULIB_H) \
1861         $(NAT_GENERATED_FILES)
1862
1863 # Flags needed to compile Python code
1864 PYTHON_CFLAGS = @PYTHON_CFLAGS@
1865
1866 all: gdb$(EXEEXT) $(CONFIG_ALL)
1867         @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
1868
1869 # Rule for compiling .c files in the top-level gdb directory.
1870 # The order-only dependencies ensure that we create the build subdirectories.
1871 %.o: %.c | $(CONFIG_DEP_SUBDIR)
1872         $(COMPILE) $<
1873         $(POSTCOMPILE)
1874
1875 $(CONFIG_DEP_SUBDIR):
1876         $(SHELL) $(srcdir)/../mkinstalldirs $@
1877
1878 # Rules for compiling .c files in the various source subdirectories.
1879 %.o: ${srcdir}/common/%.c
1880         $(COMPILE) $<
1881         $(POSTCOMPILE)
1882
1883 %.o: $(srcdir)/gdbtk/generic/%.c
1884         $(COMPILE) $(all_gdbtk_cflags) $<
1885         $(POSTCOMPILE)
1886
1887 %.o: $(srcdir)/guile/%.c
1888         $(COMPILE) $<
1889         $(POSTCOMPILE)
1890
1891 %.o: ${srcdir}/nat/%.c
1892         $(COMPILE) $<
1893         $(POSTCOMPILE)
1894
1895 %.o: $(srcdir)/python/%.c
1896         $(COMPILE) $(PYTHON_CFLAGS) $<
1897         $(POSTCOMPILE)
1898
1899 %.o: ${srcdir}/target/%.c
1900         $(COMPILE) $<
1901         $(POSTCOMPILE)
1902
1903 # Specify an explicit rule for gdb/common/agent.c, to avoid a clash with the
1904 # object file generate by gdb/agent.c.
1905 common-agent.o: $(srcdir)/common/agent.c
1906         $(COMPILE) $(srcdir)/common/agent.c
1907         $(POSTCOMPILE)
1908
1909 installcheck:
1910
1911 # The check target can not use subdir_do, because subdir_do does not
1912 # use TARGET_FLAGS_TO_PASS.
1913 check: force
1914         @if [ -f testsuite/Makefile ]; then \
1915           rootme=`pwd`; export rootme; \
1916           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1917           cd testsuite; \
1918           $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
1919         else true; fi
1920
1921 check-perf: force
1922         @if [ -f testsuite/Makefile ]; then \
1923           rootme=`pwd`; export rootme; \
1924           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1925           cd testsuite; \
1926           $(MAKE) $(TARGET_FLAGS_TO_PASS) check-perf; \
1927         else true; fi
1928
1929 check-read1: force
1930         @if [ -f testsuite/Makefile ]; then \
1931           rootme=`pwd`; export rootme; \
1932           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1933           cd testsuite; \
1934           $(MAKE) $(TARGET_FLAGS_TO_PASS) check-read1; \
1935         else true; fi
1936
1937 check-parallel: force
1938         @if [ -f testsuite/Makefile ]; then \
1939           rootme=`pwd`; export rootme; \
1940           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1941           cd testsuite; \
1942           $(MAKE) $(TARGET_FLAGS_TO_PASS) check-parallel; \
1943         else true; fi
1944
1945 # The idea is to parallelize testing of multilibs, for example:
1946 #   make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1947 # will run 3 concurrent sessions of check, eventually testing all 10
1948 # combinations.  GNU make is required for the % pattern to work, as is
1949 # a shell that expands alternations within braces.  If GNU make is not
1950 # used, this rule will harmlessly fail to match.  Used FORCE_PARALLEL to
1951 # prevent serialized checking due to the passed RUNTESTFLAGS.
1952 # FIXME: use config.status --config not --version, when available.
1953 check//%: force
1954         @if [ -f testsuite/config.status ]; then \
1955           rootme=`pwd`; export rootme; \
1956           rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1957           target=`echo "$@" | sed 's,//.*,,'`; \
1958           variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
1959           vardots=`echo "$$variant" | sed 's,/,.,g'`; \
1960           testdir=testsuite.$$vardots; \
1961           if [ ! -f $$testdir/Makefile ] && [ -f testsuite/config.status ]; then \
1962             configargs=`cd testsuite && ./config.status --version | \
1963               sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
1964             $(SHELL) $(srcdir)/../mkinstalldirs $$testdir && \
1965             (cd $$testdir && \
1966              eval $(SHELL) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
1967                            "\"--srcdir=\$$rootsrc/testsuite\"" \
1968              ); \
1969           else :; fi && cd $$testdir && \
1970           $(MAKE) $(TARGET_FLAGS_TO_PASS) \
1971             RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
1972             FORCE_PARALLEL=$(if $(FORCE_PARALLEL),1,$(if $(RUNTESTFLAGS),,1)) \
1973             "$$target"; \
1974         else true; fi
1975
1976 # The set of headers checked by 'check-headers' by default.
1977 CHECK_HEADERS = $(HFILES_NO_SRCDIR)
1978
1979 # Try to compile each header in isolation, thus ensuring headers are
1980 # self-contained.
1981 #
1982 # Defaults to checking all $HFILES_NO_SRCDIR headers.
1983 #
1984 # Do:
1985 #
1986 #    make check-headers CHECK_HEADERS="header.h list.h"
1987 #
1988 # to check specific headers.
1989 #
1990 check-headers:
1991         @echo Checking headers.
1992         for i in $(CHECK_HEADERS) ; do \
1993                 $(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \
1994                 $(INTERNAL_CFLAGS) -include defs.h $(srcdir)/$$i ; \
1995         done
1996 .PHONY: check-headers
1997
1998 info install-info clean-info dvi pdf install-pdf html install-html: force
1999         @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
2000
2001 # Traditionally "install" depends on "all".  But it may be useful
2002 # not to; for example, if the user has made some trivial change to a
2003 # source file and doesn't care about rebuilding or just wants to save the
2004 # time it takes for make to check that all is up to date.
2005 # install-only is intended to address that need.
2006 install: all
2007         @$(MAKE) $(FLAGS_TO_PASS) install-only
2008
2009 install-only: $(CONFIG_INSTALL)
2010         transformed_name=`t='$(program_transform_name)'; \
2011                           echo gdb | sed -e "$$t"` ; \
2012                 if test "x$$transformed_name" = x; then \
2013                   transformed_name=gdb ; \
2014                 else \
2015                   true ; \
2016                 fi ; \
2017                 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
2018                 $(INSTALL_PROGRAM) gdb$(EXEEXT) \
2019                         $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
2020                 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
2021                 $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
2022         if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
2023         then \
2024           transformed_name=`t='$(program_transform_name)'; \
2025                             echo gcore | sed -e "$$t"` ; \
2026                   if test "x$$transformed_name" = x; then \
2027                     transformed_name=gcore ; \
2028                   else \
2029                     true ; \
2030                   fi ; \
2031                   $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
2032                   $(INSTALL_SCRIPT) gcore \
2033                           $(DESTDIR)$(bindir)/$$transformed_name; \
2034         fi
2035         @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
2036
2037 install-strip:
2038         $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
2039           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
2040           `test -z '$(STRIP)' || \
2041             echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
2042
2043 install-guile:
2044         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/guile/gdb
2045
2046 install-python:
2047         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
2048
2049 uninstall: force $(CONFIG_UNINSTALL)
2050         transformed_name=`t='$(program_transform_name)'; \
2051                           echo gdb | sed -e $$t` ; \
2052                 if test "x$$transformed_name" = x; then \
2053                   transformed_name=gdb ; \
2054                 else \
2055                   true ; \
2056                 fi ; \
2057                 rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
2058                       $(DESTDIR)$(man1dir)/$$transformed_name.1
2059         if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
2060         then \
2061           transformed_name=`t='$(program_transform_name)'; \
2062                             echo gcore | sed -e "$$t"` ; \
2063                   if test "x$$transformed_name" = x; then \
2064                     transformed_name=gcore ; \
2065                   else \
2066                     true ; \
2067                   fi ; \
2068                   rm -f $(DESTDIR)$(bindir)/$$transformed_name; \
2069         fi
2070         @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
2071
2072 # The C++ name parser can be built standalone for testing.
2073 test-cp-name-parser.o: cp-name-parser.c
2074         $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
2075         $(POSTCOMPILE)
2076
2077 test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
2078         $(CC_LD) $(INTERNAL_LDFLAGS) -o test-cp-name-parser$(EXEEXT) \
2079                 test-cp-name-parser.o $(LIBIBERTY)
2080
2081 # We do this by grepping through sources.  If that turns out to be too slow,
2082 # maybe we could just require every .o file to have an initialization routine
2083 # of a given name (top.o -> _initialize_top, etc.).
2084 #
2085 # Formatting conventions:  The name of the _initialize_* routines must start
2086 # in column zero, and must not be inside #if.
2087 #
2088 # Note that the set of files with init functions might change, or the names
2089 # of the functions might change, so this files needs to depend on all the
2090 # object files that will be linked into gdb.
2091
2092 # FIXME: There is a problem with this approach - init.c may force
2093 # unnecessary files to be linked in.
2094
2095 # FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that
2096 # the first call is to _initialize_gdbtypes (implemented by explicitly
2097 # putting that function's name first in the init.l-tmp file).  This is
2098 # a hack to ensure that all the architecture dependant global
2099 # builtin_type_* variables are initialized before anything else
2100 # (per-architecture code is called in the same order that it is
2101 # registered).  The ``correct fix'' is to have all the builtin types
2102 # made part of the architecture and initialize them on-demand (using
2103 # gdbarch_data) just like everything else.  The catch is that other
2104 # modules still take the address of these builtin types forcing them
2105 # to be variables, sigh!
2106
2107 # NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is
2108 # anchored on the first column and excludes the ``/'' character so
2109 # that it doesn't add the $(srcdir) prefix to any file that already
2110 # has an absolute path.  It turns out that $(DEC)'s True64 make
2111 # automatically adds the $(srcdir) prefixes when it encounters files
2112 # in sub-directories such as cli/ and mi/.
2113
2114 # NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates
2115 # duplicates.  Files in the gdb/ directory can end up appearing in
2116 # COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file).
2117
2118 INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS) $(SUBDIR_GCC_COMPILE_SRCS)
2119 init.c: $(INIT_FILES)
2120         @echo Making init.c
2121         @rm -f init.c-tmp init.l-tmp
2122         @touch init.c-tmp
2123         @echo gdbtypes > init.l-tmp
2124         @-LANG=C ; export LANG ; \
2125         LC_ALL=C ; export LC_ALL ; \
2126         echo $(INIT_FILES) | \
2127         tr ' ' '\012' | \
2128         sed \
2129             -e '/^gdbtypes.[co]$$/d' \
2130             -e '/^init.[co]$$/d' \
2131             -e '/xdr_ld.[co]$$/d' \
2132             -e '/xdr_ptrace.[co]$$/d' \
2133             -e '/xdr_rdb.[co]$$/d' \
2134             -e '/udr.[co]$$/d' \
2135             -e '/udip2soc.[co]$$/d' \
2136             -e '/udi2go32.[co]$$/d' \
2137             -e '/version.[co]$$/d' \
2138             -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
2139             -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \
2140             -e 's/-exp\.o$$/-exp.y/' \
2141             -e 's/\.[co]$$/.c/' \
2142             -e 's,signals\.c,common/signals\.c,' \
2143             -e 's|^\([^  /][^     ]*\)|$(srcdir)/\1|g' | \
2144         while read f; do \
2145             sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \
2146         done | \
2147         while read f; do \
2148             case " $$fs " in \
2149                 *" $$f "* ) ;; \
2150                 * ) echo $$f ; fs="$$fs $$f";; \
2151             esac; \
2152         done >> init.l-tmp
2153         @echo '/* Do not modify this file.  */' >>init.c-tmp
2154         @echo '/* It is created automatically by the Makefile.  */'>>init.c-tmp
2155         @echo '#include "defs.h"      /* For initialize_file_ftype.  */' >>init.c-tmp
2156         @echo 'extern void initialize_all_files(void);' >>init.c-tmp
2157         @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp >>init.c-tmp
2158         @echo 'void' >>init.c-tmp
2159         @echo 'initialize_all_files (void)' >>init.c-tmp
2160         @echo '{' >>init.c-tmp
2161         @sed -e 's/\(.*\)/  _initialize_\1 ();/' <init.l-tmp >>init.c-tmp
2162         @echo '}' >>init.c-tmp
2163         @rm init.l-tmp
2164         @mv init.c-tmp init.c
2165
2166 .PRECIOUS: init.c
2167
2168 # Create a library of the gdb object files and build GDB by linking
2169 # against that.
2170 #
2171 # init.o is very important.  It pulls in the rest of GDB.
2172 LIBGDB_OBS = $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o
2173 libgdb.a: $(LIBGDB_OBS)
2174         -rm -f libgdb.a
2175         $(AR) q libgdb.a $(LIBGDB_OBS)
2176         $(RANLIB) libgdb.a
2177
2178 # Removing the old gdb first works better if it is running, at least on SunOS.
2179 gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
2180         rm -f gdb$(EXEEXT)
2181         $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
2182                 -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
2183                 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
2184
2185 # Convenience rule to handle recursion.
2186 $(LIBGNU) $(GNULIB_H): all-lib
2187 all-lib: $(GNULIB_BUILDDIR)/Makefile
2188         @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=$(GNULIB_BUILDDIR) subdir_do
2189 .PHONY: all-lib
2190
2191 # Convenience rule to handle recursion.
2192 .PHONY: all-data-directory
2193 all-data-directory: data-directory/Makefile
2194         @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=data-directory subdir_do
2195
2196 # This is useful when debugging GDB, because some Unix's don't let you run GDB
2197 # on itself without copying the executable.  So "make gdb1" will make
2198 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
2199 # Removing gdb1 before the copy is the right thing if gdb1 is open
2200 # in another process.
2201 gdb1$(EXEEXT): gdb$(EXEEXT)
2202         rm -f gdb1$(EXEEXT)
2203         cp gdb$(EXEEXT) gdb1$(EXEEXT)
2204
2205 # Put the proper machine-specific files first, so M-. on a machine
2206 # specific routine gets the one for the correct machine.  (FIXME: those
2207 # files go in twice; we should be removing them from the main list).
2208
2209 # TAGS depends on all the files that go into it so you can rebuild TAGS
2210 # with `make TAGS' and not have to say `rm TAGS' first.
2211
2212 GDB_NM_FILE = @GDB_NM_FILE@
2213 TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
2214         @echo Making TAGS
2215         etags `(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
2216         `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
2217                 echo $(srcdir)/$$i ; \
2218         done ; for i in $(TAGFILES_WITH_SRCDIR); do \
2219                 echo $$i ; \
2220         done) | sed -e 's/\.o$$/\.c/'` \
2221         `find $(srcdir)/config -name '*.h' -print`
2222
2223 tags: TAGS
2224
2225 clean mostlyclean: $(CONFIG_CLEAN)
2226         @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
2227         rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp
2228         rm -f init.c version.c observer.h observer.inc
2229         rm -f gdb$(EXEEXT) core make.log
2230         rm -f gdb[0-9]$(EXEEXT)
2231         rm -f test-cp-name-parser$(EXEEXT)
2232         rm -f xml-builtin.c stamp-xml
2233         rm -f $(DEPDIR)/*
2234         for i in $(CONFIG_SRC_SUBDIR); do \
2235                 rm -f $$i/*.o;  \
2236                 rm -f $$i/$(DEPDIR)/*; \
2237         done
2238
2239 # This used to depend on c-exp.c m2-exp.c TAGS
2240 # I believe this is wrong; the makefile standards for distclean just
2241 # describe removing files; the only sort of "re-create a distribution"
2242 # functionality described is if the distributed files are unmodified.
2243 # NB: While GDBSERVER might be configured on native systems, it isn't
2244 # always included in SUBDIRS.  Remove the gdbserver files explicitly.
2245 distclean: clean
2246         @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
2247         rm -rf $(GNULIB_BUILDDIR)
2248         rm -f gdbserver/config.status gdbserver/config.log
2249         rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h
2250         rm -f gdbserver/Makefile gdbserver/config.cache
2251         rm -f nm.h config.status config.h stamp-h gdb-gdb.gdb jit-reader.h
2252         rm -f y.output yacc.acts yacc.tmp y.tab.h
2253         rm -f config.log config.cache
2254         rm -f Makefile
2255         rm -rf $(DEPDIR)
2256         for i in $(CONFIG_SRC_SUBDIR); do \
2257                 rmdir $$i/$(DEPDIR); \
2258         done
2259
2260 maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
2261 realclean: maintainer-clean
2262
2263 local-maintainer-clean:
2264         @echo "This command is intended for maintainers to use;"
2265         @echo "it deletes files that may require special tools to rebuild."
2266         rm -f c-exp.c \
2267                 cp-name-parser.c \
2268                 ada-lex.c ada-exp.c \
2269                 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
2270         rm -f TAGS $(INFOFILES)
2271         rm -f $(YYFILES)
2272         rm -f nm.h config.status
2273
2274 do-maintainer-clean:
2275         @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(CLEANDIRS)" \
2276                 subdir_do
2277
2278 diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
2279         cd doc; $(MAKE) $(MFLAGS) diststuff
2280
2281 subdir_do: force
2282         @for i in $(DODIRS); do \
2283                 case $$i in \
2284                 $(REQUIRED_SUBDIRS)) \
2285                         if [ ! -f ./$$i/Makefile ] ; then \
2286                                 echo "Missing $$i/Makefile" >&2 ; \
2287                                 exit 1 ; \
2288                         fi ;; \
2289                 esac ; \
2290                 if [ -f ./$$i/Makefile ] ; then \
2291                         if (cd ./$$i; \
2292                                 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
2293                         else exit 1 ; fi ; \
2294                 else true ; fi ; \
2295         done
2296
2297 Makefile: Makefile.in config.status
2298         # Regenerate the Makefile and the tm.h / nm.h links.
2299         CONFIG_FILES="Makefile" \
2300           CONFIG_COMMANDS= \
2301           CONFIG_HEADERS= \
2302           $(SHELL) config.status
2303
2304 $(GNULIB_BUILDDIR)/Makefile: gnulib/Makefile.in config.status
2305         @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
2306           CONFIG_COMMANDS="depfiles" \
2307           CONFIG_HEADERS= \
2308           CONFIG_LINKS= \
2309           $(SHELL) config.status
2310
2311 data-directory/Makefile: data-directory/Makefile.in config.status
2312         CONFIG_FILES="data-directory/Makefile" \
2313           CONFIG_COMMANDS="depfiles" \
2314           CONFIG_HEADERS= \
2315           CONFIG_LINKS= \
2316           $(SHELL) config.status
2317
2318 .PHONY: run
2319 run: Makefile
2320         ./gdb$(EXEEXT) --data-directory=`pwd`/data-directory $(GDBFLAGS)
2321
2322 jit-reader.h: $(srcdir)/jit-reader.in
2323         $(SHELL) config.status $@
2324
2325 gcore: $(srcdir)/gcore.in
2326         $(SHELL) config.status $@
2327
2328 config.h: stamp-h ; @true
2329 stamp-h: $(srcdir)/config.in config.status
2330         CONFIG_HEADERS=config.h:config.in \
2331           CONFIG_COMMANDS="default depdir" \
2332           CONFIG_FILES= \
2333           CONFIG_LINKS= \
2334           $(SHELL) config.status
2335
2336 config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh
2337         $(SHELL) config.status --recheck
2338
2339 ACLOCAL = aclocal
2340 ACLOCAL_AMFLAGS = -I ../config
2341
2342 # Keep these in sync with the includes in acinclude.m4.
2343 aclocal_m4_deps = \
2344         configure.ac \
2345         acx_configure_dir.m4 \
2346         libmcheck.m4 \
2347         transform.m4 \
2348         ../bfd/bfd.m4 \
2349         ../config/acinclude.m4 \
2350         ../config/plugins.m4 \
2351         ../config/lead-dot.m4 \
2352         ../config/override.m4 \
2353         ../config/largefile.m4 \
2354         ../config/gettext-sister.m4 \
2355         ../config/lib-ld.m4 \
2356         ../config/lib-prefix.m4 \
2357         ../config/lib-link.m4 \
2358         ../config/acx.m4 \
2359         ../config/tcl.m4 \
2360         ../config/depstand.m4 \
2361         ../config/lcmessage.m4 \
2362         ../config/codeset.m4 \
2363         ../config/zlib.m4
2364
2365 $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
2366         cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
2367
2368 AUTOCONF = autoconf
2369 configure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
2370 $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(configure_deps)
2371         cd $(srcdir) && $(AUTOCONF)
2372
2373 AUTOHEADER = autoheader
2374 $(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(configure_deps)
2375         cd $(srcdir) && $(AUTOHEADER)
2376         rm -f stamp-h
2377         touch $@
2378
2379 # automatic rebuilding in automake-generated Makefiles requires
2380 # this rule in the toplevel Makefile, which, with GNU make, causes
2381 # the desired updates through the implicit regeneration of the Makefile
2382 # and all of its prerequisites.
2383 am--refresh:
2384         @:
2385
2386 force:
2387
2388 # Documentation!
2389 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
2390 doc/refcard.dvi:
2391         cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS)
2392
2393 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
2394 doc/refcard.ps:
2395         cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS)
2396
2397 # GDB MANUAL: TeX dvi file
2398 doc/gdb.dvi:
2399         cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS)
2400
2401 # GDB MANUAL: info file
2402 doc/gdb.info:
2403         cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)
2404
2405 # Make copying.c from COPYING
2406 $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copying.awk
2407         awk -f $(srcdir)/copying.awk \
2408                 < $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
2409         mv $(srcdir)/copying.tmp $(srcdir)/copying.c
2410
2411 version.c: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
2412         $(SHELL) $(srcdir)/common/create-version.sh $(srcdir) \
2413             $(host_alias) $(target_alias) version.c
2414
2415 observer.h: observer.sh doc/observer.texi
2416         ${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
2417
2418 observer.inc: observer.sh doc/observer.texi
2419         ${srcdir}/observer.sh inc ${srcdir}/doc/observer.texi observer.inc
2420
2421 lint: $(LINTFILES)
2422         $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
2423            `echo $(DEPFILES) $(CONFIG_OBS) | sed 's/\.o /\.c /g'`
2424
2425 gdb.cxref: $(SFILES)
2426         cxref -I. $(SFILES) >gdb.cxref
2427
2428 force_update:
2429
2430 # GNU Make has an annoying habit of putting *all* the Makefile variables
2431 # into the environment, unless you include this target as a circumvention.
2432 # Rumor is that this will be fixed (and this target can be removed)
2433 # in GNU Make 4.0.
2434 .NOEXPORT:
2435
2436 # GNU Make 3.63 has a different problem: it keeps tacking command line
2437 # overrides onto the definition of $(MAKE).  This variable setting
2438 # will remove them.
2439 MAKEOVERRIDES =
2440
2441 ALLDEPFILES = \
2442         aarch64-fbsd-nat.c \
2443         aarch64-fbsd-tdep.c \
2444         aarch64-linux-nat.c \
2445         aarch64-linux-tdep.c \
2446         aarch64-newlib-tdep.c \
2447         aarch64-tdep.c \
2448         aix-thread.c \
2449         alpha-bsd-nat.c \
2450         alpha-bsd-tdep.c \
2451         alpha-linux-nat.c \
2452         alpha-linux-tdep.c \
2453         alpha-mdebug-tdep.c \
2454         alpha-nbsd-tdep.c \
2455         alpha-obsd-tdep.c \
2456         alpha-tdep.c \
2457         amd64-bsd-nat.c \
2458         amd64-darwin-tdep.c \
2459         amd64-dicos-tdep.c \
2460         amd64-fbsd-nat.c \
2461         amd64-fbsd-tdep.c \
2462         amd64-linux-nat.c \
2463         amd64-linux-tdep.c \
2464         amd64-nat.c \
2465         amd64-nbsd-nat.c \
2466         amd64-nbsd-tdep.c \
2467         amd64-obsd-nat.c \
2468         amd64-obsd-tdep.c \
2469         amd64-sol2-tdep.c \
2470         amd64-tdep.c \
2471         arc-tdep.c \
2472         arm.c \
2473         arm-bsd-tdep.c \
2474         arm-fbsd-nat.c \
2475         arm-fbsd-tdep.c \
2476         arm-get-next-pcs.c \
2477         arm-linux.c \
2478         arm-linux-nat.c \
2479         arm-linux-tdep.c \
2480         arm-nbsd-nat.c \
2481         arm-nbsd-tdep.c \
2482         arm-obsd-tdep.c \
2483         arm-symbian-tdep.c \
2484         arm-tdep.c \
2485         avr-tdep.c \
2486         bfin-linux-tdep.c \
2487         bfin-tdep.c \
2488         bsd-kvm.c \
2489         bsd-uthread.c \
2490         darwin-nat.c \
2491         dcache.c \
2492         dcache.c \
2493         dicos-tdep.c \
2494         exec.c \
2495         fbsd-nat.c \
2496         fbsd-tdep.c \
2497         fork-child.c \
2498         ft32-tdep.c \
2499         glibc-tdep.c \
2500         go32-nat.c \
2501         h8300-tdep.c \
2502         hppa-bsd-tdep.c \
2503         hppa-linux-nat.c \
2504         hppa-linux-tdep.c \
2505         hppa-nbsd-nat.c \
2506         hppa-nbsd-tdep.c \
2507         hppa-obsd-nat.c \
2508         hppa-obsd-tdep.c \
2509         hppa-tdep.c \
2510         i386-bsd-nat.c \
2511         i386-bsd-tdep.c \
2512         i386-cygwin-tdep.c \
2513         i386-darwin-nat.c \
2514         i386-darwin-tdep.c \
2515         i386-dicos-tdep.c \
2516         i386-fbsd-nat.c \
2517         i386-fbsd-tdep.c \
2518         i386-gnu-nat.c \
2519         i386-gnu-tdep.c \
2520         i386-linux-nat.c \
2521         i386-linux-tdep.c \
2522         i386-nbsd-nat.c \
2523         i386-nbsd-tdep.c \
2524         i386-obsd-nat.c \
2525         i386-obsd-tdep.c \
2526         i386-sol2-nat.c \
2527         i386-sol2-tdep.c \
2528         i386-tdep.c \
2529         i386-v4-nat.c \
2530         i387-tdep.c \
2531         ia64-libunwind-tdep.c \
2532         ia64-linux-nat.c \
2533         ia64-linux-tdep.c \
2534         ia64-tdep.c \
2535         ia64-vms-tdep.c \
2536         inf-ptrace.c \
2537         linux-fork.c \
2538         linux-record.c \
2539         linux-tdep.c \
2540         lm32-tdep.c \
2541         m32r-linux-nat.c \
2542         m32r-linux-tdep.c \
2543         m32r-tdep.c \
2544         m68hc11-tdep.c \
2545         m68k-bsd-nat.c \
2546         m68k-bsd-tdep.c \
2547         m68k-linux-nat.c \
2548         m68k-linux-tdep.c \
2549         m68k-tdep.c \
2550         m88k-bsd-nat.c \
2551         m88k-tdep.c \
2552         microblaze-linux-tdep.c \
2553         microblaze-tdep.c \
2554         mingw-hdep.c \
2555         mips-fbsd-nat.c \
2556         mips-fbsd-tdep.c \
2557         mips-linux-nat.c \
2558         mips-linux-tdep.c \
2559         mips-nbsd-nat.c \
2560         mips-nbsd-tdep.c \
2561         mips-sde-tdep.c \
2562         mips-tdep.c \
2563         mips64-obsd-nat.c \
2564         mips64-obsd-tdep.c \
2565         msp430-tdep.c \
2566         nbsd-nat.c \
2567         nbsd-tdep.c \
2568         nds32-tdep.c \
2569         nios2-linux-tdep.c \
2570         nios2-tdep.c \
2571         obsd-nat.c \
2572         obsd-tdep.c \
2573         posix-hdep.c \
2574         ppc-fbsd-nat.c \
2575         ppc-fbsd-tdep.c \
2576         ppc-linux-nat.c \
2577         ppc-linux-tdep.c \
2578         ppc-nbsd-nat.c \
2579         ppc-nbsd-tdep.c \
2580         ppc-obsd-nat.c \
2581         ppc-obsd-tdep.c \
2582         ppc-ravenscar-thread.c \
2583         ppc-sysv-tdep.c \
2584         ppc64-tdep.c \
2585         procfs.c \
2586         ravenscar-thread.c \
2587         remote-sim.c \
2588         rl78-tdep.c \
2589         rs6000-lynx178-tdep.c \
2590         rs6000-nat.c \
2591         rs6000-tdep.c \
2592         rx-tdep.c \
2593         s390-linux-nat.c \
2594         s390-linux-tdep.c \
2595         score-tdep.c \
2596         ser-go32.c \
2597         ser-mingw.c \
2598         ser-pipe.c \
2599         ser-tcp.c \
2600         sh-nbsd-nat.c \
2601         sh-nbsd-tdep.c \
2602         sh-tdep.c \
2603         sh64-tdep.c \
2604         sol2-tdep.c \
2605         solib-aix.c \
2606         solib-spu.c \
2607         solib-svr4.c \
2608         sparc-linux-nat.c \
2609         sparc-linux-tdep.c \
2610         sparc-nat.c \
2611         sparc-nbsd-nat.c \
2612         sparc-nbsd-tdep.c \
2613         sparc-obsd-tdep.c \
2614         sparc-ravenscar-thread.c \
2615         sparc-sol2-nat.c \
2616         sparc-sol2-tdep.c \
2617         sparc-tdep.c \
2618         sparc64-fbsd-nat.c \
2619         sparc64-fbsd-tdep.c \
2620         sparc64-linux-nat.c \
2621         sparc64-linux-tdep.c \
2622         sparc64-nat.c \
2623         sparc64-nbsd-nat.c \
2624         sparc64-nbsd-tdep.c \
2625         sparc64-obsd-nat.c \
2626         sparc64-obsd-tdep.c \
2627         sparc64-sol2-tdep.c \
2628         sparc64-tdep.c \
2629         spu-linux-nat.c \
2630         spu-multiarch.c \
2631         spu-tdep.c \
2632         tilegx-linux-nat.c \
2633         tilegx-linux-tdep.c \
2634         tilegx-tdep.c \
2635         v850-tdep.c \
2636         vax-bsd-nat.c \
2637         vax-nbsd-tdep.c \
2638         vax-tdep.c \
2639         windows-nat.c \
2640         windows-tdep.c \
2641         x86-nat.c \
2642         xcoffread.c \
2643         xstormy16-tdep.c \
2644         xtensa-config.c \
2645         xtensa-linux-nat.c \
2646         xtensa-linux-tdep.c \
2647         xtensa-tdep.c \
2648         xtensa-xtregs.c \
2649         common/mingw-strerror.c \
2650         common/posix-strerror.c
2651
2652 # Some files need explicit build rules (due to -Werror problems) or due
2653 # to sub-directory fun 'n' games.
2654
2655 # Do not try to build "printcmd.c" with -Wformat-nonliteral.  It manually
2656 # checks format strings.
2657 printcmd.o: $(srcdir)/printcmd.c
2658         $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
2659                 $(COMPILE.post) $(srcdir)/printcmd.c
2660         $(POSTCOMPILE)
2661
2662 # Same for "target-float.c".
2663 target-float.o: $(srcdir)/target-float.c
2664         $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
2665                 $(COMPILE.post) $(srcdir)/target-float.c
2666
2667 # ada-exp.c can appear in srcdir, for releases; or in ., for
2668 # development builds.
2669 ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
2670
2671 # Some versions of flex give output that triggers
2672 # -Wold-style-definition.
2673 ada-exp.o: ada-exp.c
2674         $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_DEFS) \
2675                 $(COMPILE.post) $(ADA_EXP_C)
2676         $(POSTCOMPILE)
2677
2678 # Message files.  Based on code in gcc/Makefile.in.
2679
2680 # Rules for generating translated message descriptions.  Disabled by
2681 # autoconf if the tools are not available.
2682
2683 .PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
2684
2685 all-po: $(CATALOGS)
2686
2687 # This notation should be acceptable to all Make implementations used
2688 # by people who are interested in updating .po files.
2689 update-po: $(CATALOGS:.gmo=.pox)
2690
2691 # N.B. We do not attempt to copy these into $(srcdir).  The snapshot
2692 # script does that.
2693 %.gmo: %.po
2694         -test -d po || mkdir po
2695         $(GMSGFMT) --statistics -o $@ $<
2696
2697 # The new .po has to be gone over by hand, so we deposit it into
2698 # build/po with a different extension.  If build/po/$(PACKAGE).pot
2699 # exists, use it (it was just created), else use the one in srcdir.
2700 %.pox: %.po
2701         -test -d po || mkdir po
2702         $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
2703                         then echo po/$(PACKAGE).pot; \
2704                         else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
2705
2706 # This rule has to look for .gmo modules in both srcdir and the cwd,
2707 # and has to check that we actually have a catalog for each language,
2708 # in case they weren't built or included with the distribution.
2709 install-po:
2710         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
2711         cats="$(CATALOGS)"; for cat in $$cats; do \
2712           lang=`basename $$cat | sed 's/\.gmo$$//'`; \
2713           if [ -f $$cat ]; then :; \
2714           elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
2715           else continue; \
2716           fi; \
2717           dir=$(localedir)/$$lang/LC_MESSAGES; \
2718           echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
2719           $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
2720           echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
2721           $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
2722         done
2723 uninstall-po:
2724         cats="$(CATALOGS)"; for cat in $$cats; do \
2725           lang=`basename $$cat | sed 's/\.gmo$$//'`; \
2726           if [ -f $$cat ]; then :; \
2727           elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
2728           else continue; \
2729           fi; \
2730           dir=$(localedir)/$$lang/LC_MESSAGES; \
2731           rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
2732         done
2733 # Delete po/*.gmo only if we are not building in the source directory.
2734 clean-po:
2735         -if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi
2736
2737 # Rule for regenerating the message template (gdb.pot).  Instead of
2738 # forcing everyone to edit POTFILES.in, which proved impractical, this
2739 # rule has no dependencies and always regenerates gdb.pot.  This is
2740 # relatively harmless since the .po files do not directly depend on
2741 # it.  The .pot file is left in the build directory.  Since GDB's
2742 # Makefile lacks a cannonical list of sources (missing xm, tm and nm
2743 # files) force this rule.
2744 $(PACKAGE).pot: po/$(PACKAGE).pot
2745 po/$(PACKAGE).pot: force
2746         -test -d po || mkdir po
2747         sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)
2748
2749
2750 #
2751 # YACC/LEX dependencies
2752 #
2753 # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
2754 # exist in srcdir, then compiled in objdir to LANG-exp.o.  If we
2755 # said LANG-exp.c rather than ./c-exp.c some makes would
2756 # sometimes re-write it into $(srcdir)/c-exp.c.  Remove bogus
2757 # decls for malloc/realloc/free which conflict with everything else.
2758 # Strictly speaking c-exp.c should therefore depend on
2759 # Makefile.in, but that was a pretty big annoyance.
2760
2761 %.c: %.y
2762         rm -f $@ $@.tmp
2763         $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
2764                 || (rm -f $@; false)
2765         sed -e '/extern.*malloc/d' \
2766              -e '/extern.*realloc/d' \
2767              -e '/extern.*free/d' \
2768              -e '/include.*malloc.h/d' \
2769              -e 's/\([^x]\)malloc/\1xmalloc/g' \
2770              -e 's/\([^x]\)realloc/\1xrealloc/g' \
2771              -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2772              -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
2773              -e '/^#line.*y.tab.c/d' \
2774              -e 's/YY_NULL/YY_NULLPTR/g' \
2775           < $@.tmp > $@
2776         rm -f $@.tmp
2777 %.c: %.l
2778         if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
2779             $(FLEX) -o$@ $< && \
2780             rm -f $@.new && \
2781             sed -e '/extern.*malloc/d' \
2782                 -e '/extern.*realloc/d' \
2783                 -e '/extern.*free/d' \
2784                 -e '/include.*malloc.h/d' \
2785                 -e 's/\([^x]\)malloc/\1xmalloc/g' \
2786                 -e 's/\([^x]\)realloc/\1xrealloc/g' \
2787                 -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2788                 -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
2789                 -e 's/yy_flex_xrealloc/yyxrealloc/g' \
2790               < $@ > $@.new && \
2791             rm -f $@ && \
2792             mv $@.new $@; \
2793         elif [ -f $@ ]; then \
2794             echo "Warning: $*.c older than $*.l and flex not available."; \
2795         else \
2796             echo "$@ missing and flex not available."; \
2797             false; \
2798         fi
2799
2800 .PRECIOUS: ada-lex.c
2801
2802 # XML rules
2803
2804 xml-builtin.c: stamp-xml; @true
2805 stamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES)
2806         rm -f xml-builtin.tmp
2807         AWK="$(AWK)" \
2808           $(SHELL) $(srcdir)/features/feature_to_c.sh \
2809           xml-builtin.tmp $(XMLFILES)
2810         $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin.c
2811         echo stamp > stamp-xml
2812
2813 .PRECIOUS: xml-builtin.c
2814
2815 #
2816 # GDBTK sub-directory
2817 #
2818
2819 all-gdbtk: insight$(EXEEXT)
2820
2821 install-gdbtk:
2822         transformed_name=`t='$(program_transform_name)'; \
2823                   echo insight | sed -e $$t` ; \
2824         if test "x$$transformed_name" = x; then \
2825           transformed_name=insight ; \
2826         else \
2827           true ; \
2828         fi ; \
2829         $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
2830         $(INSTALL_PROGRAM) insight$(EXEEXT) \
2831                 $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
2832         $(SHELL) $(srcdir)/../mkinstalldirs \
2833                 $(DESTDIR)$(GDBTK_LIBRARY) ; \
2834         $(SHELL) $(srcdir)/../mkinstalldirs \
2835                 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \
2836         $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \
2837                 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
2838         $(SHELL) $(srcdir)/../mkinstalldirs \
2839                 $(DESTDIR)$(GDBTK_LIBRARY)/images \
2840                 $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \
2841         $(SHELL) $(srcdir)/../mkinstalldirs \
2842                 $(DESTDIR)$(GDBTK_LIBRARY)/help \
2843                 $(DESTDIR)$(GDBTK_LIBRARY)/help/images \
2844                 $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
2845         cd $(srcdir)/gdbtk/library ; \
2846         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; \
2847           do \
2848                 $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
2849           done ;
2850
2851 uninstall-gdbtk:
2852         transformed_name=`t='$(program_transform_name)'; \
2853                   echo insight | sed -e $$t` ; \
2854         if test "x$$transformed_name" = x; then \
2855                 transformed_name=insight ; \
2856         else \
2857                 true ; \
2858         fi ; \
2859         rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
2860         rm -rf $(DESTDIR)$(GDBTK_LIBRARY)
2861
2862 clean-gdbtk:
2863         rm -f insight$(EXEEXT)
2864
2865 # Removing the old gdb first works better if it is running, at least on SunOS.
2866 insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \
2867                 $(CDEPS) $(TDEPLIBS)
2868         rm -f insight$(EXEEXT)
2869         $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
2870                 -o insight$(EXEEXT) gdbtk-main.o libgdb.a \
2871                 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
2872
2873 gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
2874         $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
2875
2876 all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \
2877                 $(ITK_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
2878                 $(GDBTK_CFLAGS) \
2879                 -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
2880                 -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
2881
2882 #
2883 # Dependency tracking.
2884 #
2885
2886 ifeq ($(DEPMODE),depmode=gcc3)
2887 # Note that we put the dependencies into a .Tpo file, then move them
2888 # into place if the compile succeeds.  We need this because gcc does
2889 # not atomically write the dependency output file.
2890 override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
2891         -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
2892 override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
2893         $(@D)/$(DEPDIR)/$(basename $(@F)).Po
2894 else
2895 override COMPILE.pre = source='$<' object='$@' libtool=no \
2896         DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
2897         $(CXX) -x c++ $(CXX_DIALECT)
2898 # depcomp handles atomicity for us, so we don't need a postcompile
2899 # step.
2900 override POSTCOMPILE =
2901 endif
2902
2903 # A list of all the objects we might care about in this build, for
2904 # dependency tracking.
2905 all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \
2906         test-cp-name-parser.o
2907
2908 # Ensure that generated files are created early.  Use order-only
2909 # dependencies if available.  They require GNU make 3.80 or newer,
2910 # and the .VARIABLES variable was introduced at the same time.
2911 ifdef .VARIABLES
2912 $(all_object_files): | $(generated_files)
2913 else
2914 $(all_object_files) : $(generated_files)
2915 endif
2916
2917 # Dependencies.
2918 -include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
2919
2920 # Disable implicit make rules.
2921 include $(srcdir)/disable-implicit-rules.mk
2922
2923 ### end of the gdb Makefile.in.