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
38 exec_prefix = @
exec_prefix@
40 host_alias
= @host_alias@
41 target_alias
= @target_alias@
42 program_transform_name
= @program_transform_name@
45 tooldir
= $(libdir)/$(target_alias
)
48 localedir
= @localedir@
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
60 datarootdir
= @datarootdir@
64 includedir = @
includedir@
66 install_sh
= @install_sh@
68 # This can be referenced by `LIBINTL' as computed by
69 # ZW_GNU_GETTEXT_SISTER_DIR.
79 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
80 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
81 INSTALL_STRIP_PROGRAM
= @INSTALL_STRIP_PROGRAM@
82 INSTALL_DATA
= @INSTALL_DATA@
103 CXX_DIALECT
= @CXX_DIALECT@
105 # Dependency tracking information.
106 DEPMODE
= @CCDEPMODE@
108 depcomp
= $(SHELL
) $(srcdir)/..
/depcomp
110 # Directory containing source files.
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
$@
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
) \
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.
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
148 # Set this up with gcc if you have gnu ld and the loader will print out
149 # line numbers for undefined references.
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.
164 CTF_DEPS
= @CTF_DEPS@
166 # Where is the BFD library? Typically in ../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.
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.
200 # Where is libbabeltrace? This will be empty if libbabeltrace was not
202 LIBBABELTRACE
= @LIBBABELTRACE@
204 # Where is libxxhash? This will be empty if libxxhash was not
206 LIBXXHASH
= @LIBXXHASH@
208 # Where is libipt? This will be empty if libipt was not available.
211 # How to find GMP and MPFR
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.
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@
248 CODESIGN_CERT
= @CODESIGN_CERT@
250 # Flags to pass to gdb when invoked with "make run".
253 # Helper code from gnulib.
254 GNULIB_PARENT_DIR
= ..
255 include $(GNULIB_PARENT_DIR
)/gnulib
/Makefile.gnulib.inc
258 LIBBACKTRACE_INC
=@LIBBACKTRACE_INC@
259 LIBBACKTRACE_LIB
=@LIBBACKTRACE_LIB@
261 SUPPORT
= ..
/gdbsupport
262 LIBSUPPORT
= $(SUPPORT
)/libgdbsupport.a
268 # CLI sub directory definitons
282 SUBDIR_CLI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_CLI_SRCS
))
285 # MI sub directory definitons
307 SUBDIR_MI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_MI_SRCS
))
310 # TUI sub directory definitions
327 tui
/tui-wingeneral.c \
330 SUBDIR_TUI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_TUI_SRCS
))
334 SUBDIR_TUI_CFLAGS
= -DTUI
=1
337 # GCC Compile support sub-directory definitions
339 SUBDIR_GCC_COMPILE_SRCS
= \
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
= \
358 guile
/scm-auto-load.c \
360 guile
/scm-breakpoint.c \
363 guile
/scm-exception.c \
366 guile
/scm-iterator.c \
367 guile
/scm-lazy-string.c \
369 guile
/scm-objfile.c \
372 guile
/scm-pretty-print.c \
373 guile
/scm-progspace.c \
374 guile
/scm-safe-call.c \
382 SUBDIR_GUILE_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_GUILE_SRCS
))
385 SUBDIR_GUILE_LDFLAGS
=
386 SUBDIR_GUILE_CFLAGS
=
389 # python sub directory definitons
391 SUBDIR_PYTHON_SRCS
= \
393 python
/py-auto-load.c \
395 python
/py-bpevent.c \
396 python
/py-breakpoint.c \
398 python
/py-connection.c \
399 python
/py-continueevent.c \
403 python
/py-evtregistry.c \
405 python
/py-exitedevent.c \
406 python
/py-finishbreakpoint.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 \
420 python
/py-newobjfileevent.c \
421 python
/py-objfile.c \
423 python
/py-prettyprint.c \
424 python
/py-progspace.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 \
433 python
/py-threadevent.c \
440 python
/py-xmethods.c \
443 SUBDIR_PYTHON_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_PYTHON_SRCS
))
446 SUBDIR_PYTHON_LDFLAGS
=
447 SUBDIR_PYTHON_CFLAGS
=
451 gdbarch-selftests.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
505 # Where is the "-lopcodes" library, with (some of) the opcode tables and
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
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.
523 WIN32LIBS
= @WIN32LIBS@
525 # Tcl et al cflags and libraries
527 TCL_CFLAGS
= @TCL_INCLUDE@
528 GDBTKLIBS
= @GDBTKLIBS@
529 # Extra flags that the GDBTK files need:
530 GDBTK_CFLAGS
= @GDBTK_CFLAGS@
533 TK_CFLAGS
= @TK_INCLUDE@
535 X11_CFLAGS
= @TK_XINCLUDES@
539 WIN32LDAPP
= @WIN32LDAPP@
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.
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@
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 \
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).
610 -include $(srcdir)/defs.h \
611 -DLOCALEDIR
="\"$(localedir)\"" \
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".
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@ \
634 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
645 $(LIBDECNUMBER_CFLAGS
) \
649 $(LIBBACKTRACE_INC
) \
651 $(INTERNAL_CPPFLAGS
) \
655 $(DEBUGINFOD_CFLAGS
) \
657 $(AMD_DBGAPI_CFLAGS
) \
661 # LDFLAGS is specifically reserved for setting from the command line
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.
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
) \
693 # XML files to build in to GDB.
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.
709 SER_HARDWIRE
= @SER_HARDWIRE@
711 # This is remote-sim.o if a simulator is to be linked in.
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
= \
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 \
733 alpha-mdebug-tdep.o \
734 alpha-netbsd-tdep.o \
737 amd64-darwin-tdep.o \
741 amd64-netbsd-tdep.o \
743 amd64-ravenscar-thread.o \
746 amd64-windows-tdep.o \
748 arch
/aarch64-insn.o \
749 arch
/aarch64-mte-linux.o \
750 arch
/aarch64-scalable-linux.o \
757 loongarch-linux-tdep.o \
768 riscv-ravenscar-thread.o \
770 sparc64-fbsd-tdep.o \
771 sparc64-linux-tdep.o \
772 sparc64-netbsd-tdep.o \
773 sparc64-obsd-tdep.o \
774 sparc64-sol2-tdep.o \
776 tilegx-linux-tdep.o \
780 # All other target-dependent objects files (used with --enable-targets=all).
789 arch
/arm-get-next-pcs.o \
793 arch
/ppc-linux-common.o \
835 i386-windows-tdep.o \
849 microblaze-linux-tdep.o \
851 mn10300-linux-tdep.o \
867 ppc-ravenscar-thread.o \
873 rs6000-lynx178-tdep.o \
889 sparc-netbsd-tdep.o \
891 sparc-ravenscar-thread.o \
905 xtensa-linux-tdep.o \
909 # The following native-target dependent variables are defined on
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@
919 HAVE_NATIVE_GCORE_HOST
= @HAVE_NATIVE_GCORE_HOST@
921 # Native-target dependent makefile fragment comes in here.
924 # End of native-target dependent variables.
928 "exec_prefix=$(exec_prefix)" \
929 "infodir=$(infodir)" \
930 "datarootdir=$(datarootdir)" \
932 "htmldir=$(htmldir)" \
936 "datadir=$(datadir)" \
937 "includedir=$(includedir)" \
938 "against=$(against)" \
939 "DESTDIR=$(DESTDIR)" \
941 "AR_FLAGS=$(AR_FLAGS)" \
945 "CXX_DIALECT=$(CXX_DIALECT)" \
946 "CXXFLAGS=$(CXXFLAGS)" \
947 "DLLTOOL=$(DLLTOOL)" \
948 "LDFLAGS=$(LDFLAGS)" \
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@
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/; \
972 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
975 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
978 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
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/; \
987 echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
990 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
993 t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
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)" \
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.
1046 break-catch-exec.c \
1047 break-catch-fork.c \
1048 break-catch-load.c \
1050 break-catch-syscall.c \
1051 break-catch-throw.c \
1082 debuginfod-support.c \
1085 displaced-stepping.c \
1088 dwarf2
/abbrev-cache.c \
1089 dwarf2
/ada-imported.c \
1091 dwarf2
/attribute.c \
1092 dwarf2
/comp-unit-head.c \
1093 dwarf2
/cooked-index.c \
1098 dwarf2
/frame-tailcall.c \
1100 dwarf2
/index-cache.c \
1101 dwarf2
/index-common.c \
1102 dwarf2
/index-write.c \
1104 dwarf2
/line-header.c \
1108 dwarf2
/read-debug-names.c \
1109 dwarf2
/read-gdb-index.c \
1111 dwarf2
/stringify.c \
1121 filename-seen-cache.c \
1160 maint-test-options.c \
1161 maint-test-settings.c \
1184 process-stratum-target.c \
1187 progspace-and-thread.c \
1200 run-on-main-thread.c \
1220 target-connection.c \
1222 target-descriptions.c \
1253 # Links made at configuration time should not be specified here, since
1254 # SFILES is used in building the distribution archive.
1278 $(SUBDIR_CLI_SRCS
) \
1280 $(SUBDIR_TARGET_SRCS
) \
1282 $(SUBDIR_GCC_COMPILE_SRCS
)
1284 # Header files that need to have srcdir added. Note that in the cases
1285 # where we use a macro like $(gdbcmd_h), things are carefully arranged
1286 # so that each .h file is listed exactly once (M-x tags-search works
1287 # wrong if TAGS has files twice). Because this is tricky to get
1288 # right, it is probably easiest just to list .h files here directly.
1290 HFILES_NO_SRCDIR
= \
1292 aarch64-ravenscar-thread.h \
1298 amd-dbgapi-target.h \
1299 amd64-darwin-tdep.h \
1300 amd64-linux-tdep.h \
1302 amd64-ravenscar-thread.h \
1348 dwarf2
/cooked-index.h \
1350 dwarf2
/frame-tailcall.h \
1353 dwarf2
/index-cache.h \
1354 dwarf2
/index-common.h \
1357 dwarf2
/read-debug-names.h \
1358 dwarf2
/read-gdb-index.h \
1380 gdb_proc_service.h \
1395 hppa-linux-offsets.h \
1398 i386-darwin-tdep.h \
1403 ia64-libunwind-tdep.h \
1434 mips-netbsd-tdep.h \
1457 ppc-ravenscar-thread.h \
1464 progspace-and-thread.h \
1467 ravenscar-thread.h \
1477 riscv-ravenscar-thread.h \
1480 run-on-main-thread.h \
1503 sparc-ravenscar-thread.h \
1514 target-descriptions.h \
1550 arch
/aarch64-insn.h \
1551 arch
/aarch64-mte-linux.h \
1552 arch
/aarch64-scalable-linux.h \
1557 arch
/ppc-linux-common.h \
1558 arch
/ppc-linux-tdesc.h \
1567 compile
/compile-c.h \
1568 compile
/compile-cplus.h \
1569 compile
/compile-internal.h \
1570 compile
/compile-object-load.h \
1571 compile
/compile-object-run.h \
1572 compile
/gcc-c-plugin.h \
1573 compile
/gcc-cp-plugin.h \
1576 config
/djgpp
/langinfo.h \
1577 config
/djgpp
/nl_types.h \
1578 config
/i386
/nm-i386gnu.h \
1579 config
/sparc
/nm-sol2.h \
1587 nat
/aarch64-linux.h \
1588 nat
/aarch64-linux-hw-point.h \
1589 nat
/aarch64-mte-linux-ptrace.h \
1590 nat
/aarch64-scalable-linux-ptrace.h \
1591 nat
/aarch64-scalable-linux-sigcontext.h \
1592 nat
/amd64-linux-siginfo.h \
1594 nat
/gdb_thread_db.h \
1595 nat
/fork-inferior.h \
1596 nat
/linux-btrace.h \
1597 nat
/linux-namespaces.h \
1599 nat
/linux-osdata.h \
1600 nat
/linux-personality.h \
1601 nat
/linux-ptrace.h \
1602 nat
/linux-waitpid.h \
1603 nat
/mips-linux-watch.h \
1607 nat
/x86-gcc-cpuid.h \
1609 nat
/x86-linux-dregs.h \
1611 python
/py-events.h \
1612 python
/py-stopevent.h \
1614 python
/python-internal.h \
1615 regformats
/regdef.h \
1619 target
/waitstatus.h \
1628 tui
/tui-location.h \
1633 tui
/tui-wingeneral.h \
1634 tui
/tui-winsource.h \
1637 # Header files that already have srcdir in them, or which are in objdir.
1639 HFILES_WITH_SRCDIR
= \
1643 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1644 # default their values the way we do for SER_HARDWIRE; in the future
1645 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1646 # variables analogous to SER_HARDWIRE which get defaulted in this
1649 DEPFILES
= $(TARGET_OBS
) $(SER_HARDWIRE
) $(NATDEPFILES
) $(SIM_OBS
)
1654 arch
/aarch64-insn.c \
1655 arch
/aarch64-mte-linux.c \
1656 arch
/aarch64-scalable-linux.c \
1660 arch
/arm-get-next-pcs.c \
1664 arch
/ppc-linux-common.c \
1668 aarch64-fbsd-nat.c \
1669 aarch64-fbsd-tdep.c \
1670 aarch64-linux-nat.c \
1671 aarch64-linux-tdep.c \
1672 aarch64-newlib-tdep.c \
1673 aarch64-ravenscar-thread.c \
1679 alpha-linux-tdep.c \
1680 alpha-mdebug-tdep.c \
1681 alpha-netbsd-tdep.c \
1684 amd-dbgapi-target.c \
1686 amd64-darwin-tdep.c \
1687 amd64-dicos-tdep.c \
1691 amd64-linux-tdep.c \
1693 amd64-netbsd-nat.c \
1694 amd64-netbsd-tdep.c \
1697 amd64-ravenscar-thread.c \
1734 hppa-netbsd-tdep.c \
1741 i386-darwin-tdep.c \
1750 i386-netbsd-tdep.c \
1756 i386-windows-tdep.c \
1758 ia64-libunwind-tdep.c \
1768 loongarch-linux-nat.c \
1769 loongarch-linux-tdep.c \
1780 microblaze-linux-tdep.c \
1788 mips-netbsd-tdep.c \
1792 mips64-obsd-tdep.c \
1797 nios2-linux-tdep.c \
1811 ppc-ravenscar-thread.c \
1815 ravenscar-thread.c \
1820 riscv-linux-tdep.c \
1822 riscv-ravenscar-thread.c \
1826 rs6000-lynx178-tdep.c \
1845 sparc-linux-tdep.c \
1847 sparc-netbsd-nat.c \
1848 sparc-netbsd-tdep.c \
1850 sparc-ravenscar-thread.c \
1854 sparc64-fbsd-nat.c \
1855 sparc64-fbsd-tdep.c \
1856 sparc64-linux-nat.c \
1857 sparc64-linux-tdep.c \
1859 sparc64-netbsd-nat.c \
1860 sparc64-netbsd-tdep.c \
1861 sparc64-obsd-nat.c \
1862 sparc64-obsd-tdep.c \
1863 sparc64-sol2-tdep.c \
1865 tilegx-linux-nat.c \
1866 tilegx-linux-tdep.c \
1879 xtensa-linux-nat.c \
1880 xtensa-linux-tdep.c \
1884 # Don't include YYFILES (*.c) because we already include *.y in SFILES,
1885 # and it's more useful to see it in the .y file.
1886 TAGFILES_NO_SRCDIR
= $(SFILES
) $(HFILES_NO_SRCDIR
) $(ALLDEPFILES
) \
1888 TAGFILES_WITH_SRCDIR
= $(HFILES_WITH_SRCDIR
)
1890 COMMON_OBS
= $(DEPFILES
) $(CONFIG_OBS
) $(YYOBJ
) \
1894 $(patsubst %.c
,%.o
,$(COMMON_SFILES
)) \
1897 $(SUBDIR_TARGET_OBS
) \
1898 $(SUBDIR_GCC_COMPILE_OBS
)
1900 SUBDIRS
= doc @subdirs@ data-directory
1901 CLEANDIRS
= $(SUBDIRS
)
1903 # List of subdirectories in the build tree that must exist.
1904 # This is used to force build failures in existing trees when
1905 # a new directory is added.
1906 # The format here is for the `case' shell command.
1907 REQUIRED_SUBDIRS
= doc | testsuite | data-directory
1909 # Parser intermediate files.
1921 # ada-lex.c is included by another file, so it shouldn't wind up as a
1923 YYOBJ
= $(filter-out ada-lex.o
,$(patsubst %.c
,%.o
,$(YYFILES
)))
1925 # Things which need to be built when making a distribution.
1927 DISTSTUFF
= $(YYFILES
)
1930 # All generated files which can be included by another file.
1935 $(NAT_GENERATED_FILES
) \
1938 # Flags needed to compile Python code
1939 PYTHON_CFLAGS
= @PYTHON_CFLAGS@
1941 all: gdb
$(EXEEXT
) $(CONFIG_ALL
) gdb-gdb.py gdb-gdb.gdb gcore
1942 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all "DODIRS=$(SUBDIRS)" subdir_do
1944 # Rule for compiling .c files in the top-level gdb directory.
1945 # The order-only dependencies ensure that we create the build subdirectories.
1946 %.o
: %.c |
$(CONFIG_DEP_SUBDIR
)
1950 $(CONFIG_DEP_SUBDIR
):
1951 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$@
1953 # Python files need special flags.
1954 python
/%.o
: INTERNAL_CFLAGS
+= $(PYTHON_CFLAGS
)
1956 # Rules for compiling .c files in the various source subdirectories.
1957 %.o
: $(srcdir)/gdbtk
/generic
/%.c
1958 $(COMPILE
) $(all_gdbtk_cflags
) $<
1963 # The check target can not use subdir_do, because subdir_do does not
1964 # use TARGET_FLAGS_TO_PASS.
1966 @if
[ -f testsuite
/Makefile
]; then \
1967 rootme
=`pwd`; export rootme
; \
1968 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1970 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check; \
1974 @if
[ -f testsuite
/Makefile
]; then \
1975 rootme
=`pwd`; export rootme
; \
1976 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1978 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-perf
; \
1981 check-read1 check-readmore
: force
1982 @if
[ -f testsuite
/Makefile
]; then \
1983 rootme
=`pwd`; export rootme
; \
1984 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1986 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $@
; \
1989 check-parallel
: force
1990 @if
[ -f testsuite
/Makefile
]; then \
1991 rootme
=`pwd`; export rootme
; \
1992 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1994 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-parallel
; \
1997 check-all-boards
: force
1998 @if
[ -f testsuite
/Makefile
]; then \
1999 rootme
=`pwd`; export rootme
; \
2000 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
2002 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-all-boards
; \
2005 # The idea is to parallelize testing of multilibs, for example:
2006 # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
2007 # will run 3 concurrent sessions of check, eventually testing all 10
2008 # combinations. GNU make is required for the % pattern to work, as is
2009 # a shell that expands alternations within braces. If GNU make is not
2010 # used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to
2011 # prevent serialized checking due to the passed RUNTESTFLAGS.
2012 # FIXME: use config.status --config not --version, when available.
2014 @if
[ -f testsuite
/config.status
]; then \
2015 rootme
=`pwd`; export rootme
; \
2016 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
2017 target
=`echo "$@" | sed 's,//.*,,'`; \
2018 variant
=`echo "$@" | sed 's,^[^/]*//,,'`; \
2019 vardots
=`echo "$$variant" | sed 's,/,.,g'`; \
2020 testdir
=testsuite.
$$vardots; \
2021 if
[ ! -f
$$testdir/Makefile
] && [ -f testsuite
/config.status
]; then \
2022 configargs
=`cd testsuite && ./config.status --version | \
2023 sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
2024 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$$testdir && \
2026 eval
$(SHELL
) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
2027 "\"--srcdir=\$$rootsrc/testsuite\"" \
2029 else :; fi
&& cd
$$testdir && \
2030 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) \
2031 RUNTESTFLAGS
="--target_board=$$variant $(RUNTESTFLAGS)" \
2032 FORCE_PARALLEL
=$(if
$(FORCE_PARALLEL
),1,$(if
$(RUNTESTFLAGS
),,1)) \
2036 # The set of headers checked by 'check-headers' by default.
2037 CHECK_HEADERS
= $(HFILES_NO_SRCDIR
)
2039 # Try to compile each header in isolation, thus ensuring headers are
2042 # Defaults to checking all $HFILES_NO_SRCDIR headers.
2046 # make check-headers CHECK_HEADERS="header.h list.h"
2048 # to check specific headers.
2051 @echo Checking headers.
2052 for i in
$(CHECK_HEADERS
) ; do \
2053 $(CXX
) $(CXX_DIALECT
) -x c
++-header
-c
-fsyntax-only \
2054 $(INTERNAL_CFLAGS
) $(CXXFLAGS
) $(srcdir)/$$i ; \
2056 .PHONY
: check-headers
2058 info install-info clean-info
dvi install-dvi pdf install-pdf html install-html
: force
2059 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
2061 # Traditionally "install" depends on "all". But it may be useful
2062 # not to; for example, if the user has made some trivial change to a
2063 # source file and doesn't care about rebuilding or just wants to save the
2064 # time it takes for make to check that all is up to date.
2065 # install-only is intended to address that need.
2067 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
2069 install-only
: $(CONFIG_INSTALL
)
2070 transformed_name
=`t='$(program_transform_name)'; \
2071 echo gdb | sed -e "$$t"` ; \
2072 if
test "x$$transformed_name" = x
; then \
2073 transformed_name
=gdb
; \
2077 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
2078 $(INSTALL_PROGRAM_ENV
) $(LIBTOOL
) --mode
=install $(INSTALL_PROGRAM
) \
2080 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2081 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(includedir)/gdb
; \
2082 $(INSTALL_DATA
) jit-reader.h
$(DESTDIR
)$(includedir)/gdb
/jit-reader.h
2083 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
2085 transformed_name
=`t='$(program_transform_name)'; \
2086 echo gcore | sed -e "$$t"` ; \
2087 if
test "x$$transformed_name" = x
; then \
2088 transformed_name
=gcore
; \
2092 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
2093 $(INSTALL_SCRIPT
) gcore \
2094 $(DESTDIR
)$(bindir)/$$transformed_name; \
2096 transformed_name
=`t='$(program_transform_name)'; \
2097 echo gdb-add-index | sed -e "$$t"` ; \
2098 if
test "x$$transformed_name" = x
; then \
2099 transformed_name
=gdb-add-index
; \
2103 $(INSTALL_SCRIPT
) $(srcdir)/contrib
/gdb-add-index.sh \
2104 $(DESTDIR
)$(bindir)/$$transformed_name
2105 @
$(MAKE
) DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
2108 $(MAKE
) $(FLAGS_TO_PASS
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" \
2109 install_sh_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG
=-s \
2110 `test -z '$(STRIP)' || \
2111 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
2114 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/guile
/gdb
2117 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/python
/gdb
2119 uninstall: force $(CONFIG_UNINSTALL
)
2120 transformed_name
=`t='$(program_transform_name)'; \
2121 echo gdb | sed -e $$t` ; \
2122 if
test "x$$transformed_name" = x
; then \
2123 transformed_name
=gdb
; \
2127 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
)
2128 rm -f
$(DESTDIR
)$(includedir)/gdb
/jit-reader.h
2129 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
2131 transformed_name
=`t='$(program_transform_name)'; \
2132 echo gcore | sed -e "$$t"` ; \
2133 if
test "x$$transformed_name" = x
; then \
2134 transformed_name
=gcore
; \
2138 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name; \
2140 transformed_name
=`t='$(program_transform_name)'; \
2141 echo gdb-add-index | sed -e "$$t"` ; \
2142 if
test "x$$transformed_name" = x
; then \
2143 transformed_name
=gdb-add-index
; \
2147 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name
2148 @
$(MAKE
) DO
=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
2150 # The C++ name parser can be built standalone for testing.
2151 test-cp-name-parser.o
: cp-name-parser.c
2152 $(COMPILE
) -DTEST_CPNAMES cp-name-parser.c
2155 test-cp-name-parser
$(EXEEXT
): test-cp-name-parser.o
$(LIBIBERTY
)
2156 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) \
2157 -o test-cp-name-parser
$(EXEEXT
) test-cp-name-parser.o \
2160 # We do this by grepping through sources. If that turns out to be too slow,
2161 # maybe we could just require every .o file to have an initialization routine
2162 # of a given name (top.o -> _initialize_top, etc.).
2164 # Note that the set of files with init functions might change, or the names
2165 # of the functions might change, so this files needs to depend on all the
2166 # source files that will be linked into gdb. However, due to the way
2167 # this Makefile has generally been written, we do this indirectly, by
2168 # computing the list of source files from the list of object files.
2170 INIT_FILES_FILTER_OUT
= \
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
2186 $(SILENCE
) $(srcdir)/make-init-c
$(addprefix $(srcdir)/,$(INIT_FILES
)) > init.c-tmp
2187 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change init.c-tmp init.c
2188 $(SILENCE
) echo stamp
> stamp-init
2192 # Create a library of the gdb object files and build GDB by linking
2195 # init.o is very important. It pulls in the rest of GDB.
2196 LIBGDB_OBS
= $(sort $(COMMON_OBS
)) init.o
2197 libgdb.a
: $(LIBGDB_OBS
)
2199 $(AR
) q libgdb.a
$(LIBGDB_OBS
)
2202 # Removing the old gdb first works better if it is running, at least on SunOS.
2203 gdb
$(EXEEXT
): gdb.o
$(LIBGDB_OBS
) $(CDEPS
) $(TDEPLIBS
)
2204 $(SILENCE
) rm -f gdb
$(EXEEXT
)
2205 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
2206 -o gdb
$(EXEEXT
) gdb.o
$(LIBGDB_OBS
) \
2207 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
2208 ifneq ($(CODESIGN_CERT
),)
2209 $(ECHO_SIGN
) $(CODESIGN
) -s
$(CODESIGN_CERT
) gdb
$(EXEEXT
)
2212 # This is useful when debugging GDB, because some Unix's don't let you run GDB
2213 # on itself without copying the executable. So "make gdb1" will make
2214 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
2215 # Removing gdb1 before the copy is the right thing if gdb1 is open
2216 # in another process.
2217 gdb1
$(EXEEXT
): gdb
$(EXEEXT
)
2219 cp gdb
$(EXEEXT
) gdb1
$(EXEEXT
)
2221 # Put the proper machine-specific files first, so M-. on a machine
2222 # specific routine gets the one for the correct machine. (FIXME: those
2223 # files go in twice; we should be removing them from the main list).
2225 # TAGS depends on all the files that go into it so you can rebuild TAGS
2226 # with `make TAGS' and not have to say `rm TAGS' first.
2228 GDB_NM_FILE
= @GDB_NM_FILE@
2229 TAGS
: $(TAGFILES_NO_SRCDIR
) $(TAGFILES_WITH_SRCDIR
)
2231 etags
`(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
2232 `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
2233 echo $(srcdir)/$$i ; \
2234 done ; for i in $(TAGFILES_WITH_SRCDIR); do \
2236 done) | sed -e 's/\.o$$/\.c/'` \
2237 `find $(srcdir)/config -name '*.h' -print`
2241 clean mostlyclean: $(CONFIG_CLEAN
)
2242 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=clean "DODIRS=$(CLEANDIRS)" subdir_do
2243 rm -f
*.o
*.a
*~ init.c-tmp init.l-tmp version.c-tmp
2244 rm -f init.c stamp-init version.c stamp-version
2245 rm -f gdb
$(EXEEXT
) core make.log
2246 rm -f gdb
[0-9]$(EXEEXT
)
2247 rm -f test-cp-name-parser
$(EXEEXT
)
2248 rm -f xml-builtin.c stamp-xml
2250 for i in
$(CONFIG_SRC_SUBDIR
); do \
2252 rm -f
$$i/$(DEPDIR
)/*; \
2255 # This used to depend on c-exp.c m2-exp.c TAGS
2256 # I believe this is wrong; the makefile standards for distclean just
2257 # describe removing files; the only sort of "re-create a distribution"
2258 # functionality described is if the distributed files are unmodified.
2260 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=distclean "DODIRS=$(CLEANDIRS)" subdir_do
2261 rm -f nm.h config.status config.h stamp-h b jit-reader.h gcore stamp-nmh
2262 rm -f gdb-gdb.py gdb-gdb.gdb
2263 rm -f y.output
yacc.acts
yacc.tmp y.tab.h
2264 rm -f config.log config.cache
2265 rm -f config.lt libtool
2268 for i in
$(CONFIG_SRC_SUBDIR
); do \
2269 if
test -d
$$i/$(DEPDIR
); then rmdir
$$i/$(DEPDIR
); fi \
2272 maintainer-clean
: local-maintainer-clean do-maintainer-clean
distclean
2273 realclean: maintainer-clean
2275 local-maintainer-clean
:
2276 @echo
"This command is intended for maintainers to use;"
2277 @echo
"it deletes files that may require special tools to rebuild."
2280 ada-lex.c ada-exp.c \
2281 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c
2284 rm -f nm.h config.status
2286 do-maintainer-clean
:
2287 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=maintainer-clean
"DODIRS=$(CLEANDIRS)" \
2290 diststuff
: $(DISTSTUFF
) $(PACKAGE
).pot
$(CATALOGS
)
2291 cd doc
; $(MAKE
) $(MFLAGS
) diststuff
2294 @for i in
$(DODIRS
); do \
2296 $(REQUIRED_SUBDIRS
)) \
2297 if
[ ! -f .
/$$i/Makefile
] ; then \
2298 echo
"Missing $$i/Makefile" >&2 ; \
2302 if
[ -f .
/$$i/Makefile
] ; then \
2304 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
2305 else exit
1 ; fi
; \
2309 Makefile
: Makefile.in config.status
2310 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) $@
2314 .
/gdb
$(EXEEXT
) --data-directory
=`pwd`/data-directory
$(GDBFLAGS
)
2316 jit-reader.h
: $(srcdir)/jit-reader.in config.status
2317 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) $@
2319 gcore
: $(srcdir)/gcore.in config.status
2320 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) $@
2322 gdb-gdb.py
: $(srcdir)/gdb-gdb.py.in config.status
2323 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) $@
2325 gdb-gdb.gdb
: $(srcdir)/gdb-gdb.gdb.in config.status
2326 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) $@
2328 config.h
: stamp-h
; @true
2329 stamp-h
: $(srcdir)/config.in config.status
2330 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) config.h
2332 nm.h
: stamp-nmh
; @true
2333 stamp-nmh
: config.status
2334 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) nm.h
2336 # Files included from config.status or the configure script. When
2337 # these change the configure script doesn't need regenerating, but its
2338 # output (and so that of config.status) might change.
2339 config_status_deps
= \
2340 $(srcdir)/configure \
2341 $(srcdir)/configure.nat \
2342 $(srcdir)/configure.tgt \
2343 $(srcdir)/configure.host \
2344 $(srcdir)/..
/bfd
/development.sh \
2345 $(srcdir)/..
/bfd
/config.bfd
2347 config.status
: $(config_status_deps
)
2348 $(ECHO_GEN
) $(SHELL
) config.status
$(SILENT_FLAG
) --recheck
2352 # Keep these in sync with the includes in acinclude.m4.
2355 acx_configure_dir.m4 \
2358 ..
/config
/acinclude.m4 \
2359 ..
/config
/enable.m4 \
2360 ..
/config
/plugins.m4 \
2361 ..
/config
/lead-dot.m4 \
2362 ..
/config
/override.m4 \
2363 ..
/config
/largefile.m4 \
2364 ..
/config
/gettext-sister.m4 \
2365 ..
/config
/lib-ld.m4 \
2366 ..
/config
/lib-prefix.m4 \
2367 ..
/config
/lib-link.m4 \
2370 ..
/config
/depstand.m4 \
2371 ..
/config
/lcmessage.m4 \
2372 ..
/config
/codeset.m4 \
2375 ..
/config
/ax_pthread.m4
2377 $(srcdir)/aclocal.m4
: @MAINTAINER_MODE_TRUE@
$(aclocal_m4_deps
)
2378 cd
$(srcdir) && $(ACLOCAL
)
2381 configure_deps
= $(srcdir)/configure.ac
$(srcdir)/aclocal.m4
2382 $(srcdir)/configure
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2383 cd
$(srcdir) && $(AUTOCONF
)
2385 AUTOHEADER
= autoheader
2386 $(srcdir)/config.in
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2387 cd
$(srcdir) && $(AUTOHEADER
)
2391 # automatic rebuilding in automake-generated Makefiles requires
2392 # this rule in the toplevel Makefile, which, with GNU make, causes
2393 # the desired updates through the implicit regeneration of the Makefile
2394 # and all of its prerequisites.
2401 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
2403 cd doc
; $(MAKE
) refcard.
dvi $(FLAGS_TO_PASS
)
2405 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
2407 cd doc
; $(MAKE
) refcard.ps
$(FLAGS_TO_PASS
)
2409 # GDB MANUAL: TeX dvi file
2411 cd doc
; $(MAKE
) gdb.
dvi $(FLAGS_TO_PASS
)
2413 # GDB MANUAL: info file
2415 cd doc
; $(MAKE
) gdb.
info $(FLAGS_TO_PASS
)
2417 # Make copying.c from COPYING
2418 $(srcdir)/copying.c
: @MAINTAINER_MODE_TRUE@
$(srcdir)/..
/COPYING3
$(srcdir)/copying.awk
2419 awk
-f
$(srcdir)/copying.awk \
2420 < $(srcdir)/..
/COPYING3
> $(srcdir)/copying.tmp
2421 mv
$(srcdir)/copying.tmp
$(srcdir)/copying.c
2423 version.c
: stamp-version
; @true
2424 # Note that the obvious names for the temp file are taken by
2425 # create-version.sh.
2426 stamp-version
: Makefile version.in
$(srcdir)/..
/bfd
/version.h
$(srcdir)/..
/gdbsupport
/create-version.sh
2427 $(ECHO_GEN
) $(SHELL
) $(srcdir)/..
/gdbsupport
/create-version.sh
$(srcdir) \
2428 $(host_alias
) $(target_alias
) version-t.t
2429 @
$(SHELL
) $(srcdir)/..
/move-if-change version-t.t version.c
2430 @echo stamp
> stamp-version
2433 gdb.cxref
: $(SFILES
)
2434 cxref
-I.
$(SFILES
) >gdb.cxref
2438 # GNU Make has an annoying habit of putting *all* the Makefile variables
2439 # into the environment, unless you include this target as a circumvention.
2440 # Rumor is that this will be fixed (and this target can be removed)
2444 # GNU Make 3.63 has a different problem: it keeps tacking command line
2445 # overrides onto the definition of $(MAKE). This variable setting
2449 # Some files need explicit build rules (due to -Werror problems) or due
2450 # to sub-directory fun 'n' games.
2452 # ada-exp.c can appear in srcdir, for releases; or in ., for
2453 # development builds.
2454 ADA_EXP_C
= `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
2456 ada-exp.o
: ada-exp.c
2457 $(COMPILE
) $(ADA_EXP_C
)
2460 # Message files. Based on code in gcc/Makefile.in.
2462 # Rules for generating translated message descriptions. Disabled by
2463 # autoconf if the tools are not available.
2465 .PHONY
: all-po install-po uninstall-po clean-po update-po
$(PACKAGE
).pot
2469 # This notation should be acceptable to all Make implementations used
2470 # by people who are interested in updating .po files.
2471 update-po
: $(CATALOGS
:.gmo
=.pox
)
2473 # N.B. We do not attempt to copy these into $(srcdir). The snapshot
2476 -test -d po || mkdir po
2477 $(GMSGFMT
) --statistics
-o
$@
$<
2479 # The new .po has to be gone over by hand, so we deposit it into
2480 # build/po with a different extension. If build/po/$(PACKAGE).pot
2481 # exists, use it (it was just created), else use the one in srcdir.
2483 -test -d po || mkdir po
2484 $(MSGMERGE
) $< `if test -f po/$(PACKAGE).pot; \
2485 then echo po/$(PACKAGE).pot; \
2486 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o
$@
2488 # This rule has to look for .gmo modules in both srcdir and the cwd,
2489 # and has to check that we actually have a catalog for each language,
2490 # in case they weren't built or included with the distribution.
2492 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(datadir)
2493 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2494 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2495 if
[ -f
$$cat ]; then
:; \
2496 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2499 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2500 echo
$(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir; \
2501 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir || exit
1; \
2502 echo
$(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2503 $(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2506 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2507 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2508 if
[ -f
$$cat ]; then
:; \
2509 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2512 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2513 rm -f
$(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2515 # Delete po/*.gmo only if we are not building in the source directory.
2517 -if
[ ! -f Makefile.in
]; then
rm -f po
/*.gmo
; fi
2519 # Rule for regenerating the message template (gdb.pot). Instead of
2520 # forcing everyone to edit POTFILES.in, which proved impractical, this
2521 # rule has no dependencies and always regenerates gdb.pot. This is
2522 # relatively harmless since the .po files do not directly depend on
2523 # it. The .pot file is left in the build directory. Since GDB's
2524 # Makefile lacks a cannonical list of sources (missing xm, tm and nm
2525 # files) force this rule.
2526 $(PACKAGE
).pot
: po
/$(PACKAGE
).pot
2527 po
/$(PACKAGE
).pot
: force
2528 -test -d po || mkdir po
2529 sh
-e
$(srcdir)/po
/gdbtext
$(XGETTEXT
) $(PACKAGE
) .
$(srcdir)
2533 # YACC/LEX dependencies
2535 # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
2536 # exist in srcdir, then compiled in objdir to LANG-exp.o. If we
2537 # said LANG-exp.c rather than ./c-exp.c some makes would
2538 # sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus
2539 # decls for malloc/realloc/free which conflict with everything else.
2540 # Strictly speaking c-exp.c should therefore depend on
2541 # Makefile.in, but that was a pretty big annoyance.
2544 $(ECHO_YACC
) $(SHELL
) $(YLWRAP
) $< y.tab.c
$@.tmp
-- \
2545 $(YACC
) $(YFLAGS
) ||
(rm -f
$@.tmp
; false
)
2546 @sed
-e
'/extern.*malloc/d' \
2547 -e
'/extern.*realloc/d' \
2548 -e
'/extern.*free/d' \
2549 -e
'/include.*malloc.h/d' \
2550 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2551 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2552 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2553 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2554 -e
'/^#line.*y.tab.c/d' \
2555 -e
's/YY_NULL/YY_NULLPTR/g' \
2556 -e
"s/YYSTYPE/$(subst -,_,$*)_YYSTYPE/g" \
2557 -e
"s/yyalloc/$(subst -,_,$*)_yyalloc/g" \
2558 -e
"s/yysymbol_kind_t/$(subst -,_,$*)_yysymbol_kind_t/g" \
2559 < $@.tmp
> $@.new
&& \
2563 $(ECHO_LEX
) $(FLEX
) -t
$< > $@.tmp ||
(rm -f
$@.tmp
; false
)
2564 @sed
-e
'/extern.*malloc/d' \
2565 -e
'/extern.*realloc/d' \
2566 -e
'/extern.*free/d' \
2567 -e
'/include.*malloc.h/d' \
2568 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2569 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2570 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2571 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2572 -e
's/yy_flex_xrealloc/yyxrealloc/g' \
2573 < $@.tmp
> $@.new
&& \
2579 xml-builtin.c
: stamp-xml
; @true
2580 stamp-xml
: $(srcdir)/features
/feature_to_c.sh Makefile
$(XMLFILES
)
2581 $(SILENCE
) rm -f xml-builtin.tmp
2582 $(ECHO_GEN_XML_BUILTIN
) AWK
="$(AWK)" \
2583 $(SHELL
) $(srcdir)/features
/feature_to_c.sh \
2584 xml-builtin.tmp
$(XMLFILES
)
2585 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change xml-builtin.tmp xml-builtin.c
2586 $(SILENCE
) echo stamp
> stamp-xml
2588 .PRECIOUS
: xml-builtin.c
2591 # GDBTK sub-directory
2594 all-gdbtk
: insight
$(EXEEXT
)
2597 transformed_name
=`t='$(program_transform_name)'; \
2598 echo insight | sed -e $$t` ; \
2599 if
test "x$$transformed_name" = x
; then \
2600 transformed_name
=insight
; \
2604 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
2605 $(INSTALL_PROGRAM_ENV
) $(LIBTOOL
) --mode
=install $(INSTALL_PROGRAM
) \
2607 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2608 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2609 $(DESTDIR
)$(GDBTK_LIBRARY
) ; \
2610 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2611 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
) ; \
2612 $(INSTALL_DATA
) $(srcdir)/gdbtk
/plugins
/plugins.tcl \
2613 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
)/plugins.tcl
; \
2614 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2615 $(DESTDIR
)$(GDBTK_LIBRARY
)/images \
2616 $(DESTDIR
)$(GDBTK_LIBRARY
)/images2
; \
2617 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2618 $(DESTDIR
)$(GDBTK_LIBRARY
)/help \
2619 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/images \
2620 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/trace
; \
2621 cd
$(srcdir)/gdbtk
/library
; \
2622 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 $(INSTALL_DATA
) $$i $(DESTDIR
)$(GDBTK_LIBRARY
)/$$i ; \
2628 transformed_name
=`t='$(program_transform_name)'; \
2629 echo insight | sed -e $$t` ; \
2630 if
test "x$$transformed_name" = x
; then \
2631 transformed_name
=insight
; \
2635 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2636 rm -rf
$(DESTDIR
)$(GDBTK_LIBRARY
)
2639 rm -f insight
$(EXEEXT
)
2641 # Removing the old gdb first works better if it is running, at least on SunOS.
2642 insight
$(EXEEXT
): gdbtk-main.o libgdb.a
$(CDEPS
) $(TDEPLIBS
)
2643 rm -f insight
$(EXEEXT
)
2644 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
2645 -o insight
$(EXEEXT
) gdbtk-main.o libgdb.a \
2646 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
2648 gdbres.o
: $(srcdir)/gdbtk
/gdb.rc
$(srcdir)/gdbtk
/gdbtool.ico
2649 $(WINDRES
) --include $(srcdir)/gdbtk
$(srcdir)/gdbtk
/gdb.rc gdbres.o
2651 all_gdbtk_cflags
= $(IDE_CFLAGS
) $(ITCL_CFLAGS
) \
2652 $(ITK_CFLAGS
) $(TCL_CFLAGS
) $(TK_CFLAGS
) $(X11_CFLAGS
) \
2654 -DGDBTK_LIBRARY
=\"$(GDBTK_LIBRARY
)\" \
2655 -DSRC_DIR
=\"$(GDBTK_SRC_DIR
)\"
2658 # Dependency tracking.
2661 ifeq ($(DEPMODE
),depmode
=gcc3
)
2662 # Note that we put the dependencies into a .Tpo file, then move them
2663 # into place if the compile succeeds. We need this because gcc does
2664 # not atomically write the dependency output file.
2665 override COMPILE.post
= -c
-o
$@
-MT
$@
-MMD
-MP \
2666 -MF
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo
2667 override POSTCOMPILE
= @mv
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo \
2668 $(@D
)/$(DEPDIR
)/$(basename $(@F
)).Po
2670 override COMPILE.pre
= source
='$<' object
='$@' libtool
=no \
2671 DEPDIR
=$(DEPDIR
) $(DEPMODE
) $(depcomp
) \
2672 $(CXX
) -x c
++ $(CXX_DIALECT
)
2673 # depcomp handles atomicity for us, so we don't need a postcompile
2675 override POSTCOMPILE
=
2678 # A list of all the objects we might care about in this build, for
2679 # dependency tracking.
2680 all_object_files
= gdb.o
$(LIBGDB_OBS
) gdbtk-main.o \
2681 test-cp-name-parser.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.
2691 $(all_object_files
): |
$(generated_files
)
2693 $(all_object_files
) : $(generated_files
)
2697 -include $(all_deps_files
)
2699 # Disable implicit make rules.
2700 include $(srcdir)/disable-implicit-rules.mk
2702 ### end of the gdb Makefile.in.