1 # Copyright (C) 1989-2020 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
$@
121 COMPILE
= $(ECHO_CXX
) $(COMPILE.pre
) $(INTERNAL_CFLAGS
) $(COMPILE.post
)
126 # This is used to rebuild ada-lex.c from ada-lex.l. If the program is
127 # not defined, but ada-lex.c is present, compilation will continue,
128 # possibly with a warning.
131 YLWRAP
= $(srcdir)/..
/ylwrap
133 # where to find makeinfo, preferably one designed for texinfo-2
134 MAKEINFO
= @MAKEINFO@
135 MAKEINFOFLAGS
= @MAKEINFOFLAGS@
136 MAKEINFO_EXTRA_FLAGS
= @MAKEINFO_EXTRA_FLAGS@
137 MAKEINFO_CMD
= $(MAKEINFO
) $(MAKEINFOFLAGS
) $(MAKEINFO_EXTRA_FLAGS
)
139 MAKEHTML
= $(MAKEINFO_CMD
) --html
142 # Set this up with gcc if you have gnu ld and the loader will print out
143 # line numbers for undefined references.
145 CC_LD
= $(CXX
) $(CXX_DIALECT
)
147 # Where is our "include" directory? Typically $(srcdir)/../include.
148 # This is essentially the header file directory for the library
149 # routines in libiberty.
150 INCLUDE_DIR
= $(srcdir)/..
/include
151 INCLUDE_CFLAGS
= -I
$(INCLUDE_DIR
)
153 # Where is the "-liberty" library? Typically in ../libiberty.
154 LIBIBERTY
= ..
/libiberty
/libiberty.a
156 # Where is the CTF library? Typically in ../libctf.
157 LIBCTF
= ..
/libctf
/.libs
/libctf.a
159 # Where is the BFD library? Typically in ../bfd.
161 BFD
= $(BFD_DIR
)/libbfd.a
162 BFD_SRC
= $(srcdir)/$(BFD_DIR
)
163 BFD_CFLAGS
= -I
$(BFD_DIR
) -I
$(BFD_SRC
)
165 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
166 # -I../zlib, unless we were configured with --with-system-zlib, in which
167 # case both are empty.
171 # Where is the decnumber library? Typically in ../libdecnumber.
172 LIBDECNUMBER_DIR
= ..
/libdecnumber
173 LIBDECNUMBER
= $(LIBDECNUMBER_DIR
)/libdecnumber.a
174 LIBDECNUMBER_SRC
= $(srcdir)/$(LIBDECNUMBER_DIR
)
175 LIBDECNUMBER_CFLAGS
= -I
$(LIBDECNUMBER_DIR
) -I
$(LIBDECNUMBER_SRC
)
177 # Where is the READLINE library? Typically in ../readline/readline.
178 READLINE_DIR
= ..
/readline
/readline
179 READLINE_SRC
= $(srcdir)/$(READLINE_DIR
)
180 READLINE
= @READLINE@
181 READLINE_DEPS
= @READLINE_DEPS@
182 READLINE_CFLAGS
= @READLINE_CFLAGS@
184 # Where is expat? This will be empty if expat was not available.
185 LIBEXPAT
= @LIBEXPAT@
187 # Where is lzma? This will be empty if lzma was not available.
190 # Where is libbabeltrace? This will be empty if libbabeltrace was not
192 LIBBABELTRACE
= @LIBBABELTRACE@
194 # Where is libxxhash? This will be empty if libxxhash was not
196 LIBXXHASH
= @LIBXXHASH@
198 # Where is libipt? This will be empty if libipt was not available.
201 # Where is libmpfr? This will be empty if libmpfr was not available.
204 # GNU source highlight library.
205 SRCHIGH_LIBS
= @SRCHIGH_LIBS@
206 SRCHIGH_CFLAGS
= @SRCHIGH_CFLAGS@
208 WARN_CFLAGS
= @WARN_CFLAGS@
209 WERROR_CFLAGS
= @WERROR_CFLAGS@
210 GDB_WARN_CFLAGS
= $(WARN_CFLAGS
)
211 GDB_WERROR_CFLAGS
= $(WERROR_CFLAGS
)
213 PTHREAD_CFLAGS
= @PTHREAD_CFLAGS@
214 PTHREAD_LIBS
= @PTHREAD_LIBS@
216 RDYNAMIC
= @RDYNAMIC@
218 # Where is the INTL library? Typically in ../intl.
220 INTL_DEPS
= @LIBINTL_DEP@
221 INTL_CFLAGS
= @INCINTL@
223 # Where is the ICONV library? This will be empty if in libc or not available.
224 LIBICONV
= @LIBICONV@
226 # Did the user give us a --with-gdb-datadir option?
227 GDB_DATADIR
= @GDB_DATADIR@
231 CODESIGN_CERT
= @CODESIGN_CERT@
233 # Flags to pass to gdb when invoked with "make run".
236 # Helper code from gnulib.
237 GNULIB_BUILDDIR
= ..
/gnulib
238 LIBGNU
= $(GNULIB_BUILDDIR
)/import
/libgnu.a
239 INCGNU
= -I
$(srcdir)/..
/gnulib
/import
-I
$(GNULIB_BUILDDIR
)/import
241 SUPPORT
= ..
/gdbsupport
242 LIBSUPPORT
= $(SUPPORT
)/libgdbsupport.a
243 INCSUPPORT
= -I
$(srcdir)/..
-I..
246 # CLI sub directory definitons
260 SUBDIR_CLI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_CLI_SRCS
))
263 # MI sub directory definitons
284 SUBDIR_MI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_MI_SRCS
))
291 # TUI sub directory definitions
308 tui
/tui-wingeneral.c \
311 SUBDIR_TUI_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_TUI_SRCS
))
315 SUBDIR_TUI_CFLAGS
= -DTUI
=1
318 # GCC Compile support sub-directory definitions
320 SUBDIR_GCC_COMPILE_SRCS
= \
322 compile
/compile-c-support.c \
323 compile
/compile-c-symbols.c \
324 compile
/compile-c-types.c \
325 compile
/compile-cplus-symbols.c \
326 compile
/compile-cplus-types.c \
327 compile
/compile-loc2c.c \
328 compile
/compile-object-load.c \
329 compile
/compile-object-run.c
331 SUBDIR_GCC_COMPILE_OBS
= $(patsubst %.c
,%.o
,$(filter %.c
,$(SUBDIR_GCC_COMPILE_SRCS
)))
334 # Guile sub directory definitons for guile support.
336 SUBDIR_GUILE_SRCS
= \
339 guile
/scm-auto-load.c \
341 guile
/scm-breakpoint.c \
344 guile
/scm-exception.c \
347 guile
/scm-iterator.c \
348 guile
/scm-lazy-string.c \
350 guile
/scm-objfile.c \
353 guile
/scm-pretty-print.c \
354 guile
/scm-progspace.c \
355 guile
/scm-safe-call.c \
363 SUBDIR_GUILE_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_GUILE_SRCS
))
366 SUBDIR_GUILE_LDFLAGS
=
367 SUBDIR_GUILE_CFLAGS
=
370 # python sub directory definitons
372 SUBDIR_PYTHON_SRCS
= \
374 python
/py-auto-load.c \
376 python
/py-bpevent.c \
377 python
/py-breakpoint.c \
379 python
/py-continueevent.c \
381 python
/py-evtregistry.c \
383 python
/py-exitedevent.c \
384 python
/py-finishbreakpoint.c \
386 python
/py-framefilter.c \
387 python
/py-function.c \
388 python
/py-gdb-readline.c \
389 python
/py-inferior.c \
390 python
/py-infevents.c \
391 python
/py-infthread.c \
392 python
/py-instruction.c \
393 python
/py-lazy-string.c \
394 python
/py-linetable.c \
395 python
/py-newobjfileevent.c \
396 python
/py-objfile.c \
398 python
/py-prettyprint.c \
399 python
/py-progspace.c \
401 python
/py-record-btrace.c \
402 python
/py-record-full.c \
403 python
/py-signalevent.c \
404 python
/py-stopevent.c \
407 python
/py-threadevent.c \
414 python
/py-xmethods.c \
417 SUBDIR_PYTHON_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_PYTHON_SRCS
))
420 SUBDIR_PYTHON_LDFLAGS
=
421 SUBDIR_PYTHON_CFLAGS
=
423 SUBDIR_UNITTESTS_SRCS
= \
424 unittests
/array-view-selftests.c \
425 unittests
/child-path-selftests.c \
426 unittests
/cli-utils-selftests.c \
427 unittests
/common-utils-selftests.c \
428 unittests
/copy_bitwise-selftests.c \
429 unittests
/environ-selftests.c \
430 unittests
/filtered_iterator-selftests.c \
431 unittests
/format_pieces-selftests.c \
432 unittests
/function-view-selftests.c \
433 unittests
/help-doc-selftests.c \
434 unittests
/lookup_name_info-selftests.c \
435 unittests
/memory-map-selftests.c \
436 unittests
/memrange-selftests.c \
437 unittests
/offset-type-selftests.c \
438 unittests
/observable-selftests.c \
439 unittests
/optional-selftests.c \
440 unittests
/parse-connection-spec-selftests.c \
441 unittests
/ptid-selftests.c \
442 unittests
/main-thread-selftests.c \
443 unittests
/mkdir-recursive-selftests.c \
444 unittests
/rsp-low-selftests.c \
445 unittests
/scoped_fd-selftests.c \
446 unittests
/scoped_mmap-selftests.c \
447 unittests
/scoped_restore-selftests.c \
448 unittests
/string_view-selftests.c \
449 unittests
/style-selftests.c \
450 unittests
/tracepoint-selftests.c \
451 unittests
/tui-selftests.c \
452 unittests
/unpack-selftests.c \
453 unittests
/utils-selftests.c \
454 unittests
/vec-utils-selftests.c \
455 unittests
/xml-utils-selftests.c
457 SUBDIR_UNITTESTS_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_UNITTESTS_SRCS
))
459 SUBDIR_TARGET_SRCS
= target
/waitstatus.c
460 SUBDIR_TARGET_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_TARGET_SRCS
))
463 # Opcodes currently live in one of two places. Either they are in the
464 # opcode library, typically ../opcodes, or they are in a header file
466 # Where is the "-lopcodes" library, with (some of) the opcode tables and
468 OPCODES_DIR
= ..
/opcodes
469 OPCODES_SRC
= $(srcdir)/$(OPCODES_DIR
)
470 OPCODES
= $(OPCODES_DIR
)/libopcodes.a
471 # Where are the other opcode tables which only have header file
473 OP_INCLUDE
= $(INCLUDE_DIR
)/opcode
474 # See TOP_CFLAGS as well.
475 OPCODES_CFLAGS
= -I
$(OP_INCLUDE
)
477 # Allow includes like "opcodes/mumble.h".
478 TOP_CFLAGS
= -I
$(top_srcdir
)/..
480 # The simulator is usually nonexistent; targets that include one
481 # should set this to list all the .o or .a files to be linked in.
484 WIN32LIBS
= @WIN32LIBS@
486 # Tcl et al cflags and libraries
488 TCL_CFLAGS
= @TCL_INCLUDE@
489 GDBTKLIBS
= @GDBTKLIBS@
490 # Extra flags that the GDBTK files need:
491 GDBTK_CFLAGS
= @GDBTK_CFLAGS@
494 TK_CFLAGS
= @TK_INCLUDE@
496 X11_CFLAGS
= @TK_XINCLUDES@
500 WIN32LDAPP
= @WIN32LDAPP@
503 GUI_CFLAGS_X
= @GUI_CFLAGS_X@
504 IDE_CFLAGS
= $(GUI_CFLAGS_X
) $(IDE_CFLAGS_X
)
506 ALL_TCL_CFLAGS
= $(TCL_CFLAGS
) $(TK_CFLAGS
)
508 # The version of gdbtk we're building. This should be kept
509 # in sync with GDBTK_VERSION and friends in gdbtk.h.
511 GDBTK_LIBRARY
= $(datadir)/insight
$(GDBTK_VERSION
)
513 # Gdbtk requires an absolute path to the source directory or
514 # the testsuite won't run properly.
515 GDBTK_SRC_DIR
= @GDBTK_SRC_DIR@
528 SUBDIR_GDBTK_SRCS
= \
529 gdbtk
/generic
/gdbtk.c \
530 gdbtk
/generic
/gdbtk-bp.c \
531 gdbtk
/generic
/gdbtk-cmds.c \
532 gdbtk
/generic
/gdbtk-hooks.c \
533 gdbtk
/generic
/gdbtk-interp.c \
534 gdbtk
/generic
/gdbtk-main.c \
535 gdbtk
/generic
/gdbtk-register.c \
536 gdbtk
/generic
/gdbtk-stack.c \
537 gdbtk
/generic
/gdbtk-varobj.c \
538 gdbtk
/generic
/gdbtk-wrapper.c
540 SUBDIR_GDBTK_DEPS
= $(LIBGUI
) $(TCL_DEPS
) $(TK_DEPS
)
541 SUBDIR_GDBTK_LDFLAGS
=
542 SUBDIR_GDBTK_CFLAGS
= -DGDBTK
544 CONFIG_OBS
= @CONFIG_OBS@
545 CONFIG_SRCS
= @CONFIG_SRCS@
546 CONFIG_DEPS
= @CONFIG_DEPS@
547 CONFIG_LDFLAGS
= @CONFIG_LDFLAGS@
548 ENABLE_CFLAGS
= @ENABLE_CFLAGS@
549 CONFIG_ALL
= @CONFIG_ALL@
550 CONFIG_CLEAN
= @CONFIG_CLEAN@
551 CONFIG_INSTALL
= @CONFIG_INSTALL@
552 CONFIG_UNINSTALL
= @CONFIG_UNINSTALL@
553 HAVE_NATIVE_GCORE_TARGET
= @HAVE_NATIVE_GCORE_TARGET@
555 CONFIG_SRC_SUBDIR
= arch cli dwarf2 mi compile tui unittests guile python \
557 CONFIG_DEP_SUBDIR
= $(addsuffix /$(DEPDIR
),$(CONFIG_SRC_SUBDIR
))
559 # -I. for config files.
560 # -I$(srcdir) for gdb internal headers.
561 # -I$(srcdir)/config for more generic config files.
563 # It is also possible that you will need to add -I/usr/include/sys if
564 # your system doesn't have fcntl.h in /usr/include (which is where it
565 # should be according to Posix).
567 GDB_CFLAGS
= -I.
-I
$(srcdir) -I
$(srcdir)/config \
568 -DLOCALEDIR
="\"$(localedir)\"" $(DEFS
)
570 # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
571 GLOBAL_CFLAGS
= $(MH_CFLAGS
)
573 PROFILE_CFLAGS
= @PROFILE_CFLAGS@
575 # These are specifically reserved for setting from the command line
576 # when running make. I.E.: "make CFLAGS=-Wmissing-prototypes".
578 CXXFLAGS
= @CXXFLAGS@
579 CPPFLAGS
= @CPPFLAGS@
581 # Set by configure, for e.g. expat. Python installations are such that
582 # C headers are included using their basename (for example, we #include
583 # <Python.h> rather than, say, <python/Python.h>). Since the file names
584 # are sometimes a little generic, we think that the risk of collision
585 # with other header files is high. If that happens, we try to mitigate
586 # a bit the consequences by putting the Python includes last in the list.
587 INTERNAL_CPPFLAGS
= $(CPPFLAGS
) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
589 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
590 INTERNAL_CFLAGS_BASE
= \
591 $(CXXFLAGS
) $(GLOBAL_CFLAGS
) $(PROFILE_CFLAGS
) \
592 $(GDB_CFLAGS
) $(OPCODES_CFLAGS
) $(READLINE_CFLAGS
) $(ZLIBINC
) \
593 $(BFD_CFLAGS
) $(INCLUDE_CFLAGS
) $(LIBDECNUMBER_CFLAGS
) \
594 $(INTL_CFLAGS
) $(INCGNU
) $(INCSUPPORT
) $(ENABLE_CFLAGS
) \
595 $(INTERNAL_CPPFLAGS
) $(SRCHIGH_CFLAGS
) $(TOP_CFLAGS
) $(PTHREAD_CFLAGS
)
596 INTERNAL_WARN_CFLAGS
= $(INTERNAL_CFLAGS_BASE
) $(GDB_WARN_CFLAGS
)
597 INTERNAL_CFLAGS
= $(INTERNAL_WARN_CFLAGS
) $(GDB_WERROR_CFLAGS
)
599 # LDFLAGS is specifically reserved for setting from the command line
603 # Profiling options need to go here to work.
604 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
605 # and have it work; that's why CFLAGS is here.
606 # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
608 $(CXXFLAGS
) $(GLOBAL_CFLAGS
) $(MH_LDFLAGS
) \
609 $(LDFLAGS
) $(CONFIG_LDFLAGS
) $(PTHREAD_CFLAGS
)
611 # Libraries and corresponding dependencies for compiling gdb.
612 # XM_CLIBS, defined in *config files, have host-dependent libs.
613 # LIBIBERTY appears twice on purpose.
614 CLIBS
= $(SIM
) $(READLINE
) $(OPCODES
) $(BFD
) $(LIBCTF
) $(ZLIB
) \
615 $(LIBSUPPORT
) $(INTL
) $(LIBIBERTY
) $(LIBDECNUMBER
) \
616 $(XM_CLIBS
) $(GDBTKLIBS
) \
617 @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
618 $(LIBEXPAT
) $(LIBLZMA
) $(LIBBABELTRACE
) $(LIBIPT
) \
619 $(WIN32LIBS
) $(LIBGNU
) $(LIBICONV
) \
620 $(LIBMPFR
) $(SRCHIGH_LIBS
) $(LIBXXHASH
) $(PTHREAD_LIBS
) \
622 CDEPS
= $(NAT_CDEPS
) $(SIM
) $(BFD
) $(READLINE_DEPS
) $(LIBCTF
) \
623 $(OPCODES
) $(INTL_DEPS
) $(LIBIBERTY
) $(CONFIG_DEPS
) $(LIBGNU
) \
631 # XML files to build in to GDB.
633 $(srcdir)/features
/btrace.dtd \
634 $(srcdir)/features
/btrace-conf.dtd \
635 $(srcdir)/features
/gdb-target.dtd \
636 $(srcdir)/features
/library-list.dtd \
637 $(srcdir)/features
/library-list-aix.dtd \
638 $(srcdir)/features
/library-list-svr4.dtd \
639 $(srcdir)/features
/osdata.dtd \
640 $(srcdir)/features
/threads.dtd \
641 $(srcdir)/features
/traceframe-info.dtd \
642 $(srcdir)/features
/xinclude.dtd
644 # Build the ser-*.o files the host supports. This includes ser-unix.o
645 # for any system that supports a POSIX interface to the serial port.
647 SER_HARDWIRE
= @SER_HARDWIRE@
649 # This is remote-sim.o if a simulator is to be linked in.
652 # Target-dependent object files.
653 TARGET_OBS
= @TARGET_OBS@
655 # All target-dependent objects files that require 64-bit CORE_ADDR
656 # (used with --enable-targets=all --enable-64-bit-bfd).
657 ALL_64_TARGET_OBS
= \
658 aarch64-fbsd-tdep.o \
659 aarch64-linux-tdep.o \
660 aarch64-newlib-tdep.o \
661 aarch64-ravenscar-thread.o \
665 alpha-mdebug-tdep.o \
669 amd64-darwin-tdep.o \
677 amd64-windows-tdep.o \
679 arch
/aarch64-insn.o \
685 sparc64-fbsd-tdep.o \
686 sparc64-linux-tdep.o \
687 sparc64-nbsd-tdep.o \
688 sparc64-obsd-tdep.o \
689 sparc64-sol2-tdep.o \
692 # All other target-dependent objects files (used with --enable-targets=all).
698 arch
/arm-get-next-pcs.o \
701 arch
/ppc-linux-common.o \
758 microblaze-linux-tdep.o \
765 mn10300-linux-tdep.o \
781 ppc-ravenscar-thread.o \
787 riscv-ravenscar-thread.o \
791 rs6000-lynx178-tdep.o \
810 sparc-ravenscar-thread.o \
816 tilegx-linux-tdep.o \
826 xtensa-linux-tdep.o \
829 # The following native-target dependent variables are defined on
831 NAT_FILE
= @NAT_FILE@
832 NATDEPFILES
= @NATDEPFILES@
833 NAT_CDEPS
= @NAT_CDEPS@
834 LOADLIBES
= @LOADLIBES@
835 MH_CFLAGS
= @MH_CFLAGS@
836 XM_CLIBS
= @XM_CLIBS@
837 NAT_GENERATED_FILES
= @NAT_GENERATED_FILES@
839 HAVE_NATIVE_GCORE_HOST
= @HAVE_NATIVE_GCORE_HOST@
841 # Native-target dependent makefile fragment comes in here.
844 # End of native-target dependent variables.
848 "exec_prefix=$(exec_prefix)" \
849 "infodir=$(infodir)" \
850 "datarootdir=$(datarootdir)" \
852 "htmldir=$(htmldir)" \
856 "datadir=$(datadir)" \
857 "includedir=$(includedir)" \
858 "against=$(against)" \
859 "DESTDIR=$(DESTDIR)" \
861 "AR_FLAGS=$(AR_FLAGS)" \
865 "CXX_DIALECT=$(CXX_DIALECT)" \
866 "CXXFLAGS=$(CXXFLAGS)" \
867 "DLLTOOL=$(DLLTOOL)" \
868 "LDFLAGS=$(LDFLAGS)" \
870 "MAKEINFO=$(MAKEINFO)" \
871 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
872 "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
873 "MAKEHTML=$(MAKEHTML)" \
874 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
875 "INSTALL=$(INSTALL)" \
876 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
877 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
878 "INSTALL_DATA=$(INSTALL_DATA)" \
879 "RUNTEST=$(RUNTEST)" \
880 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
882 # Flags that we pass when building the testsuite.
884 # empty for native, $(target_alias)/ for cross
885 target_subdir
= @target_subdir@
888 if [ -f $${rootme}/../gcc/xgcc ] ; then \
889 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
890 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/; \
892 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
895 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
898 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
903 if [ -f $${rootme}/../gcc/xg++ ] ; then \
904 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
905 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/; \
907 echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
910 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
913 t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
917 # The use of $$(x_FOR_TARGET) reduces the command line length by not
918 # duplicating the lengthy definition.
919 TARGET_FLAGS_TO_PASS
= \
921 "exec_prefix=$(exec_prefix)" \
922 "against=$(against)" \
923 'CC=$$(CC_FOR_TARGET)' \
924 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
926 'CXX=$$(CXX_FOR_TARGET)' \
927 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
928 "CXXFLAGS=$(CXXFLAGS)" \
929 "INSTALL=$(INSTALL)" \
930 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
931 "INSTALL_DATA=$(INSTALL_DATA)" \
932 "MAKEINFO=$(MAKEINFO)" \
933 "MAKEHTML=$(MAKEHTML)" \
934 "RUNTEST=$(RUNTEST)" \
935 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
936 "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
939 # All source files that go into linking GDB.
941 # Files that should wind up in SFILES and whose corresponding .o
942 # should be in COMMON_OBS.
963 break-catch-syscall.c \
964 break-catch-throw.c \
995 debuginfod-support.c \
1001 dwarf2
/attribute.c \
1002 dwarf2
/comp-unit.c \
1004 dwarf2
/frame-tailcall.c \
1006 dwarf2
/index-cache.c \
1007 dwarf2
/index-common.c \
1008 dwarf2
/index-write.c \
1010 dwarf2
/line-header.c \
1024 filename-seen-cache.c \
1037 gdbarch-selftests.c \
1066 maint-test-options.c \
1067 maint-test-settings.c \
1089 process-stratum-target.c \
1092 progspace-and-thread.c \
1106 run-on-main-thread.c \
1124 target-connection.c \
1126 target-descriptions.c \
1156 # Links made at configuration time should not be specified here, since
1157 # SFILES is used in building the distribution archive.
1181 $(SUBDIR_CLI_SRCS
) \
1182 $(SUBDIR_TARGET_SRCS
) \
1184 $(SUBDIR_GCC_COMPILE_SRCS
)
1186 # Header files that need to have srcdir added. Note that in the cases
1187 # where we use a macro like $(gdbcmd_h), things are carefully arranged
1188 # so that each .h file is listed exactly once (M-x tags-search works
1189 # wrong if TAGS has files twice). Because this is tricky to get
1190 # right, it is probably easiest just to list .h files here directly.
1192 HFILES_NO_SRCDIR
= \
1194 aarch64-ravenscar-thread.h \
1200 amd64-darwin-tdep.h \
1201 amd64-linux-tdep.h \
1242 dwarf2
/frame-tailcall.h \
1245 dwarf2
/index-cache.h \
1246 dwarf2
/index-common.h \
1270 gdb_proc_service.h \
1286 hppa-linux-offsets.h \
1289 i386-darwin-tdep.h \
1294 ia64-libunwind-tdep.h \
1346 ppc-ravenscar-thread.h \
1353 progspace-and-thread.h \
1357 ravenscar-thread.h \
1367 riscv-ravenscar-thread.h \
1371 run-on-main-thread.h \
1395 sparc-ravenscar-thread.h \
1405 target-descriptions.h \
1440 arch
/aarch64-insn.h \
1443 arch
/ppc-linux-common.h \
1444 arch
/ppc-linux-tdesc.h \
1453 compile
/compile-c.h \
1454 compile
/compile-cplus.h \
1455 compile
/compile-internal.h \
1456 compile
/compile-object-load.h \
1457 compile
/compile-object-run.h \
1458 compile
/gcc-c-plugin.h \
1459 compile
/gcc-cp-plugin.h \
1462 config
/djgpp
/langinfo.h \
1463 config
/djgpp
/nl_types.h \
1464 config
/i386
/nm-i386gnu.h \
1465 config
/sparc
/nm-sol2.h \
1473 nat
/aarch64-linux.h \
1474 nat
/aarch64-linux-hw-point.h \
1475 nat
/aarch64-sve-linux-ptrace.h \
1476 nat
/amd64-linux-siginfo.h \
1478 nat
/gdb_thread_db.h \
1479 nat
/fork-inferior.h \
1480 nat
/linux-btrace.h \
1481 nat
/linux-namespaces.h \
1483 nat
/linux-osdata.h \
1484 nat
/linux-personality.h \
1485 nat
/linux-ptrace.h \
1486 nat
/linux-waitpid.h \
1487 nat
/mips-linux-watch.h \
1491 nat
/x86-gcc-cpuid.h \
1493 nat
/x86-linux-dregs.h \
1495 python
/py-events.h \
1496 python
/py-stopevent.h \
1498 python
/python-internal.h \
1499 regformats
/regdef.h \
1503 target
/waitstatus.h \
1517 tui
/tui-wingeneral.h \
1518 tui
/tui-winsource.h \
1521 # Header files that already have srcdir in them, or which are in objdir.
1523 HFILES_WITH_SRCDIR
= \
1527 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1528 # default their values the way we do for SER_HARDWIRE; in the future
1529 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1530 # variables analogous to SER_HARDWIRE which get defaulted in this
1533 DEPFILES
= $(TARGET_OBS
) $(SER_HARDWIRE
) $(NATDEPFILES
) $(SIM_OBS
)
1535 SOURCES
= $(SFILES
) $(ALLDEPFILES
) $(YYFILES
) $(CONFIG_SRCS
)
1536 # Don't include YYFILES (*.c) because we already include *.y in SFILES,
1537 # and it's more useful to see it in the .y file.
1538 TAGFILES_NO_SRCDIR
= $(SFILES
) $(HFILES_NO_SRCDIR
) $(ALLDEPFILES
) \
1540 TAGFILES_WITH_SRCDIR
= $(HFILES_WITH_SRCDIR
)
1542 COMMON_OBS
= $(DEPFILES
) $(CONFIG_OBS
) $(YYOBJ
) \
1546 $(patsubst %.c
,%.o
,$(COMMON_SFILES
)) \
1548 $(SUBDIR_TARGET_OBS
) \
1549 $(SUBDIR_GCC_COMPILE_OBS
)
1551 SUBDIRS
= doc @subdirs@ data-directory
1552 CLEANDIRS
= $(SUBDIRS
)
1554 # List of subdirectories in the build tree that must exist.
1555 # This is used to force build failures in existing trees when
1556 # a new directory is added.
1557 # The format here is for the `case' shell command.
1558 REQUIRED_SUBDIRS
= doc | testsuite | data-directory
1560 # Parser intermediate files.
1573 # ada-lex.c is included by another file, so it shouldn't wind up as a
1575 YYOBJ
= $(filter-out ada-lex.o
,$(patsubst %.c
,%.o
,$(YYFILES
)))
1577 # Things which need to be built when making a distribution.
1579 DISTSTUFF
= $(YYFILES
)
1582 # All generated files which can be included by another file.
1587 $(NAT_GENERATED_FILES
) \
1590 # Flags needed to compile Python code
1591 PYTHON_CFLAGS
= @PYTHON_CFLAGS@
1593 all: gdb
$(EXEEXT
) $(CONFIG_ALL
) gdb-gdb.py gdb-gdb.gdb
1594 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
1596 # Rule for compiling .c files in the top-level gdb directory.
1597 # The order-only dependencies ensure that we create the build subdirectories.
1598 %.o
: %.c |
$(CONFIG_DEP_SUBDIR
)
1602 $(CONFIG_DEP_SUBDIR
):
1603 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$@
1605 # Python files need special flags.
1606 python
/%.o
: INTERNAL_CFLAGS
+= $(PYTHON_CFLAGS
)
1608 # Rules for compiling .c files in the various source subdirectories.
1609 %.o
: $(srcdir)/gdbtk
/generic
/%.c
1610 $(COMPILE
) $(all_gdbtk_cflags
) $<
1615 # The check target can not use subdir_do, because subdir_do does not
1616 # use TARGET_FLAGS_TO_PASS.
1618 @if
[ -f testsuite
/Makefile
]; then \
1619 rootme
=`pwd`; export rootme
; \
1620 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1622 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check; \
1626 @if
[ -f testsuite
/Makefile
]; then \
1627 rootme
=`pwd`; export rootme
; \
1628 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1630 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-perf
; \
1634 @if
[ -f testsuite
/Makefile
]; then \
1635 rootme
=`pwd`; export rootme
; \
1636 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1638 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-read1
; \
1641 check-parallel
: force
1642 @if
[ -f testsuite
/Makefile
]; then \
1643 rootme
=`pwd`; export rootme
; \
1644 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1646 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-parallel
; \
1649 # The idea is to parallelize testing of multilibs, for example:
1650 # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1651 # will run 3 concurrent sessions of check, eventually testing all 10
1652 # combinations. GNU make is required for the % pattern to work, as is
1653 # a shell that expands alternations within braces. If GNU make is not
1654 # used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to
1655 # prevent serialized checking due to the passed RUNTESTFLAGS.
1656 # FIXME: use config.status --config not --version, when available.
1658 @if
[ -f testsuite
/config.status
]; then \
1659 rootme
=`pwd`; export rootme
; \
1660 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1661 target
=`echo "$@" | sed 's,//.*,,'`; \
1662 variant
=`echo "$@" | sed 's,^[^/]*//,,'`; \
1663 vardots
=`echo "$$variant" | sed 's,/,.,g'`; \
1664 testdir
=testsuite.
$$vardots; \
1665 if
[ ! -f
$$testdir/Makefile
] && [ -f testsuite
/config.status
]; then \
1666 configargs
=`cd testsuite && ./config.status --version | \
1667 sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
1668 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$$testdir && \
1670 eval
$(SHELL
) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
1671 "\"--srcdir=\$$rootsrc/testsuite\"" \
1673 else :; fi
&& cd
$$testdir && \
1674 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) \
1675 RUNTESTFLAGS
="--target_board=$$variant $(RUNTESTFLAGS)" \
1676 FORCE_PARALLEL
=$(if
$(FORCE_PARALLEL
),1,$(if
$(RUNTESTFLAGS
),,1)) \
1680 # The set of headers checked by 'check-headers' by default.
1681 CHECK_HEADERS
= $(HFILES_NO_SRCDIR
)
1683 # Try to compile each header in isolation, thus ensuring headers are
1686 # Defaults to checking all $HFILES_NO_SRCDIR headers.
1690 # make check-headers CHECK_HEADERS="header.h list.h"
1692 # to check specific headers.
1695 @echo Checking headers.
1696 for i in
$(CHECK_HEADERS
) ; do \
1697 $(CXX
) $(CXX_DIALECT
) -x c
++-header
-c
-fsyntax-only \
1698 $(INTERNAL_CFLAGS
) -include defs.h
$(srcdir)/$$i ; \
1700 .PHONY
: check-headers
1702 info install-info clean-info
dvi pdf install-pdf html install-html
: force
1703 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
1705 # Traditionally "install" depends on "all". But it may be useful
1706 # not to; for example, if the user has made some trivial change to a
1707 # source file and doesn't care about rebuilding or just wants to save the
1708 # time it takes for make to check that all is up to date.
1709 # install-only is intended to address that need.
1711 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
1713 install-only
: $(CONFIG_INSTALL
)
1714 transformed_name
=`t='$(program_transform_name)'; \
1715 echo gdb | sed -e "$$t"` ; \
1716 if
test "x$$transformed_name" = x
; then \
1717 transformed_name
=gdb
; \
1721 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
1722 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) gdb
$(EXEEXT
) \
1723 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
1724 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(includedir)/gdb
; \
1725 $(INSTALL_DATA
) jit-reader.h
$(DESTDIR
)$(includedir)/gdb
/jit-reader.h
1726 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
1728 transformed_name
=`t='$(program_transform_name)'; \
1729 echo gcore | sed -e "$$t"` ; \
1730 if
test "x$$transformed_name" = x
; then \
1731 transformed_name
=gcore
; \
1735 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
1736 $(INSTALL_SCRIPT
) gcore \
1737 $(DESTDIR
)$(bindir)/$$transformed_name; \
1739 transformed_name
=`t='$(program_transform_name)'; \
1740 echo gdb-add-index | sed -e "$$t"` ; \
1741 if
test "x$$transformed_name" = x
; then \
1742 transformed_name
=gdb-add-index
; \
1746 $(INSTALL_SCRIPT
) $(srcdir)/contrib
/gdb-add-index.sh \
1747 $(DESTDIR
)$(bindir)/$$transformed_name
1748 @
$(MAKE
) DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
1751 $(MAKE
) $(FLAGS_TO_PASS
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" \
1752 install_sh_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG
=-s \
1753 `test -z '$(STRIP)' || \
1754 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
1757 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/guile
/gdb
1760 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/python
/gdb
1762 uninstall: force $(CONFIG_UNINSTALL
)
1763 transformed_name
=`t='$(program_transform_name)'; \
1764 echo gdb | sed -e $$t` ; \
1765 if
test "x$$transformed_name" = x
; then \
1766 transformed_name
=gdb
; \
1770 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) \
1771 $(DESTDIR
)$(man1dir)/$$transformed_name.1
1772 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
1774 transformed_name
=`t='$(program_transform_name)'; \
1775 echo gcore | sed -e "$$t"` ; \
1776 if
test "x$$transformed_name" = x
; then \
1777 transformed_name
=gcore
; \
1781 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name; \
1783 @
$(MAKE
) DO
=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
1785 # The C++ name parser can be built standalone for testing.
1786 test-cp-name-parser.o
: cp-name-parser.c
1787 $(COMPILE
) -DTEST_CPNAMES cp-name-parser.c
1790 test-cp-name-parser
$(EXEEXT
): test-cp-name-parser.o
$(LIBIBERTY
)
1791 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) \
1792 -o test-cp-name-parser
$(EXEEXT
) test-cp-name-parser.o \
1795 # We do this by grepping through sources. If that turns out to be too slow,
1796 # maybe we could just require every .o file to have an initialization routine
1797 # of a given name (top.o -> _initialize_top, etc.).
1799 # Formatting conventions: The name of the _initialize_* routines must start
1800 # in column zero, and must not be inside #if.
1802 # Note that the set of files with init functions might change, or the names
1803 # of the functions might change, so this files needs to depend on all the
1804 # source files that will be linked into gdb. However, due to the way
1805 # this Makefile has generally been written, we do this indirectly, by
1806 # computing the list of source files from the list of object files.
1809 $(patsubst %.o
,%.c
, \
1810 $(patsubst %-exp.o
,%-exp.y
, \
1811 $(filter-out init.o version.o
%_S.o
%_U.o
,\
1814 init.c
: stamp-init
; @true
1815 stamp-init
: $(INIT_FILES
)
1816 @
$(ECHO_INIT_C
) echo
"Making init.c"
1817 @
rm -f init.c-tmp init.l-tmp
1819 @
-for f in
$(INIT_FILES
); do \
1820 sed
-n
-e
's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' \
1821 $(srcdir)/$$f 2>/dev
/null
; \
1823 @echo
'/* Do not modify this file. */' >>init.c-tmp
1824 @echo
'/* It is created automatically by the Makefile. */'>>init.c-tmp
1825 @echo
'#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp
1826 @echo
'extern void initialize_all_files(void);' >>init.c-tmp
1827 @sed
-e
's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp
>>init.c-tmp
1828 @echo
'void' >>init.c-tmp
1829 @echo
'initialize_all_files (void)' >>init.c-tmp
1830 @echo
'{' >>init.c-tmp
1831 @sed
-e
's/\(.*\)/ _initialize_\1 ();/' <init.l-tmp
>>init.c-tmp
1832 @echo
'}' >>init.c-tmp
1833 @
$(SHELL
) $(srcdir)/..
/move-if-change init.c-tmp init.c
1834 @echo stamp
> stamp-init
1838 # Create a library of the gdb object files and build GDB by linking
1841 # init.o is very important. It pulls in the rest of GDB.
1842 LIBGDB_OBS
= $(sort $(COMMON_OBS
)) init.o
1843 libgdb.a
: $(LIBGDB_OBS
)
1845 $(AR
) q libgdb.a
$(LIBGDB_OBS
)
1848 # Removing the old gdb first works better if it is running, at least on SunOS.
1849 gdb
$(EXEEXT
): gdb.o
$(LIBGDB_OBS
) $(CDEPS
) $(TDEPLIBS
)
1850 $(SILENCE
) rm -f gdb
$(EXEEXT
)
1851 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
1852 -o gdb
$(EXEEXT
) gdb.o
$(LIBGDB_OBS
) \
1853 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
1854 ifneq ($(CODESIGN_CERT
),)
1855 $(ECHO_SIGN
) $(CODESIGN
) -s
$(CODESIGN_CERT
) gdb
$(EXEEXT
)
1858 # Convenience rule to handle recursion.
1859 .PHONY
: all-data-directory
1860 all-data-directory
: data-directory
/Makefile
1861 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all DODIRS
=data-directory subdir_do
1863 # This is useful when debugging GDB, because some Unix's don't let you run GDB
1864 # on itself without copying the executable. So "make gdb1" will make
1865 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
1866 # Removing gdb1 before the copy is the right thing if gdb1 is open
1867 # in another process.
1868 gdb1
$(EXEEXT
): gdb
$(EXEEXT
)
1870 cp gdb
$(EXEEXT
) gdb1
$(EXEEXT
)
1872 # Put the proper machine-specific files first, so M-. on a machine
1873 # specific routine gets the one for the correct machine. (FIXME: those
1874 # files go in twice; we should be removing them from the main list).
1876 # TAGS depends on all the files that go into it so you can rebuild TAGS
1877 # with `make TAGS' and not have to say `rm TAGS' first.
1879 GDB_NM_FILE
= @GDB_NM_FILE@
1880 TAGS
: $(TAGFILES_NO_SRCDIR
) $(TAGFILES_WITH_SRCDIR
)
1882 etags
`(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
1883 `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
1884 echo $(srcdir)/$$i ; \
1885 done ; for i in $(TAGFILES_WITH_SRCDIR); do \
1887 done) | sed -e 's/\.o$$/\.c/'` \
1888 `find $(srcdir)/config -name '*.h' -print`
1892 clean mostlyclean: $(CONFIG_CLEAN
)
1893 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=clean "DODIRS=$(CLEANDIRS)" subdir_do
1894 rm -f
*.o
*.a
*~ init.c-tmp init.l-tmp version.c-tmp
1895 rm -f init.c stamp-init version.c stamp-version
1896 rm -f gdb
$(EXEEXT
) core make.log
1897 rm -f gdb
[0-9]$(EXEEXT
)
1898 rm -f test-cp-name-parser
$(EXEEXT
)
1899 rm -f xml-builtin.c stamp-xml
1901 for i in
$(CONFIG_SRC_SUBDIR
); do \
1903 rm -f
$$i/$(DEPDIR
)/*; \
1906 # This used to depend on c-exp.c m2-exp.c TAGS
1907 # I believe this is wrong; the makefile standards for distclean just
1908 # describe removing files; the only sort of "re-create a distribution"
1909 # functionality described is if the distributed files are unmodified.
1911 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=distclean "DODIRS=$(CLEANDIRS)" subdir_do
1912 rm -f nm.h config.status config.h stamp-h b jit-reader.h
1913 rm -f gdb-gdb.py gdb-gdb.gdb
1914 rm -f y.output
yacc.acts
yacc.tmp y.tab.h
1915 rm -f config.log config.cache
1918 for i in
$(CONFIG_SRC_SUBDIR
); do \
1919 if
test -d
$$i/$(DEPDIR
); then rmdir
$$i/$(DEPDIR
); fi \
1922 maintainer-clean
: local-maintainer-clean do-maintainer-clean
distclean
1923 realclean: maintainer-clean
1925 local-maintainer-clean
:
1926 @echo
"This command is intended for maintainers to use;"
1927 @echo
"it deletes files that may require special tools to rebuild."
1930 ada-lex.c ada-exp.c \
1931 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
1934 rm -f nm.h config.status
1936 do-maintainer-clean
:
1937 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=maintainer-clean
"DODIRS=$(CLEANDIRS)" \
1940 diststuff
: $(DISTSTUFF
) $(PACKAGE
).pot
$(CATALOGS
)
1941 cd doc
; $(MAKE
) $(MFLAGS
) diststuff
1944 @for i in
$(DODIRS
); do \
1946 $(REQUIRED_SUBDIRS
)) \
1947 if
[ ! -f .
/$$i/Makefile
] ; then \
1948 echo
"Missing $$i/Makefile" >&2 ; \
1952 if
[ -f .
/$$i/Makefile
] ; then \
1954 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1955 else exit
1 ; fi
; \
1959 Makefile
: Makefile.in config.status
1960 $(SHELL
) config.status
$@
1962 data-directory
/Makefile
: data-directory
/Makefile.in config.status
1963 $(SHELL
) config.status
$@
1967 .
/gdb
$(EXEEXT
) --data-directory
=`pwd`/data-directory
$(GDBFLAGS
)
1969 jit-reader.h
: $(srcdir)/jit-reader.in
1970 $(SHELL
) config.status
$@
1972 gcore
: $(srcdir)/gcore.in
1973 $(SHELL
) config.status
$@
1975 gdb-gdb.py
: $(srcdir)/gdb-gdb.py.in
1976 $(SHELL
) config.status
$@
1978 gdb-gdb.gdb
: $(srcdir)/gdb-gdb.gdb.in
1979 $(SHELL
) config.status
$@
1981 config.h
: stamp-h
; @true
1982 stamp-h
: $(srcdir)/config.in config.status
1983 $(SHELL
) config.status config.h
1985 nm.h
: stamp-nmh
; @true
1986 stamp-nmh
: config.status
1987 $(SHELL
) config.status nm.h
1989 config.status
: $(srcdir)/configure configure.nat configure.tgt configure.host ..
/bfd
/development.sh
1990 $(SHELL
) config.status
--recheck
1993 ACLOCAL_AMFLAGS
= -I ..
/config
1995 # Keep these in sync with the includes in acinclude.m4.
1998 acx_configure_dir.m4 \
2001 ..
/config
/acinclude.m4 \
2002 ..
/config
/plugins.m4 \
2003 ..
/config
/lead-dot.m4 \
2004 ..
/config
/override.m4 \
2005 ..
/config
/largefile.m4 \
2006 ..
/config
/gettext-sister.m4 \
2007 ..
/config
/lib-ld.m4 \
2008 ..
/config
/lib-prefix.m4 \
2009 ..
/config
/lib-link.m4 \
2012 ..
/config
/depstand.m4 \
2013 ..
/config
/lcmessage.m4 \
2014 ..
/config
/codeset.m4 \
2016 ..
/config
/ax_pthread.m4
2018 $(srcdir)/aclocal.m4
: @MAINTAINER_MODE_TRUE@
$(aclocal_m4_deps
)
2019 cd
$(srcdir) && $(ACLOCAL
) $(ACLOCAL_AMFLAGS
)
2022 configure_deps
= $(srcdir)/configure.ac
$(srcdir)/aclocal.m4
2023 $(srcdir)/configure
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2024 cd
$(srcdir) && $(AUTOCONF
)
2026 AUTOHEADER
= autoheader
2027 $(srcdir)/config.in
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2028 cd
$(srcdir) && $(AUTOHEADER
)
2032 # automatic rebuilding in automake-generated Makefiles requires
2033 # this rule in the toplevel Makefile, which, with GNU make, causes
2034 # the desired updates through the implicit regeneration of the Makefile
2035 # and all of its prerequisites.
2042 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
2044 cd doc
; $(MAKE
) refcard.
dvi $(FLAGS_TO_PASS
)
2046 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
2048 cd doc
; $(MAKE
) refcard.ps
$(FLAGS_TO_PASS
)
2050 # GDB MANUAL: TeX dvi file
2052 cd doc
; $(MAKE
) gdb.
dvi $(FLAGS_TO_PASS
)
2054 # GDB MANUAL: info file
2056 cd doc
; $(MAKE
) gdb.
info $(FLAGS_TO_PASS
)
2058 # Make copying.c from COPYING
2059 $(srcdir)/copying.c
: @MAINTAINER_MODE_TRUE@
$(srcdir)/..
/COPYING3
$(srcdir)/copying.awk
2060 awk
-f
$(srcdir)/copying.awk \
2061 < $(srcdir)/..
/COPYING3
> $(srcdir)/copying.tmp
2062 mv
$(srcdir)/copying.tmp
$(srcdir)/copying.c
2064 version.c
: stamp-version
; @true
2065 # Note that the obvious names for the temp file are taken by
2066 # create-version.sh.
2067 stamp-version
: Makefile version.in
$(srcdir)/..
/bfd
/version.h
$(srcdir)/..
/gdbsupport
/create-version.sh
2068 $(ECHO_GEN
) $(SHELL
) $(srcdir)/..
/gdbsupport
/create-version.sh
$(srcdir) \
2069 $(host_alias
) $(target_alias
) version-t.t
2070 @
$(SHELL
) $(srcdir)/..
/move-if-change version-t.t version.c
2071 @echo stamp
> stamp-version
2074 gdb.cxref
: $(SFILES
)
2075 cxref
-I.
$(SFILES
) >gdb.cxref
2079 # GNU Make has an annoying habit of putting *all* the Makefile variables
2080 # into the environment, unless you include this target as a circumvention.
2081 # Rumor is that this will be fixed (and this target can be removed)
2085 # GNU Make 3.63 has a different problem: it keeps tacking command line
2086 # overrides onto the definition of $(MAKE). This variable setting
2092 aarch64-fbsd-nat.c \
2093 aarch64-fbsd-tdep.c \
2094 aarch64-linux-nat.c \
2095 aarch64-linux-tdep.c \
2096 aarch64-newlib-tdep.c \
2097 aarch64-ravenscar-thread.c \
2103 alpha-linux-tdep.c \
2104 alpha-mdebug-tdep.c \
2109 amd64-darwin-tdep.c \
2110 amd64-dicos-tdep.c \
2114 amd64-linux-tdep.c \
2127 arm-get-next-pcs.c \
2134 arm-symbian-tdep.c \
2162 i386-cygwin-tdep.c \
2164 i386-darwin-tdep.c \
2180 ia64-libunwind-tdep.c \
2199 microblaze-linux-tdep.c \
2211 mips64-obsd-tdep.c \
2216 nios2-linux-tdep.c \
2229 ppc-ravenscar-thread.c \
2233 ravenscar-thread.c \
2238 riscv-linux-tdep.c \
2239 riscv-ravenscar-thread.c \
2242 rs6000-lynx178-tdep.c \
2262 sparc-linux-tdep.c \
2267 sparc-ravenscar-thread.c \
2271 sparc64-fbsd-nat.c \
2272 sparc64-fbsd-tdep.c \
2273 sparc64-linux-nat.c \
2274 sparc64-linux-tdep.c \
2276 sparc64-nbsd-nat.c \
2277 sparc64-nbsd-tdep.c \
2278 sparc64-obsd-nat.c \
2279 sparc64-obsd-tdep.c \
2280 sparc64-sol2-tdep.c \
2282 tilegx-linux-nat.c \
2283 tilegx-linux-tdep.c \
2296 xtensa-linux-nat.c \
2297 xtensa-linux-tdep.c \
2301 # Some files need explicit build rules (due to -Werror problems) or due
2302 # to sub-directory fun 'n' games.
2304 # ada-exp.c can appear in srcdir, for releases; or in ., for
2305 # development builds.
2306 ADA_EXP_C
= `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
2308 ada-exp.o
: ada-exp.c
2309 $(COMPILE
) $(ADA_EXP_C
)
2312 # Message files. Based on code in gcc/Makefile.in.
2314 # Rules for generating translated message descriptions. Disabled by
2315 # autoconf if the tools are not available.
2317 .PHONY
: all-po install-po uninstall-po clean-po update-po
$(PACKAGE
).pot
2321 # This notation should be acceptable to all Make implementations used
2322 # by people who are interested in updating .po files.
2323 update-po
: $(CATALOGS
:.gmo
=.pox
)
2325 # N.B. We do not attempt to copy these into $(srcdir). The snapshot
2328 -test -d po || mkdir po
2329 $(GMSGFMT
) --statistics
-o
$@
$<
2331 # The new .po has to be gone over by hand, so we deposit it into
2332 # build/po with a different extension. If build/po/$(PACKAGE).pot
2333 # exists, use it (it was just created), else use the one in srcdir.
2335 -test -d po || mkdir po
2336 $(MSGMERGE
) $< `if test -f po/$(PACKAGE).pot; \
2337 then echo po/$(PACKAGE).pot; \
2338 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o
$@
2340 # This rule has to look for .gmo modules in both srcdir and the cwd,
2341 # and has to check that we actually have a catalog for each language,
2342 # in case they weren't built or included with the distribution.
2344 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(datadir)
2345 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2346 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2347 if
[ -f
$$cat ]; then
:; \
2348 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2351 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2352 echo
$(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir; \
2353 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir || exit
1; \
2354 echo
$(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2355 $(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2358 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2359 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2360 if
[ -f
$$cat ]; then
:; \
2361 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2364 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2365 rm -f
$(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2367 # Delete po/*.gmo only if we are not building in the source directory.
2369 -if
[ ! -f Makefile.in
]; then
rm -f po
/*.gmo
; fi
2371 # Rule for regenerating the message template (gdb.pot). Instead of
2372 # forcing everyone to edit POTFILES.in, which proved impractical, this
2373 # rule has no dependencies and always regenerates gdb.pot. This is
2374 # relatively harmless since the .po files do not directly depend on
2375 # it. The .pot file is left in the build directory. Since GDB's
2376 # Makefile lacks a cannonical list of sources (missing xm, tm and nm
2377 # files) force this rule.
2378 $(PACKAGE
).pot
: po
/$(PACKAGE
).pot
2379 po
/$(PACKAGE
).pot
: force
2380 -test -d po || mkdir po
2381 sh
-e
$(srcdir)/po
/gdbtext
$(XGETTEXT
) $(PACKAGE
) .
$(srcdir)
2385 # YACC/LEX dependencies
2387 # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
2388 # exist in srcdir, then compiled in objdir to LANG-exp.o. If we
2389 # said LANG-exp.c rather than ./c-exp.c some makes would
2390 # sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus
2391 # decls for malloc/realloc/free which conflict with everything else.
2392 # Strictly speaking c-exp.c should therefore depend on
2393 # Makefile.in, but that was a pretty big annoyance.
2396 $(ECHO_YACC
) $(SHELL
) $(YLWRAP
) $< y.tab.c
$@.tmp
-- \
2397 $(YACC
) $(YFLAGS
) ||
(rm -f
$@.tmp
; false
)
2398 @sed
-e
'/extern.*malloc/d' \
2399 -e
'/extern.*realloc/d' \
2400 -e
'/extern.*free/d' \
2401 -e
'/include.*malloc.h/d' \
2402 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2403 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2404 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2405 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2406 -e
'/^#line.*y.tab.c/d' \
2407 -e
's/YY_NULL/YY_NULLPTR/g' \
2408 < $@.tmp
> $@.new
&& \
2412 $(ECHO_LEX
) $(FLEX
) -t
$< \
2413 | sed
-e
'/extern.*malloc/d' \
2414 -e
'/extern.*realloc/d' \
2415 -e
'/extern.*free/d' \
2416 -e
'/include.*malloc.h/d' \
2417 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2418 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2419 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2420 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2421 -e
's/yy_flex_xrealloc/yyxrealloc/g' \
2425 .PRECIOUS
: ada-lex.c
2429 xml-builtin.c
: stamp-xml
; @true
2430 stamp-xml
: $(srcdir)/features
/feature_to_c.sh Makefile
$(XMLFILES
)
2431 $(SILENCE
) rm -f xml-builtin.tmp
2432 $(ECHO_GEN_XML_BUILTIN
) AWK
="$(AWK)" \
2433 $(SHELL
) $(srcdir)/features
/feature_to_c.sh \
2434 xml-builtin.tmp
$(XMLFILES
)
2435 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change xml-builtin.tmp xml-builtin.c
2436 $(SILENCE
) echo stamp
> stamp-xml
2438 .PRECIOUS
: xml-builtin.c
2441 # GDBTK sub-directory
2444 all-gdbtk
: insight
$(EXEEXT
)
2447 transformed_name
=`t='$(program_transform_name)'; \
2448 echo insight | sed -e $$t` ; \
2449 if
test "x$$transformed_name" = x
; then \
2450 transformed_name
=insight
; \
2454 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
2455 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) insight
$(EXEEXT
) \
2456 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2457 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2458 $(DESTDIR
)$(GDBTK_LIBRARY
) ; \
2459 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2460 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
) ; \
2461 $(INSTALL_DATA
) $(srcdir)/gdbtk
/plugins
/plugins.tcl \
2462 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
)/plugins.tcl
; \
2463 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2464 $(DESTDIR
)$(GDBTK_LIBRARY
)/images \
2465 $(DESTDIR
)$(GDBTK_LIBRARY
)/images2
; \
2466 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2467 $(DESTDIR
)$(GDBTK_LIBRARY
)/help \
2468 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/images \
2469 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/trace
; \
2470 cd
$(srcdir)/gdbtk
/library
; \
2471 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
; \
2473 $(INSTALL_DATA
) $$i $(DESTDIR
)$(GDBTK_LIBRARY
)/$$i ; \
2477 transformed_name
=`t='$(program_transform_name)'; \
2478 echo insight | sed -e $$t` ; \
2479 if
test "x$$transformed_name" = x
; then \
2480 transformed_name
=insight
; \
2484 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2485 rm -rf
$(DESTDIR
)$(GDBTK_LIBRARY
)
2488 rm -f insight
$(EXEEXT
)
2490 # Removing the old gdb first works better if it is running, at least on SunOS.
2491 insight
$(EXEEXT
): gdbtk-main.o libgdb.a
$(CDEPS
) $(TDEPLIBS
)
2492 rm -f insight
$(EXEEXT
)
2493 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
2494 -o insight
$(EXEEXT
) gdbtk-main.o libgdb.a \
2495 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
2497 gdbres.o
: $(srcdir)/gdbtk
/gdb.rc
$(srcdir)/gdbtk
/gdbtool.ico
2498 $(WINDRES
) --include $(srcdir)/gdbtk
$(srcdir)/gdbtk
/gdb.rc gdbres.o
2500 all_gdbtk_cflags
= $(IDE_CFLAGS
) $(ITCL_CFLAGS
) \
2501 $(ITK_CFLAGS
) $(TCL_CFLAGS
) $(TK_CFLAGS
) $(X11_CFLAGS
) \
2503 -DGDBTK_LIBRARY
=\"$(GDBTK_LIBRARY
)\" \
2504 -DSRC_DIR
=\"$(GDBTK_SRC_DIR
)\"
2507 # Dependency tracking.
2510 ifeq ($(DEPMODE
),depmode
=gcc3
)
2511 # Note that we put the dependencies into a .Tpo file, then move them
2512 # into place if the compile succeeds. We need this because gcc does
2513 # not atomically write the dependency output file.
2514 override COMPILE.post
= -c
-o
$@
-MT
$@
-MMD
-MP \
2515 -MF
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo
2516 override POSTCOMPILE
= @mv
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo \
2517 $(@D
)/$(DEPDIR
)/$(basename $(@F
)).Po
2519 override COMPILE.pre
= source
='$<' object
='$@' libtool
=no \
2520 DEPDIR
=$(DEPDIR
) $(DEPMODE
) $(depcomp
) \
2521 $(CXX
) -x c
++ $(CXX_DIALECT
)
2522 # depcomp handles atomicity for us, so we don't need a postcompile
2524 override POSTCOMPILE
=
2527 # A list of all the objects we might care about in this build, for
2528 # dependency tracking.
2529 all_object_files
= gdb.o
$(LIBGDB_OBS
) gdbtk-main.o \
2530 test-cp-name-parser.o
2532 # All the .deps files to include.
2533 all_deps_files
= $(foreach dep
,$(patsubst %.o
,%.Po
,$(all_object_files
)),\
2534 $(dir $(dep
))/$(DEPDIR
)/$(notdir $(dep
)))
2536 # Ensure that generated files are created early. Use order-only
2537 # dependencies if available. They require GNU make 3.80 or newer,
2538 # and the .VARIABLES variable was introduced at the same time.
2540 $(all_object_files
): |
$(generated_files
)
2542 $(all_object_files
) : $(generated_files
)
2546 -include $(all_deps_files
)
2548 # Disable implicit make rules.
2549 include $(srcdir)/disable-implicit-rules.mk
2551 ### end of the gdb Makefile.in.