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