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