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