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