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