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