1 # Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 # This file is part of GDB.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Please keep lists in this file sorted alphabetically, with one item per line.
19 # Here are the general guidelines for ordering files and directories:
21 # - Files come before directories.
22 # - The extensions are not taken into account when comparing filenames, except
23 # if the filenames are otherwise equal.
24 # - A filename that is a prefix of another one comes before.
25 # - Underscores and dashes are treated equally, and come before alphanumeric
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
146 # Set this up with gcc if you have gnu ld and the loader will print out
147 # line numbers for undefined references.
149 CC_LD
= $(CXX
) $(CXX_DIALECT
)
151 # Where is our "include" directory? Typically $(srcdir)/../include.
152 # This is essentially the header file directory for the library
153 # routines in libiberty.
154 INCLUDE_DIR
= $(srcdir)/..
/include
155 INCLUDE_CFLAGS
= -I
$(INCLUDE_DIR
)
157 # Where is the "-liberty" library? Typically in ../libiberty.
158 LIBIBERTY
= ..
/libiberty
/libiberty.a
160 # Where is the CTF library? Typically in ../libctf.
162 CTF_DEPS
= @CTF_DEPS@
164 # Where is the BFD library? Typically in ../bfd.
166 BFD
= $(BFD_DIR
)/libbfd.a
167 BFD_SRC
= $(srcdir)/$(BFD_DIR
)
168 BFD_CFLAGS
= -I
$(BFD_DIR
) -I
$(BFD_SRC
)
170 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
171 # -I../zlib, unless we were configured with --with-system-zlib, in which
172 # case both are empty.
176 # Where is the decnumber library? Typically in ../libdecnumber.
177 LIBDECNUMBER_DIR
= ..
/libdecnumber
178 LIBDECNUMBER
= $(LIBDECNUMBER_DIR
)/libdecnumber.a
179 LIBDECNUMBER_SRC
= $(srcdir)/$(LIBDECNUMBER_DIR
)
180 LIBDECNUMBER_CFLAGS
= -I
$(LIBDECNUMBER_DIR
) -I
$(LIBDECNUMBER_SRC
)
182 # Where is the READLINE library? Typically in ../readline/readline.
183 READLINE_DIR
= ..
/readline
/readline
184 READLINE_SRC
= $(srcdir)/$(READLINE_DIR
)
185 READLINE
= @READLINE@
186 READLINE_DEPS
= @READLINE_DEPS@
187 READLINE_CFLAGS
= @READLINE_CFLAGS@
189 # Where is expat? This will be empty if expat was not available.
190 LIBEXPAT
= @LIBEXPAT@
192 # Where is lzma? This will be empty if lzma was not available.
195 # Where is libbabeltrace? This will be empty if libbabeltrace was not
197 LIBBABELTRACE
= @LIBBABELTRACE@
199 # Where is libxxhash? This will be empty if libxxhash was not
201 LIBXXHASH
= @LIBXXHASH@
203 # Where is libipt? This will be empty if libipt was not available.
209 # Where is libmpfr? This will be empty if libmpfr was not available.
212 # GNU source highlight library.
213 SRCHIGH_LIBS
= @SRCHIGH_LIBS@
214 SRCHIGH_CFLAGS
= @SRCHIGH_CFLAGS@
216 WARN_CFLAGS
= @WARN_CFLAGS@
217 WERROR_CFLAGS
= @WERROR_CFLAGS@
218 GDB_WARN_CFLAGS
= $(WARN_CFLAGS
)
219 GDB_WERROR_CFLAGS
= $(WERROR_CFLAGS
)
221 PTHREAD_CFLAGS
= @PTHREAD_CFLAGS@
222 PTHREAD_LIBS
= @PTHREAD_LIBS@
224 DEBUGINFOD_CFLAGS
= @DEBUGINFOD_CFLAGS@
225 DEBUGINFOD_LIBS
= @DEBUGINFOD_LIBS@
227 RDYNAMIC
= @RDYNAMIC@
229 # Where is the INTL library? Typically in ../intl.
231 INTL_DEPS
= @LIBINTL_DEP@
232 INTL_CFLAGS
= @INCINTL@
234 # Where is the ICONV library? This will be empty if in libc or not available.
235 LIBICONV
= @LIBICONV@
237 # Did the user give us a --with-gdb-datadir option?
238 GDB_DATADIR
= @GDB_DATADIR@
242 CODESIGN_CERT
= @CODESIGN_CERT@
244 # Flags to pass to gdb when invoked with "make run".
247 # Helper code from gnulib.
248 GNULIB_PARENT_DIR
= ..
249 include $(GNULIB_PARENT_DIR
)/gnulib
/Makefile.gnulib.inc
252 LIBBACKTRACE_INC
=@LIBBACKTRACE_INC@
253 LIBBACKTRACE_LIB
=@LIBBACKTRACE_LIB@
255 SUPPORT
= ..
/gdbsupport
256 LIBSUPPORT
= $(SUPPORT
)/libgdbsupport.a
257 INCSUPPORT
= -I
$(srcdir)/..
-I..
260 # CLI sub directory definitons
274 SUBDIR_CLI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_CLI_SRCS
))
277 # MI sub directory definitons
298 SUBDIR_MI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_MI_SRCS
))
305 # TUI sub directory definitions
323 tui
/tui-wingeneral.c \
326 SUBDIR_TUI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_TUI_SRCS
))
330 SUBDIR_TUI_CFLAGS
= -DTUI
=1
333 # GCC Compile support sub-directory definitions
335 SUBDIR_GCC_COMPILE_SRCS
= \
337 compile
/compile-c-support.c \
338 compile
/compile-c-symbols.c \
339 compile
/compile-c-types.c \
340 compile
/compile-cplus-symbols.c \
341 compile
/compile-cplus-types.c \
342 compile
/compile-loc2c.c \
343 compile
/compile-object-load.c \
344 compile
/compile-object-run.c
346 SUBDIR_GCC_COMPILE_OBS
= $(patsubst %.c
,%.o
,$(filter %.c
,$(SUBDIR_GCC_COMPILE_SRCS
)))
349 # Guile sub directory definitons for guile support.
351 SUBDIR_GUILE_SRCS
= \
354 guile
/scm-auto-load.c \
356 guile
/scm-breakpoint.c \
359 guile
/scm-exception.c \
362 guile
/scm-iterator.c \
363 guile
/scm-lazy-string.c \
365 guile
/scm-objfile.c \
368 guile
/scm-pretty-print.c \
369 guile
/scm-progspace.c \
370 guile
/scm-safe-call.c \
378 SUBDIR_GUILE_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_GUILE_SRCS
))
381 SUBDIR_GUILE_LDFLAGS
=
382 SUBDIR_GUILE_CFLAGS
=
385 # python sub directory definitons
387 SUBDIR_PYTHON_SRCS
= \
389 python
/py-auto-load.c \
391 python
/py-bpevent.c \
392 python
/py-breakpoint.c \
394 python
/py-connection.c \
395 python
/py-continueevent.c \
398 python
/py-evtregistry.c \
400 python
/py-exitedevent.c \
401 python
/py-finishbreakpoint.c \
403 python
/py-framefilter.c \
404 python
/py-function.c \
405 python
/py-gdb-readline.c \
406 python
/py-inferior.c \
407 python
/py-infevents.c \
408 python
/py-infthread.c \
409 python
/py-instruction.c \
410 python
/py-lazy-string.c \
411 python
/py-linetable.c \
414 python
/py-newobjfileevent.c \
415 python
/py-objfile.c \
417 python
/py-prettyprint.c \
418 python
/py-progspace.c \
420 python
/py-record-btrace.c \
421 python
/py-record-full.c \
422 python
/py-registers.c \
423 python
/py-signalevent.c \
424 python
/py-stopevent.c \
427 python
/py-threadevent.c \
434 python
/py-xmethods.c \
437 SUBDIR_PYTHON_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_PYTHON_SRCS
))
440 SUBDIR_PYTHON_LDFLAGS
=
441 SUBDIR_PYTHON_CFLAGS
=
445 gdbarch-selftests.c \
447 unittests
/array-view-selftests.c \
448 unittests
/child-path-selftests.c \
449 unittests
/cli-utils-selftests.c \
450 unittests
/command-def-selftests.c \
451 unittests
/common-utils-selftests.c \
452 unittests
/copy_bitwise-selftests.c \
453 unittests
/enum-flags-selftests.c \
454 unittests
/environ-selftests.c \
455 unittests
/filtered_iterator-selftests.c \
456 unittests
/format_pieces-selftests.c \
457 unittests
/function-view-selftests.c \
458 unittests
/gdb_tilde_expand-selftests.c \
459 unittests
/gmp-utils-selftests.c \
460 unittests
/intrusive_list-selftests.c \
461 unittests
/lookup_name_info-selftests.c \
462 unittests
/memory-map-selftests.c \
463 unittests
/memrange-selftests.c \
464 unittests
/offset-type-selftests.c \
465 unittests
/observable-selftests.c \
466 unittests
/optional-selftests.c \
467 unittests
/parallel-for-selftests.c \
468 unittests
/parse-connection-spec-selftests.c \
469 unittests
/path-join-selftests.c \
470 unittests
/ptid-selftests.c \
471 unittests
/main-thread-selftests.c \
472 unittests
/mkdir-recursive-selftests.c \
473 unittests
/rsp-low-selftests.c \
474 unittests
/scoped_fd-selftests.c \
475 unittests
/scoped_ignore_signal-selftests.c \
476 unittests
/scoped_mmap-selftests.c \
477 unittests
/scoped_restore-selftests.c \
478 unittests
/search-memory-selftests.c \
479 unittests
/string_view-selftests.c \
480 unittests
/style-selftests.c \
481 unittests
/tracepoint-selftests.c \
482 unittests
/tui-selftests.c \
483 unittests
/ui-file-selftests.c \
484 unittests
/unique_xmalloc_ptr_char.c \
485 unittests
/unpack-selftests.c \
486 unittests
/utils-selftests.c \
487 unittests
/vec-utils-selftests.c \
488 unittests
/xml-utils-selftests.c
490 SELFTESTS_OBS
= $(patsubst %.c
,%.o
,$(SELFTESTS_SRCS
))
492 SUBDIR_TARGET_SRCS
= target
/target.c target
/waitstatus.c
493 SUBDIR_TARGET_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_TARGET_SRCS
))
496 # Opcodes currently live in one of two places. Either they are in the
497 # opcode library, typically ../opcodes, or they are in a header file
499 # Where is the "-lopcodes" library, with (some of) the opcode tables and
501 OPCODES_DIR
= ..
/opcodes
502 OPCODES_SRC
= $(srcdir)/$(OPCODES_DIR
)
503 OPCODES
= $(OPCODES_DIR
)/libopcodes.a
504 # Where are the other opcode tables which only have header file
506 OP_INCLUDE
= $(INCLUDE_DIR
)/opcode
507 # See TOP_CFLAGS as well.
508 OPCODES_CFLAGS
= -I
$(OP_INCLUDE
)
510 # Allow includes like "opcodes/mumble.h".
511 TOP_CFLAGS
= -I
$(top_srcdir
)/..
513 # The simulator is usually nonexistent; targets that include one
514 # should set this to list all the .o or .a files to be linked in.
517 WIN32LIBS
= @WIN32LIBS@
519 # Tcl et al cflags and libraries
521 TCL_CFLAGS
= @TCL_INCLUDE@
522 GDBTKLIBS
= @GDBTKLIBS@
523 # Extra flags that the GDBTK files need:
524 GDBTK_CFLAGS
= @GDBTK_CFLAGS@
527 TK_CFLAGS
= @TK_INCLUDE@
529 X11_CFLAGS
= @TK_XINCLUDES@
533 WIN32LDAPP
= @WIN32LDAPP@
536 GUI_CFLAGS_X
= @GUI_CFLAGS_X@
537 IDE_CFLAGS
= $(GUI_CFLAGS_X
) $(IDE_CFLAGS_X
)
539 ALL_TCL_CFLAGS
= $(TCL_CFLAGS
) $(TK_CFLAGS
)
541 # The version of gdbtk we're building. This should be kept
542 # in sync with GDBTK_VERSION and friends in gdbtk.h.
544 GDBTK_LIBRARY
= $(datadir)/insight
$(GDBTK_VERSION
)
546 # Gdbtk requires an absolute path to the source directory or
547 # the testsuite won't run properly.
548 GDBTK_SRC_DIR
= @GDBTK_SRC_DIR@
561 SUBDIR_GDBTK_SRCS
= \
562 gdbtk
/generic
/gdbtk.c \
563 gdbtk
/generic
/gdbtk-bp.c \
564 gdbtk
/generic
/gdbtk-cmds.c \
565 gdbtk
/generic
/gdbtk-hooks.c \
566 gdbtk
/generic
/gdbtk-interp.c \
567 gdbtk
/generic
/gdbtk-main.c \
568 gdbtk
/generic
/gdbtk-register.c \
569 gdbtk
/generic
/gdbtk-stack.c \
570 gdbtk
/generic
/gdbtk-varobj.c \
571 gdbtk
/generic
/gdbtk-wrapper.c
573 SUBDIR_GDBTK_DEPS
= $(LIBGUI
) $(TCL_DEPS
) $(TK_DEPS
)
574 SUBDIR_GDBTK_LDFLAGS
=
575 SUBDIR_GDBTK_CFLAGS
= -DGDBTK
577 CONFIG_OBS
= @CONFIG_OBS@
578 CONFIG_SRCS
= @CONFIG_SRCS@
579 CONFIG_DEPS
= @CONFIG_DEPS@
580 CONFIG_LDFLAGS
= @CONFIG_LDFLAGS@
581 ENABLE_CFLAGS
= @ENABLE_CFLAGS@
582 CONFIG_ALL
= @CONFIG_ALL@
583 CONFIG_CLEAN
= @CONFIG_CLEAN@
584 CONFIG_INSTALL
= @CONFIG_INSTALL@
585 CONFIG_UNINSTALL
= @CONFIG_UNINSTALL@
586 HAVE_NATIVE_GCORE_TARGET
= @HAVE_NATIVE_GCORE_TARGET@
588 CONFIG_SRC_SUBDIR
= arch cli dwarf2 mi compile tui unittests guile python \
590 CONFIG_DEP_SUBDIR
= $(addsuffix /$(DEPDIR
),$(CONFIG_SRC_SUBDIR
))
592 # -I. for config files.
593 # -I$(srcdir) for gdb internal headers.
594 # -I$(srcdir)/config for more generic config files.
596 # It is also possible that you will need to add -I/usr/include/sys if
597 # your system doesn't have fcntl.h in /usr/include (which is where it
598 # should be according to Posix).
600 GDB_CFLAGS
= -I.
-I
$(srcdir) -I
$(srcdir)/config \
601 -DLOCALEDIR
="\"$(localedir)\"" $(DEFS
)
603 # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
604 GLOBAL_CFLAGS
= $(MH_CFLAGS
)
606 PROFILE_CFLAGS
= @PROFILE_CFLAGS@
608 # These are specifically reserved for setting from the command line
609 # when running make. I.E.: "make CFLAGS=-Wmissing-prototypes".
611 CXXFLAGS
= @CXXFLAGS@
612 CPPFLAGS
= @CPPFLAGS@
614 # Set by configure, for e.g. expat. Python installations are such that
615 # C headers are included using their basename (for example, we #include
616 # <Python.h> rather than, say, <python/Python.h>). Since the file names
617 # are sometimes a little generic, we think that the risk of collision
618 # with other header files is high. If that happens, we try to mitigate
619 # a bit the consequences by putting the Python includes last in the list.
620 INTERNAL_CPPFLAGS
= $(CPPFLAGS
) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ \
623 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
624 INTERNAL_CFLAGS_BASE
= \
625 $(GLOBAL_CFLAGS
) $(PROFILE_CFLAGS
) \
626 $(GDB_CFLAGS
) $(OPCODES_CFLAGS
) $(READLINE_CFLAGS
) $(ZLIBINC
) \
627 $(BFD_CFLAGS
) $(INCLUDE_CFLAGS
) $(LIBDECNUMBER_CFLAGS
) \
628 $(INTL_CFLAGS
) $(INCGNU
) $(INCSUPPORT
) $(LIBBACKTRACE_INC
) \
629 $(ENABLE_CFLAGS
) $(INTERNAL_CPPFLAGS
) $(SRCHIGH_CFLAGS
) \
630 $(TOP_CFLAGS
) $(PTHREAD_CFLAGS
) $(DEBUGINFOD_CFLAGS
)
631 INTERNAL_WARN_CFLAGS
= $(INTERNAL_CFLAGS_BASE
) $(GDB_WARN_CFLAGS
)
632 INTERNAL_CFLAGS
= $(INTERNAL_WARN_CFLAGS
) $(GDB_WERROR_CFLAGS
)
634 # LDFLAGS is specifically reserved for setting from the command line
638 # Profiling options need to go here to work.
639 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
640 # and have it work; that's why CFLAGS is here.
641 # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
643 $(CXXFLAGS
) $(GLOBAL_CFLAGS
) $(MH_LDFLAGS
) \
644 $(LDFLAGS
) $(CONFIG_LDFLAGS
) $(PTHREAD_CFLAGS
)
646 # Libraries and corresponding dependencies for compiling gdb.
647 # XM_CLIBS, defined in *config files, have host-dependent libs.
648 # LIBIBERTY appears twice on purpose.
649 CLIBS
= $(SIM
) $(READLINE
) $(OPCODES
) $(LIBCTF
) $(BFD
) $(ZLIB
) \
650 $(LIBSUPPORT
) $(INTL
) $(LIBIBERTY
) $(LIBDECNUMBER
) \
651 $(XM_CLIBS
) $(GDBTKLIBS
) $(LIBBACKTRACE_LIB
) \
652 @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
653 $(LIBEXPAT
) $(LIBLZMA
) $(LIBBABELTRACE
) $(LIBIPT
) \
654 $(WIN32LIBS
) $(LIBGNU
) $(LIBGNU_EXTRA_LIBS
) $(LIBICONV
) \
655 $(LIBMPFR
) $(LIBGMP
) $(SRCHIGH_LIBS
) $(LIBXXHASH
) $(PTHREAD_LIBS
) \
656 $(DEBUGINFOD_LIBS
) $(LIBBABELTRACE_LIB
)
657 CDEPS
= $(NAT_CDEPS
) $(SIM
) $(BFD
) $(READLINE_DEPS
) $(CTF_DEPS
) \
658 $(OPCODES
) $(INTL_DEPS
) $(LIBIBERTY
) $(CONFIG_DEPS
) $(LIBGNU
) \
666 # XML files to build in to GDB.
668 $(srcdir)/features
/btrace.dtd \
669 $(srcdir)/features
/btrace-conf.dtd \
670 $(srcdir)/features
/gdb-target.dtd \
671 $(srcdir)/features
/library-list.dtd \
672 $(srcdir)/features
/library-list-aix.dtd \
673 $(srcdir)/features
/library-list-svr4.dtd \
674 $(srcdir)/features
/osdata.dtd \
675 $(srcdir)/features
/threads.dtd \
676 $(srcdir)/features
/traceframe-info.dtd \
677 $(srcdir)/features
/xinclude.dtd
679 # Build the ser-*.o files the host supports. This includes ser-unix.o
680 # for any system that supports a POSIX interface to the serial port.
682 SER_HARDWIRE
= @SER_HARDWIRE@
684 # This is remote-sim.o if a simulator is to be linked in.
687 # Target-dependent object files.
688 TARGET_OBS
= @TARGET_OBS@
690 # All target-dependent objects files that require 64-bit CORE_ADDR
691 # (used with --enable-targets=all --enable-64-bit-bfd).
692 ALL_64_TARGET_OBS
= \
693 aarch64-fbsd-tdep.o \
694 aarch64-linux-tdep.o \
695 aarch64-newlib-tdep.o \
696 aarch64-ravenscar-thread.o \
700 alpha-mdebug-tdep.o \
701 alpha-netbsd-tdep.o \
704 amd64-darwin-tdep.o \
708 amd64-netbsd-tdep.o \
710 amd64-ravenscar-thread.o \
713 amd64-windows-tdep.o \
715 arch
/aarch64-insn.o \
716 arch
/aarch64-mte-linux.o \
723 loongarch-linux-tdep.o \
734 riscv-ravenscar-thread.o \
736 sparc64-fbsd-tdep.o \
737 sparc64-linux-tdep.o \
738 sparc64-netbsd-tdep.o \
739 sparc64-obsd-tdep.o \
740 sparc64-sol2-tdep.o \
742 tilegx-linux-tdep.o \
746 # All other target-dependent objects files (used with --enable-targets=all).
755 arch
/arm-get-next-pcs.o \
759 arch
/ppc-linux-common.o \
801 i386-windows-tdep.o \
815 microblaze-linux-tdep.o \
817 mn10300-linux-tdep.o \
833 ppc-ravenscar-thread.o \
839 rs6000-lynx178-tdep.o \
855 sparc-netbsd-tdep.o \
857 sparc-ravenscar-thread.o \
871 xtensa-linux-tdep.o \
875 # The following native-target dependent variables are defined on
877 NAT_FILE
= @NAT_FILE@
878 NATDEPFILES
= @NATDEPFILES@
879 NAT_CDEPS
= @NAT_CDEPS@
880 LOADLIBES
= @LOADLIBES@
881 MH_CFLAGS
= @MH_CFLAGS@
882 XM_CLIBS
= @XM_CLIBS@
883 NAT_GENERATED_FILES
= @NAT_GENERATED_FILES@
885 HAVE_NATIVE_GCORE_HOST
= @HAVE_NATIVE_GCORE_HOST@
887 # Native-target dependent makefile fragment comes in here.
890 # End of native-target dependent variables.
894 "exec_prefix=$(exec_prefix)" \
895 "infodir=$(infodir)" \
896 "datarootdir=$(datarootdir)" \
898 "htmldir=$(htmldir)" \
902 "datadir=$(datadir)" \
903 "includedir=$(includedir)" \
904 "against=$(against)" \
905 "DESTDIR=$(DESTDIR)" \
907 "AR_FLAGS=$(AR_FLAGS)" \
911 "CXX_DIALECT=$(CXX_DIALECT)" \
912 "CXXFLAGS=$(CXXFLAGS)" \
913 "DLLTOOL=$(DLLTOOL)" \
914 "LDFLAGS=$(LDFLAGS)" \
916 "MAKEINFO=$(MAKEINFO)" \
917 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
918 "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
919 "MAKEHTML=$(MAKEHTML)" \
920 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
921 "INSTALL=$(INSTALL)" \
922 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
923 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
924 "INSTALL_DATA=$(INSTALL_DATA)" \
925 "RUNTEST=$(RUNTEST)" \
926 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
928 # Flags that we pass when building the testsuite.
930 # empty for native, $(target_alias)/ for cross
931 target_subdir
= @target_subdir@
934 if [ -f $${rootme}/../gcc/xgcc ] ; then \
935 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
936 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/; \
938 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
941 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
944 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
949 if [ -f $${rootme}/../gcc/xg++ ] ; then \
950 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
951 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/; \
953 echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
956 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
959 t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
963 # The use of $$(x_FOR_TARGET) reduces the command line length by not
964 # duplicating the lengthy definition.
965 TARGET_FLAGS_TO_PASS
= \
967 "exec_prefix=$(exec_prefix)" \
968 "against=$(against)" \
969 'CC=$$(CC_FOR_TARGET)' \
970 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
972 'CXX=$$(CXX_FOR_TARGET)' \
973 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
974 "CXXFLAGS=$(CXXFLAGS)" \
975 "INSTALL=$(INSTALL)" \
976 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
977 "INSTALL_DATA=$(INSTALL_DATA)" \
978 "MAKEINFO=$(MAKEINFO)" \
979 "MAKEHTML=$(MAKEHTML)" \
980 "RUNTEST=$(RUNTEST)" \
981 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
982 "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
985 # All source files that go into linking GDB.
987 # Files that should wind up in SFILES and whose corresponding .o
988 # should be in COMMON_OBS.
1009 break-catch-exec.c \
1010 break-catch-fork.c \
1011 break-catch-load.c \
1013 break-catch-syscall.c \
1014 break-catch-throw.c \
1045 debuginfod-support.c \
1048 displaced-stepping.c \
1051 dwarf2
/abbrev-cache.c \
1052 dwarf2
/attribute.c \
1053 dwarf2
/comp-unit-head.c \
1054 dwarf2
/cooked-index.c \
1058 dwarf2
/frame-tailcall.c \
1060 dwarf2
/index-cache.c \
1061 dwarf2
/index-common.c \
1062 dwarf2
/index-write.c \
1064 dwarf2
/line-header.c \
1069 dwarf2
/stringify.c \
1079 filename-seen-cache.c \
1118 maint-test-options.c \
1119 maint-test-settings.c \
1142 process-stratum-target.c \
1145 progspace-and-thread.c \
1159 run-on-main-thread.c \
1179 target-connection.c \
1181 target-descriptions.c \
1211 # Links made at configuration time should not be specified here, since
1212 # SFILES is used in building the distribution archive.
1237 $(SUBDIR_CLI_SRCS
) \
1238 $(SUBDIR_TARGET_SRCS
) \
1240 $(SUBDIR_GCC_COMPILE_SRCS
)
1242 # Header files that need to have srcdir added. Note that in the cases
1243 # where we use a macro like $(gdbcmd_h), things are carefully arranged
1244 # so that each .h file is listed exactly once (M-x tags-search works
1245 # wrong if TAGS has files twice). Because this is tricky to get
1246 # right, it is probably easiest just to list .h files here directly.
1248 HFILES_NO_SRCDIR
= \
1250 aarch64-ravenscar-thread.h \
1256 amd64-darwin-tdep.h \
1257 amd64-linux-tdep.h \
1259 amd64-ravenscar-thread.h \
1303 dwarf2
/cooked-index.h \
1305 dwarf2
/frame-tailcall.h \
1308 dwarf2
/index-cache.h \
1309 dwarf2
/index-common.h \
1333 gdb_proc_service.h \
1348 hppa-linux-offsets.h \
1351 i386-darwin-tdep.h \
1356 ia64-libunwind-tdep.h \
1387 mips-netbsd-tdep.h \
1410 ppc-ravenscar-thread.h \
1417 progspace-and-thread.h \
1421 ravenscar-thread.h \
1431 riscv-ravenscar-thread.h \
1434 run-on-main-thread.h \
1457 sparc-ravenscar-thread.h \
1468 target-descriptions.h \
1503 arch
/aarch64-insn.h \
1504 arch
/aarch64-mte-linux.h \
1509 arch
/ppc-linux-common.h \
1510 arch
/ppc-linux-tdesc.h \
1519 compile
/compile-c.h \
1520 compile
/compile-cplus.h \
1521 compile
/compile-internal.h \
1522 compile
/compile-object-load.h \
1523 compile
/compile-object-run.h \
1524 compile
/gcc-c-plugin.h \
1525 compile
/gcc-cp-plugin.h \
1528 config
/djgpp
/langinfo.h \
1529 config
/djgpp
/nl_types.h \
1530 config
/i386
/nm-i386gnu.h \
1531 config
/sparc
/nm-sol2.h \
1539 nat
/aarch64-linux.h \
1540 nat
/aarch64-linux-hw-point.h \
1541 nat
/aarch64-mte-linux-ptrace.h \
1542 nat
/aarch64-sve-linux-ptrace.h \
1543 nat
/amd64-linux-siginfo.h \
1545 nat
/gdb_thread_db.h \
1546 nat
/fork-inferior.h \
1547 nat
/linux-btrace.h \
1548 nat
/linux-namespaces.h \
1550 nat
/linux-osdata.h \
1551 nat
/linux-personality.h \
1552 nat
/linux-ptrace.h \
1553 nat
/linux-waitpid.h \
1554 nat
/mips-linux-watch.h \
1558 nat
/x86-gcc-cpuid.h \
1560 nat
/x86-linux-dregs.h \
1562 python
/py-events.h \
1563 python
/py-stopevent.h \
1565 python
/python-internal.h \
1566 regformats
/regdef.h \
1570 target
/waitstatus.h \
1579 tui
/tui-location.h \
1585 tui
/tui-wingeneral.h \
1586 tui
/tui-winsource.h \
1589 # Header files that already have srcdir in them, or which are in objdir.
1591 HFILES_WITH_SRCDIR
= \
1595 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1596 # default their values the way we do for SER_HARDWIRE; in the future
1597 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1598 # variables analogous to SER_HARDWIRE which get defaulted in this
1601 DEPFILES
= $(TARGET_OBS
) $(SER_HARDWIRE
) $(NATDEPFILES
) $(SIM_OBS
)
1606 arch
/aarch64-insn.c \
1607 arch
/aarch64-mte-linux.c \
1611 arch
/arm-get-next-pcs.c \
1615 arch
/ppc-linux-common.c \
1619 aarch64-fbsd-nat.c \
1620 aarch64-fbsd-tdep.c \
1621 aarch64-linux-nat.c \
1622 aarch64-linux-tdep.c \
1623 aarch64-newlib-tdep.c \
1624 aarch64-ravenscar-thread.c \
1630 alpha-linux-tdep.c \
1631 alpha-mdebug-tdep.c \
1632 alpha-netbsd-tdep.c \
1636 amd64-darwin-tdep.c \
1637 amd64-dicos-tdep.c \
1641 amd64-linux-tdep.c \
1643 amd64-netbsd-nat.c \
1644 amd64-netbsd-tdep.c \
1647 amd64-ravenscar-thread.c \
1683 hppa-netbsd-tdep.c \
1690 i386-darwin-tdep.c \
1699 i386-netbsd-tdep.c \
1705 i386-windows-tdep.c \
1707 ia64-libunwind-tdep.c \
1717 loongarch-linux-nat.c \
1718 loongarch-linux-tdep.c \
1729 microblaze-linux-tdep.c \
1737 mips-netbsd-tdep.c \
1741 mips64-obsd-tdep.c \
1746 nios2-linux-tdep.c \
1760 ppc-ravenscar-thread.c \
1764 ravenscar-thread.c \
1769 riscv-linux-tdep.c \
1771 riscv-ravenscar-thread.c \
1775 rs6000-lynx178-tdep.c \
1793 sparc-linux-tdep.c \
1795 sparc-netbsd-nat.c \
1796 sparc-netbsd-tdep.c \
1798 sparc-ravenscar-thread.c \
1802 sparc64-fbsd-nat.c \
1803 sparc64-fbsd-tdep.c \
1804 sparc64-linux-nat.c \
1805 sparc64-linux-tdep.c \
1807 sparc64-netbsd-nat.c \
1808 sparc64-netbsd-tdep.c \
1809 sparc64-obsd-nat.c \
1810 sparc64-obsd-tdep.c \
1811 sparc64-sol2-tdep.c \
1813 tilegx-linux-nat.c \
1814 tilegx-linux-tdep.c \
1827 xtensa-linux-nat.c \
1828 xtensa-linux-tdep.c \
1832 # Don't include YYFILES (*.c) because we already include *.y in SFILES,
1833 # and it's more useful to see it in the .y file.
1834 TAGFILES_NO_SRCDIR
= $(SFILES
) $(HFILES_NO_SRCDIR
) $(ALLDEPFILES
) \
1836 TAGFILES_WITH_SRCDIR
= $(HFILES_WITH_SRCDIR
)
1838 COMMON_OBS
= $(DEPFILES
) $(CONFIG_OBS
) $(YYOBJ
) \
1842 $(patsubst %.c
,%.o
,$(COMMON_SFILES
)) \
1844 $(SUBDIR_TARGET_OBS
) \
1845 $(SUBDIR_GCC_COMPILE_OBS
)
1847 SUBDIRS
= doc @subdirs@ data-directory
1848 CLEANDIRS
= $(SUBDIRS
)
1850 # List of subdirectories in the build tree that must exist.
1851 # This is used to force build failures in existing trees when
1852 # a new directory is added.
1853 # The format here is for the `case' shell command.
1854 REQUIRED_SUBDIRS
= doc | testsuite | data-directory
1856 # Parser intermediate files.
1868 # ada-lex.c is included by another file, so it shouldn't wind up as a
1870 YYOBJ
= $(filter-out ada-lex.o
,$(patsubst %.c
,%.o
,$(YYFILES
)))
1872 # Things which need to be built when making a distribution.
1874 DISTSTUFF
= $(YYFILES
)
1877 # All generated files which can be included by another file.
1882 $(NAT_GENERATED_FILES
) \
1885 # Flags needed to compile Python code
1886 PYTHON_CFLAGS
= @PYTHON_CFLAGS@
1888 all: gdb
$(EXEEXT
) $(CONFIG_ALL
) gdb-gdb.py gdb-gdb.gdb
1889 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all "DODIRS=$(SUBDIRS)" subdir_do
1891 # Rule for compiling .c files in the top-level gdb directory.
1892 # The order-only dependencies ensure that we create the build subdirectories.
1893 %.o
: %.c |
$(CONFIG_DEP_SUBDIR
)
1897 $(CONFIG_DEP_SUBDIR
):
1898 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$@
1900 # Python files need special flags.
1901 python
/%.o
: INTERNAL_CFLAGS
+= $(PYTHON_CFLAGS
)
1903 # Rules for compiling .c files in the various source subdirectories.
1904 %.o
: $(srcdir)/gdbtk
/generic
/%.c
1905 $(COMPILE
) $(all_gdbtk_cflags
) $<
1910 # The check target can not use subdir_do, because subdir_do does not
1911 # use TARGET_FLAGS_TO_PASS.
1913 @if
[ -f testsuite
/Makefile
]; then \
1914 rootme
=`pwd`; export rootme
; \
1915 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1917 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check; \
1921 @if
[ -f testsuite
/Makefile
]; then \
1922 rootme
=`pwd`; export rootme
; \
1923 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1925 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-perf
; \
1928 check-read1 check-readmore
: force
1929 @if
[ -f testsuite
/Makefile
]; then \
1930 rootme
=`pwd`; export rootme
; \
1931 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1933 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $@
; \
1936 check-parallel
: force
1937 @if
[ -f testsuite
/Makefile
]; then \
1938 rootme
=`pwd`; export rootme
; \
1939 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1941 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-parallel
; \
1944 # The idea is to parallelize testing of multilibs, for example:
1945 # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1946 # will run 3 concurrent sessions of check, eventually testing all 10
1947 # combinations. GNU make is required for the % pattern to work, as is
1948 # a shell that expands alternations within braces. If GNU make is not
1949 # used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to
1950 # prevent serialized checking due to the passed RUNTESTFLAGS.
1951 # FIXME: use config.status --config not --version, when available.
1953 @if
[ -f testsuite
/config.status
]; then \
1954 rootme
=`pwd`; export rootme
; \
1955 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1956 target
=`echo "$@" | sed 's,//.*,,'`; \
1957 variant
=`echo "$@" | sed 's,^[^/]*//,,'`; \
1958 vardots
=`echo "$$variant" | sed 's,/,.,g'`; \
1959 testdir
=testsuite.
$$vardots; \
1960 if
[ ! -f
$$testdir/Makefile
] && [ -f testsuite
/config.status
]; then \
1961 configargs
=`cd testsuite && ./config.status --version | \
1962 sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
1963 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$$testdir && \
1965 eval
$(SHELL
) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
1966 "\"--srcdir=\$$rootsrc/testsuite\"" \
1968 else :; fi
&& cd
$$testdir && \
1969 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) \
1970 RUNTESTFLAGS
="--target_board=$$variant $(RUNTESTFLAGS)" \
1971 FORCE_PARALLEL
=$(if
$(FORCE_PARALLEL
),1,$(if
$(RUNTESTFLAGS
),,1)) \
1975 # The set of headers checked by 'check-headers' by default.
1976 CHECK_HEADERS
= $(HFILES_NO_SRCDIR
)
1978 # Try to compile each header in isolation, thus ensuring headers are
1981 # Defaults to checking all $HFILES_NO_SRCDIR headers.
1985 # make check-headers CHECK_HEADERS="header.h list.h"
1987 # to check specific headers.
1990 @echo Checking headers.
1991 for i in
$(CHECK_HEADERS
) ; do \
1992 $(CXX
) $(CXX_DIALECT
) -x c
++-header
-c
-fsyntax-only \
1993 $(INTERNAL_CFLAGS
) $(CXXFLAGS
) -include defs.h
$(srcdir)/$$i ; \
1995 .PHONY
: check-headers
1997 info install-info clean-info
dvi pdf install-pdf html install-html
: force
1998 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
2000 # Traditionally "install" depends on "all". But it may be useful
2001 # not to; for example, if the user has made some trivial change to a
2002 # source file and doesn't care about rebuilding or just wants to save the
2003 # time it takes for make to check that all is up to date.
2004 # install-only is intended to address that need.
2006 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
2008 install-only
: $(CONFIG_INSTALL
)
2009 transformed_name
=`t='$(program_transform_name)'; \
2010 echo gdb | sed -e "$$t"` ; \
2011 if
test "x$$transformed_name" = x
; then \
2012 transformed_name
=gdb
; \
2016 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
2017 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) gdb
$(EXEEXT
) \
2018 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2019 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(includedir)/gdb
; \
2020 $(INSTALL_DATA
) jit-reader.h
$(DESTDIR
)$(includedir)/gdb
/jit-reader.h
2021 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
2023 transformed_name
=`t='$(program_transform_name)'; \
2024 echo gcore | sed -e "$$t"` ; \
2025 if
test "x$$transformed_name" = x
; then \
2026 transformed_name
=gcore
; \
2030 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
2031 $(INSTALL_SCRIPT
) gcore \
2032 $(DESTDIR
)$(bindir)/$$transformed_name; \
2034 transformed_name
=`t='$(program_transform_name)'; \
2035 echo gdb-add-index | sed -e "$$t"` ; \
2036 if
test "x$$transformed_name" = x
; then \
2037 transformed_name
=gdb-add-index
; \
2041 $(INSTALL_SCRIPT
) $(srcdir)/contrib
/gdb-add-index.sh \
2042 $(DESTDIR
)$(bindir)/$$transformed_name
2043 @
$(MAKE
) DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
2046 $(MAKE
) $(FLAGS_TO_PASS
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" \
2047 install_sh_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG
=-s \
2048 `test -z '$(STRIP)' || \
2049 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
2052 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/guile
/gdb
2055 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/python
/gdb
2057 uninstall: force $(CONFIG_UNINSTALL
)
2058 transformed_name
=`t='$(program_transform_name)'; \
2059 echo gdb | sed -e $$t` ; \
2060 if
test "x$$transformed_name" = x
; then \
2061 transformed_name
=gdb
; \
2065 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
)
2066 rm -f
$(DESTDIR
)$(includedir)/gdb
/jit-reader.h
2067 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
2069 transformed_name
=`t='$(program_transform_name)'; \
2070 echo gcore | sed -e "$$t"` ; \
2071 if
test "x$$transformed_name" = x
; then \
2072 transformed_name
=gcore
; \
2076 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name; \
2078 transformed_name
=`t='$(program_transform_name)'; \
2079 echo gdb-add-index | sed -e "$$t"` ; \
2080 if
test "x$$transformed_name" = x
; then \
2081 transformed_name
=gdb-add-index
; \
2085 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name
2086 @
$(MAKE
) DO
=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
2088 # The C++ name parser can be built standalone for testing.
2089 test-cp-name-parser.o
: cp-name-parser.c
2090 $(COMPILE
) -DTEST_CPNAMES cp-name-parser.c
2093 test-cp-name-parser
$(EXEEXT
): test-cp-name-parser.o
$(LIBIBERTY
)
2094 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) \
2095 -o test-cp-name-parser
$(EXEEXT
) test-cp-name-parser.o \
2098 # We do this by grepping through sources. If that turns out to be too slow,
2099 # maybe we could just require every .o file to have an initialization routine
2100 # of a given name (top.o -> _initialize_top, etc.).
2102 # Note that the set of files with init functions might change, or the names
2103 # of the functions might change, so this files needs to depend on all the
2104 # source files that will be linked into gdb. However, due to the way
2105 # this Makefile has generally been written, we do this indirectly, by
2106 # computing the list of source files from the list of object files.
2108 INIT_FILES_FILTER_OUT
= \
2117 $(patsubst %.o
,%.c
, \
2118 $(patsubst %-exp.o
,%-exp.y
, \
2119 $(filter-out $(INIT_FILES_FILTER_OUT
), $(COMMON_OBS
))))
2121 init.c
: stamp-init
; @true
2122 stamp-init
: $(INIT_FILES
) config.status
$(srcdir)/make-init-c
2124 $(SILENCE
) $(srcdir)/make-init-c
$(addprefix $(srcdir)/,$(INIT_FILES
)) > init.c-tmp
2125 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change init.c-tmp init.c
2126 $(SILENCE
) echo stamp
> stamp-init
2130 # Create a library of the gdb object files and build GDB by linking
2133 # init.o is very important. It pulls in the rest of GDB.
2134 LIBGDB_OBS
= $(sort $(COMMON_OBS
)) init.o
2135 libgdb.a
: $(LIBGDB_OBS
)
2137 $(AR
) q libgdb.a
$(LIBGDB_OBS
)
2140 # Removing the old gdb first works better if it is running, at least on SunOS.
2141 gdb
$(EXEEXT
): gdb.o
$(LIBGDB_OBS
) $(CDEPS
) $(TDEPLIBS
)
2142 $(SILENCE
) rm -f gdb
$(EXEEXT
)
2143 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
2144 -o gdb
$(EXEEXT
) gdb.o
$(LIBGDB_OBS
) \
2145 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
2146 ifneq ($(CODESIGN_CERT
),)
2147 $(ECHO_SIGN
) $(CODESIGN
) -s
$(CODESIGN_CERT
) gdb
$(EXEEXT
)
2150 # This is useful when debugging GDB, because some Unix's don't let you run GDB
2151 # on itself without copying the executable. So "make gdb1" will make
2152 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
2153 # Removing gdb1 before the copy is the right thing if gdb1 is open
2154 # in another process.
2155 gdb1
$(EXEEXT
): gdb
$(EXEEXT
)
2157 cp gdb
$(EXEEXT
) gdb1
$(EXEEXT
)
2159 # Put the proper machine-specific files first, so M-. on a machine
2160 # specific routine gets the one for the correct machine. (FIXME: those
2161 # files go in twice; we should be removing them from the main list).
2163 # TAGS depends on all the files that go into it so you can rebuild TAGS
2164 # with `make TAGS' and not have to say `rm TAGS' first.
2166 GDB_NM_FILE
= @GDB_NM_FILE@
2167 TAGS
: $(TAGFILES_NO_SRCDIR
) $(TAGFILES_WITH_SRCDIR
)
2169 etags
`(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
2170 `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
2171 echo $(srcdir)/$$i ; \
2172 done ; for i in $(TAGFILES_WITH_SRCDIR); do \
2174 done) | sed -e 's/\.o$$/\.c/'` \
2175 `find $(srcdir)/config -name '*.h' -print`
2179 clean mostlyclean: $(CONFIG_CLEAN
)
2180 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=clean "DODIRS=$(CLEANDIRS)" subdir_do
2181 rm -f
*.o
*.a
*~ init.c-tmp init.l-tmp version.c-tmp
2182 rm -f init.c stamp-init version.c stamp-version
2183 rm -f gdb
$(EXEEXT
) core make.log
2184 rm -f gdb
[0-9]$(EXEEXT
)
2185 rm -f test-cp-name-parser
$(EXEEXT
)
2186 rm -f xml-builtin.c stamp-xml
2188 for i in
$(CONFIG_SRC_SUBDIR
); do \
2190 rm -f
$$i/$(DEPDIR
)/*; \
2193 # This used to depend on c-exp.c m2-exp.c TAGS
2194 # I believe this is wrong; the makefile standards for distclean just
2195 # describe removing files; the only sort of "re-create a distribution"
2196 # functionality described is if the distributed files are unmodified.
2198 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=distclean "DODIRS=$(CLEANDIRS)" subdir_do
2199 rm -f nm.h config.status config.h stamp-h b jit-reader.h gcore stamp-nmh
2200 rm -f gdb-gdb.py gdb-gdb.gdb
2201 rm -f y.output
yacc.acts
yacc.tmp y.tab.h
2202 rm -f config.log config.cache
2205 for i in
$(CONFIG_SRC_SUBDIR
); do \
2206 if
test -d
$$i/$(DEPDIR
); then rmdir
$$i/$(DEPDIR
); fi \
2209 maintainer-clean
: local-maintainer-clean do-maintainer-clean
distclean
2210 realclean: maintainer-clean
2212 local-maintainer-clean
:
2213 @echo
"This command is intended for maintainers to use;"
2214 @echo
"it deletes files that may require special tools to rebuild."
2217 ada-lex.c ada-exp.c \
2218 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c
2221 rm -f nm.h config.status
2223 do-maintainer-clean
:
2224 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=maintainer-clean
"DODIRS=$(CLEANDIRS)" \
2227 diststuff
: $(DISTSTUFF
) $(PACKAGE
).pot
$(CATALOGS
)
2228 cd doc
; $(MAKE
) $(MFLAGS
) diststuff
2231 @for i in
$(DODIRS
); do \
2233 $(REQUIRED_SUBDIRS
)) \
2234 if
[ ! -f .
/$$i/Makefile
] ; then \
2235 echo
"Missing $$i/Makefile" >&2 ; \
2239 if
[ -f .
/$$i/Makefile
] ; then \
2241 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
2242 else exit
1 ; fi
; \
2246 Makefile
: Makefile.in config.status
2247 $(SHELL
) config.status
$@
2251 .
/gdb
$(EXEEXT
) --data-directory
=`pwd`/data-directory
$(GDBFLAGS
)
2253 jit-reader.h
: $(srcdir)/jit-reader.in
2254 $(SHELL
) config.status
$@
2256 gcore
: $(srcdir)/gcore.in
2257 $(SHELL
) config.status
$@
2259 gdb-gdb.py
: $(srcdir)/gdb-gdb.py.in
2260 $(SHELL
) config.status
$@
2262 gdb-gdb.gdb
: $(srcdir)/gdb-gdb.gdb.in
2263 $(SHELL
) config.status
$@
2265 config.h
: stamp-h
; @true
2266 stamp-h
: $(srcdir)/config.in config.status
2267 $(SHELL
) config.status config.h
2269 nm.h
: stamp-nmh
; @true
2270 stamp-nmh
: config.status
2271 $(SHELL
) config.status nm.h
2273 config.status
: $(srcdir)/configure configure.nat configure.tgt configure.host ..
/bfd
/development.sh
2274 $(SHELL
) config.status
--recheck
2277 ACLOCAL_AMFLAGS
= -I ..
/config
2279 # Keep these in sync with the includes in acinclude.m4.
2282 acx_configure_dir.m4 \
2285 ..
/config
/acinclude.m4 \
2286 ..
/config
/enable.m4 \
2287 ..
/config
/plugins.m4 \
2288 ..
/config
/lead-dot.m4 \
2289 ..
/config
/override.m4 \
2290 ..
/config
/largefile.m4 \
2291 ..
/config
/gettext-sister.m4 \
2292 ..
/config
/lib-ld.m4 \
2293 ..
/config
/lib-prefix.m4 \
2294 ..
/config
/lib-link.m4 \
2297 ..
/config
/depstand.m4 \
2298 ..
/config
/lcmessage.m4 \
2299 ..
/config
/codeset.m4 \
2301 ..
/config
/ax_pthread.m4
2303 $(srcdir)/aclocal.m4
: @MAINTAINER_MODE_TRUE@
$(aclocal_m4_deps
)
2304 cd
$(srcdir) && $(ACLOCAL
) $(ACLOCAL_AMFLAGS
)
2307 configure_deps
= $(srcdir)/configure.ac
$(srcdir)/aclocal.m4
2308 $(srcdir)/configure
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2309 cd
$(srcdir) && $(AUTOCONF
)
2311 AUTOHEADER
= autoheader
2312 $(srcdir)/config.in
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2313 cd
$(srcdir) && $(AUTOHEADER
)
2317 # automatic rebuilding in automake-generated Makefiles requires
2318 # this rule in the toplevel Makefile, which, with GNU make, causes
2319 # the desired updates through the implicit regeneration of the Makefile
2320 # and all of its prerequisites.
2327 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
2329 cd doc
; $(MAKE
) refcard.
dvi $(FLAGS_TO_PASS
)
2331 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
2333 cd doc
; $(MAKE
) refcard.ps
$(FLAGS_TO_PASS
)
2335 # GDB MANUAL: TeX dvi file
2337 cd doc
; $(MAKE
) gdb.
dvi $(FLAGS_TO_PASS
)
2339 # GDB MANUAL: info file
2341 cd doc
; $(MAKE
) gdb.
info $(FLAGS_TO_PASS
)
2343 # Make copying.c from COPYING
2344 $(srcdir)/copying.c
: @MAINTAINER_MODE_TRUE@
$(srcdir)/..
/COPYING3
$(srcdir)/copying.awk
2345 awk
-f
$(srcdir)/copying.awk \
2346 < $(srcdir)/..
/COPYING3
> $(srcdir)/copying.tmp
2347 mv
$(srcdir)/copying.tmp
$(srcdir)/copying.c
2349 version.c
: stamp-version
; @true
2350 # Note that the obvious names for the temp file are taken by
2351 # create-version.sh.
2352 stamp-version
: Makefile version.in
$(srcdir)/..
/bfd
/version.h
$(srcdir)/..
/gdbsupport
/create-version.sh
2353 $(ECHO_GEN
) $(SHELL
) $(srcdir)/..
/gdbsupport
/create-version.sh
$(srcdir) \
2354 $(host_alias
) $(target_alias
) version-t.t
2355 @
$(SHELL
) $(srcdir)/..
/move-if-change version-t.t version.c
2356 @echo stamp
> stamp-version
2359 gdb.cxref
: $(SFILES
)
2360 cxref
-I.
$(SFILES
) >gdb.cxref
2364 # GNU Make has an annoying habit of putting *all* the Makefile variables
2365 # into the environment, unless you include this target as a circumvention.
2366 # Rumor is that this will be fixed (and this target can be removed)
2370 # GNU Make 3.63 has a different problem: it keeps tacking command line
2371 # overrides onto the definition of $(MAKE). This variable setting
2375 # Some files need explicit build rules (due to -Werror problems) or due
2376 # to sub-directory fun 'n' games.
2378 # ada-exp.c can appear in srcdir, for releases; or in ., for
2379 # development builds.
2380 ADA_EXP_C
= `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
2382 ada-exp.o
: ada-exp.c
2383 $(COMPILE
) $(ADA_EXP_C
)
2386 # Message files. Based on code in gcc/Makefile.in.
2388 # Rules for generating translated message descriptions. Disabled by
2389 # autoconf if the tools are not available.
2391 .PHONY
: all-po install-po uninstall-po clean-po update-po
$(PACKAGE
).pot
2395 # This notation should be acceptable to all Make implementations used
2396 # by people who are interested in updating .po files.
2397 update-po
: $(CATALOGS
:.gmo
=.pox
)
2399 # N.B. We do not attempt to copy these into $(srcdir). The snapshot
2402 -test -d po || mkdir po
2403 $(GMSGFMT
) --statistics
-o
$@
$<
2405 # The new .po has to be gone over by hand, so we deposit it into
2406 # build/po with a different extension. If build/po/$(PACKAGE).pot
2407 # exists, use it (it was just created), else use the one in srcdir.
2409 -test -d po || mkdir po
2410 $(MSGMERGE
) $< `if test -f po/$(PACKAGE).pot; \
2411 then echo po/$(PACKAGE).pot; \
2412 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o
$@
2414 # This rule has to look for .gmo modules in both srcdir and the cwd,
2415 # and has to check that we actually have a catalog for each language,
2416 # in case they weren't built or included with the distribution.
2418 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(datadir)
2419 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2420 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2421 if
[ -f
$$cat ]; then
:; \
2422 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2425 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2426 echo
$(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir; \
2427 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir || exit
1; \
2428 echo
$(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2429 $(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2432 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2433 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2434 if
[ -f
$$cat ]; then
:; \
2435 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2438 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2439 rm -f
$(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2441 # Delete po/*.gmo only if we are not building in the source directory.
2443 -if
[ ! -f Makefile.in
]; then
rm -f po
/*.gmo
; fi
2445 # Rule for regenerating the message template (gdb.pot). Instead of
2446 # forcing everyone to edit POTFILES.in, which proved impractical, this
2447 # rule has no dependencies and always regenerates gdb.pot. This is
2448 # relatively harmless since the .po files do not directly depend on
2449 # it. The .pot file is left in the build directory. Since GDB's
2450 # Makefile lacks a cannonical list of sources (missing xm, tm and nm
2451 # files) force this rule.
2452 $(PACKAGE
).pot
: po
/$(PACKAGE
).pot
2453 po
/$(PACKAGE
).pot
: force
2454 -test -d po || mkdir po
2455 sh
-e
$(srcdir)/po
/gdbtext
$(XGETTEXT
) $(PACKAGE
) .
$(srcdir)
2459 # YACC/LEX dependencies
2461 # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
2462 # exist in srcdir, then compiled in objdir to LANG-exp.o. If we
2463 # said LANG-exp.c rather than ./c-exp.c some makes would
2464 # sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus
2465 # decls for malloc/realloc/free which conflict with everything else.
2466 # Strictly speaking c-exp.c should therefore depend on
2467 # Makefile.in, but that was a pretty big annoyance.
2470 $(ECHO_YACC
) $(SHELL
) $(YLWRAP
) $< y.tab.c
$@.tmp
-- \
2471 $(YACC
) $(YFLAGS
) ||
(rm -f
$@.tmp
; false
)
2472 @sed
-e
'/extern.*malloc/d' \
2473 -e
'/extern.*realloc/d' \
2474 -e
'/extern.*free/d' \
2475 -e
'/include.*malloc.h/d' \
2476 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2477 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2478 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2479 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2480 -e
'/^#line.*y.tab.c/d' \
2481 -e
's/YY_NULL/YY_NULLPTR/g' \
2482 < $@.tmp
> $@.new
&& \
2486 $(ECHO_LEX
) $(FLEX
) -t
$< > $@.tmp ||
(rm -f
$@.tmp
; false
)
2487 @sed
-e
'/extern.*malloc/d' \
2488 -e
'/extern.*realloc/d' \
2489 -e
'/extern.*free/d' \
2490 -e
'/include.*malloc.h/d' \
2491 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2492 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2493 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2494 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2495 -e
's/yy_flex_xrealloc/yyxrealloc/g' \
2496 < $@.tmp
> $@.new
&& \
2502 xml-builtin.c
: stamp-xml
; @true
2503 stamp-xml
: $(srcdir)/features
/feature_to_c.sh Makefile
$(XMLFILES
)
2504 $(SILENCE
) rm -f xml-builtin.tmp
2505 $(ECHO_GEN_XML_BUILTIN
) AWK
="$(AWK)" \
2506 $(SHELL
) $(srcdir)/features
/feature_to_c.sh \
2507 xml-builtin.tmp
$(XMLFILES
)
2508 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change xml-builtin.tmp xml-builtin.c
2509 $(SILENCE
) echo stamp
> stamp-xml
2511 .PRECIOUS
: xml-builtin.c
2514 # GDBTK sub-directory
2517 all-gdbtk
: insight
$(EXEEXT
)
2520 transformed_name
=`t='$(program_transform_name)'; \
2521 echo insight | sed -e $$t` ; \
2522 if
test "x$$transformed_name" = x
; then \
2523 transformed_name
=insight
; \
2527 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
2528 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) insight
$(EXEEXT
) \
2529 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2530 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2531 $(DESTDIR
)$(GDBTK_LIBRARY
) ; \
2532 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2533 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
) ; \
2534 $(INSTALL_DATA
) $(srcdir)/gdbtk
/plugins
/plugins.tcl \
2535 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
)/plugins.tcl
; \
2536 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2537 $(DESTDIR
)$(GDBTK_LIBRARY
)/images \
2538 $(DESTDIR
)$(GDBTK_LIBRARY
)/images2
; \
2539 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2540 $(DESTDIR
)$(GDBTK_LIBRARY
)/help \
2541 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/images \
2542 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/trace
; \
2543 cd
$(srcdir)/gdbtk
/library
; \
2544 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
; \
2546 $(INSTALL_DATA
) $$i $(DESTDIR
)$(GDBTK_LIBRARY
)/$$i ; \
2550 transformed_name
=`t='$(program_transform_name)'; \
2551 echo insight | sed -e $$t` ; \
2552 if
test "x$$transformed_name" = x
; then \
2553 transformed_name
=insight
; \
2557 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2558 rm -rf
$(DESTDIR
)$(GDBTK_LIBRARY
)
2561 rm -f insight
$(EXEEXT
)
2563 # Removing the old gdb first works better if it is running, at least on SunOS.
2564 insight
$(EXEEXT
): gdbtk-main.o libgdb.a
$(CDEPS
) $(TDEPLIBS
)
2565 rm -f insight
$(EXEEXT
)
2566 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
2567 -o insight
$(EXEEXT
) gdbtk-main.o libgdb.a \
2568 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
2570 gdbres.o
: $(srcdir)/gdbtk
/gdb.rc
$(srcdir)/gdbtk
/gdbtool.ico
2571 $(WINDRES
) --include $(srcdir)/gdbtk
$(srcdir)/gdbtk
/gdb.rc gdbres.o
2573 all_gdbtk_cflags
= $(IDE_CFLAGS
) $(ITCL_CFLAGS
) \
2574 $(ITK_CFLAGS
) $(TCL_CFLAGS
) $(TK_CFLAGS
) $(X11_CFLAGS
) \
2576 -DGDBTK_LIBRARY
=\"$(GDBTK_LIBRARY
)\" \
2577 -DSRC_DIR
=\"$(GDBTK_SRC_DIR
)\"
2580 # Dependency tracking.
2583 ifeq ($(DEPMODE
),depmode
=gcc3
)
2584 # Note that we put the dependencies into a .Tpo file, then move them
2585 # into place if the compile succeeds. We need this because gcc does
2586 # not atomically write the dependency output file.
2587 override COMPILE.post
= -c
-o
$@
-MT
$@
-MMD
-MP \
2588 -MF
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo
2589 override POSTCOMPILE
= @mv
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo \
2590 $(@D
)/$(DEPDIR
)/$(basename $(@F
)).Po
2592 override COMPILE.pre
= source
='$<' object
='$@' libtool
=no \
2593 DEPDIR
=$(DEPDIR
) $(DEPMODE
) $(depcomp
) \
2594 $(CXX
) -x c
++ $(CXX_DIALECT
)
2595 # depcomp handles atomicity for us, so we don't need a postcompile
2597 override POSTCOMPILE
=
2600 # A list of all the objects we might care about in this build, for
2601 # dependency tracking.
2602 all_object_files
= gdb.o
$(LIBGDB_OBS
) gdbtk-main.o \
2603 test-cp-name-parser.o
2605 # All the .deps files to include.
2606 all_deps_files
= $(foreach dep
,$(patsubst %.o
,%.Po
,$(all_object_files
)),\
2607 $(dir $(dep
))/$(DEPDIR
)/$(notdir $(dep
)))
2609 # Ensure that generated files are created early. Use order-only
2610 # dependencies if available. They require GNU make 3.80 or newer,
2611 # and the .VARIABLES variable was introduced at the same time.
2613 $(all_object_files
): |
$(generated_files
)
2615 $(all_object_files
) : $(generated_files
)
2619 -include $(all_deps_files
)
2621 # Disable implicit make rules.
2622 include $(srcdir)/disable-implicit-rules.mk
2624 ### end of the gdb Makefile.in.