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
=
425 gdbarch-selftests.c \
427 unittests
/array-view-selftests.c \
428 unittests
/child-path-selftests.c \
429 unittests
/cli-utils-selftests.c \
430 unittests
/command-def-selftests.c \
431 unittests
/common-utils-selftests.c \
432 unittests
/copy_bitwise-selftests.c \
433 unittests
/environ-selftests.c \
434 unittests
/filtered_iterator-selftests.c \
435 unittests
/format_pieces-selftests.c \
436 unittests
/function-view-selftests.c \
437 unittests
/lookup_name_info-selftests.c \
438 unittests
/memory-map-selftests.c \
439 unittests
/memrange-selftests.c \
440 unittests
/offset-type-selftests.c \
441 unittests
/observable-selftests.c \
442 unittests
/optional-selftests.c \
443 unittests
/parse-connection-spec-selftests.c \
444 unittests
/ptid-selftests.c \
445 unittests
/main-thread-selftests.c \
446 unittests
/mkdir-recursive-selftests.c \
447 unittests
/rsp-low-selftests.c \
448 unittests
/scoped_fd-selftests.c \
449 unittests
/scoped_mmap-selftests.c \
450 unittests
/scoped_restore-selftests.c \
451 unittests
/string_view-selftests.c \
452 unittests
/style-selftests.c \
453 unittests
/tracepoint-selftests.c \
454 unittests
/tui-selftests.c \
455 unittests
/unpack-selftests.c \
456 unittests
/utils-selftests.c \
457 unittests
/vec-utils-selftests.c \
458 unittests
/xml-utils-selftests.c
460 SELFTESTS_OBS
= $(patsubst %.c
,%.o
,$(SELFTESTS_SRCS
))
462 SUBDIR_TARGET_SRCS
= target
/waitstatus.c
463 SUBDIR_TARGET_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_TARGET_SRCS
))
466 # Opcodes currently live in one of two places. Either they are in the
467 # opcode library, typically ../opcodes, or they are in a header file
469 # Where is the "-lopcodes" library, with (some of) the opcode tables and
471 OPCODES_DIR
= ..
/opcodes
472 OPCODES_SRC
= $(srcdir)/$(OPCODES_DIR
)
473 OPCODES
= $(OPCODES_DIR
)/libopcodes.a
474 # Where are the other opcode tables which only have header file
476 OP_INCLUDE
= $(INCLUDE_DIR
)/opcode
477 # See TOP_CFLAGS as well.
478 OPCODES_CFLAGS
= -I
$(OP_INCLUDE
)
480 # Allow includes like "opcodes/mumble.h".
481 TOP_CFLAGS
= -I
$(top_srcdir
)/..
483 # The simulator is usually nonexistent; targets that include one
484 # should set this to list all the .o or .a files to be linked in.
487 WIN32LIBS
= @WIN32LIBS@
489 # Tcl et al cflags and libraries
491 TCL_CFLAGS
= @TCL_INCLUDE@
492 GDBTKLIBS
= @GDBTKLIBS@
493 # Extra flags that the GDBTK files need:
494 GDBTK_CFLAGS
= @GDBTK_CFLAGS@
497 TK_CFLAGS
= @TK_INCLUDE@
499 X11_CFLAGS
= @TK_XINCLUDES@
503 WIN32LDAPP
= @WIN32LDAPP@
506 GUI_CFLAGS_X
= @GUI_CFLAGS_X@
507 IDE_CFLAGS
= $(GUI_CFLAGS_X
) $(IDE_CFLAGS_X
)
509 ALL_TCL_CFLAGS
= $(TCL_CFLAGS
) $(TK_CFLAGS
)
511 # The version of gdbtk we're building. This should be kept
512 # in sync with GDBTK_VERSION and friends in gdbtk.h.
514 GDBTK_LIBRARY
= $(datadir)/insight
$(GDBTK_VERSION
)
516 # Gdbtk requires an absolute path to the source directory or
517 # the testsuite won't run properly.
518 GDBTK_SRC_DIR
= @GDBTK_SRC_DIR@
531 SUBDIR_GDBTK_SRCS
= \
532 gdbtk
/generic
/gdbtk.c \
533 gdbtk
/generic
/gdbtk-bp.c \
534 gdbtk
/generic
/gdbtk-cmds.c \
535 gdbtk
/generic
/gdbtk-hooks.c \
536 gdbtk
/generic
/gdbtk-interp.c \
537 gdbtk
/generic
/gdbtk-main.c \
538 gdbtk
/generic
/gdbtk-register.c \
539 gdbtk
/generic
/gdbtk-stack.c \
540 gdbtk
/generic
/gdbtk-varobj.c \
541 gdbtk
/generic
/gdbtk-wrapper.c
543 SUBDIR_GDBTK_DEPS
= $(LIBGUI
) $(TCL_DEPS
) $(TK_DEPS
)
544 SUBDIR_GDBTK_LDFLAGS
=
545 SUBDIR_GDBTK_CFLAGS
= -DGDBTK
547 CONFIG_OBS
= @CONFIG_OBS@
548 CONFIG_SRCS
= @CONFIG_SRCS@
549 CONFIG_DEPS
= @CONFIG_DEPS@
550 CONFIG_LDFLAGS
= @CONFIG_LDFLAGS@
551 ENABLE_CFLAGS
= @ENABLE_CFLAGS@
552 CONFIG_ALL
= @CONFIG_ALL@
553 CONFIG_CLEAN
= @CONFIG_CLEAN@
554 CONFIG_INSTALL
= @CONFIG_INSTALL@
555 CONFIG_UNINSTALL
= @CONFIG_UNINSTALL@
556 HAVE_NATIVE_GCORE_TARGET
= @HAVE_NATIVE_GCORE_TARGET@
558 CONFIG_SRC_SUBDIR
= arch cli dwarf2 mi compile tui unittests guile python \
560 CONFIG_DEP_SUBDIR
= $(addsuffix /$(DEPDIR
),$(CONFIG_SRC_SUBDIR
))
562 # -I. for config files.
563 # -I$(srcdir) for gdb internal headers.
564 # -I$(srcdir)/config for more generic config files.
566 # It is also possible that you will need to add -I/usr/include/sys if
567 # your system doesn't have fcntl.h in /usr/include (which is where it
568 # should be according to Posix).
570 GDB_CFLAGS
= -I.
-I
$(srcdir) -I
$(srcdir)/config \
571 -DLOCALEDIR
="\"$(localedir)\"" $(DEFS
)
573 # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
574 GLOBAL_CFLAGS
= $(MH_CFLAGS
)
576 PROFILE_CFLAGS
= @PROFILE_CFLAGS@
578 # These are specifically reserved for setting from the command line
579 # when running make. I.E.: "make CFLAGS=-Wmissing-prototypes".
581 CXXFLAGS
= @CXXFLAGS@
582 CPPFLAGS
= @CPPFLAGS@
584 # Set by configure, for e.g. expat. Python installations are such that
585 # C headers are included using their basename (for example, we #include
586 # <Python.h> rather than, say, <python/Python.h>). Since the file names
587 # are sometimes a little generic, we think that the risk of collision
588 # with other header files is high. If that happens, we try to mitigate
589 # a bit the consequences by putting the Python includes last in the list.
590 INTERNAL_CPPFLAGS
= $(CPPFLAGS
) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
592 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
593 INTERNAL_CFLAGS_BASE
= \
594 $(CXXFLAGS
) $(GLOBAL_CFLAGS
) $(PROFILE_CFLAGS
) \
595 $(GDB_CFLAGS
) $(OPCODES_CFLAGS
) $(READLINE_CFLAGS
) $(ZLIBINC
) \
596 $(BFD_CFLAGS
) $(INCLUDE_CFLAGS
) $(LIBDECNUMBER_CFLAGS
) \
597 $(INTL_CFLAGS
) $(INCGNU
) $(INCSUPPORT
) $(ENABLE_CFLAGS
) \
598 $(INTERNAL_CPPFLAGS
) $(SRCHIGH_CFLAGS
) $(TOP_CFLAGS
) $(PTHREAD_CFLAGS
)
599 INTERNAL_WARN_CFLAGS
= $(INTERNAL_CFLAGS_BASE
) $(GDB_WARN_CFLAGS
)
600 INTERNAL_CFLAGS
= $(INTERNAL_WARN_CFLAGS
) $(GDB_WERROR_CFLAGS
)
602 # LDFLAGS is specifically reserved for setting from the command line
606 # Profiling options need to go here to work.
607 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
608 # and have it work; that's why CFLAGS is here.
609 # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
611 $(CXXFLAGS
) $(GLOBAL_CFLAGS
) $(MH_LDFLAGS
) \
612 $(LDFLAGS
) $(CONFIG_LDFLAGS
) $(PTHREAD_CFLAGS
)
614 # Libraries and corresponding dependencies for compiling gdb.
615 # XM_CLIBS, defined in *config files, have host-dependent libs.
616 # LIBIBERTY appears twice on purpose.
617 CLIBS
= $(SIM
) $(READLINE
) $(OPCODES
) $(BFD
) $(LIBCTF
) $(ZLIB
) \
618 $(LIBSUPPORT
) $(INTL
) $(LIBIBERTY
) $(LIBDECNUMBER
) \
619 $(XM_CLIBS
) $(GDBTKLIBS
) \
620 @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
621 $(LIBEXPAT
) $(LIBLZMA
) $(LIBBABELTRACE
) $(LIBIPT
) \
622 $(WIN32LIBS
) $(LIBGNU
) $(LIBICONV
) \
623 $(LIBMPFR
) $(SRCHIGH_LIBS
) $(LIBXXHASH
) $(PTHREAD_LIBS
) \
625 CDEPS
= $(NAT_CDEPS
) $(SIM
) $(BFD
) $(READLINE_DEPS
) $(LIBCTF
) \
626 $(OPCODES
) $(INTL_DEPS
) $(LIBIBERTY
) $(CONFIG_DEPS
) $(LIBGNU
) \
634 # XML files to build in to GDB.
636 $(srcdir)/features
/btrace.dtd \
637 $(srcdir)/features
/btrace-conf.dtd \
638 $(srcdir)/features
/gdb-target.dtd \
639 $(srcdir)/features
/library-list.dtd \
640 $(srcdir)/features
/library-list-aix.dtd \
641 $(srcdir)/features
/library-list-svr4.dtd \
642 $(srcdir)/features
/osdata.dtd \
643 $(srcdir)/features
/threads.dtd \
644 $(srcdir)/features
/traceframe-info.dtd \
645 $(srcdir)/features
/xinclude.dtd
647 # Build the ser-*.o files the host supports. This includes ser-unix.o
648 # for any system that supports a POSIX interface to the serial port.
650 SER_HARDWIRE
= @SER_HARDWIRE@
652 # This is remote-sim.o if a simulator is to be linked in.
655 # Target-dependent object files.
656 TARGET_OBS
= @TARGET_OBS@
658 # All target-dependent objects files that require 64-bit CORE_ADDR
659 # (used with --enable-targets=all --enable-64-bit-bfd).
660 ALL_64_TARGET_OBS
= \
661 aarch64-fbsd-tdep.o \
662 aarch64-linux-tdep.o \
663 aarch64-newlib-tdep.o \
664 aarch64-ravenscar-thread.o \
668 alpha-mdebug-tdep.o \
672 amd64-darwin-tdep.o \
680 amd64-windows-tdep.o \
682 arch
/aarch64-insn.o \
688 sparc64-fbsd-tdep.o \
689 sparc64-linux-tdep.o \
690 sparc64-nbsd-tdep.o \
691 sparc64-obsd-tdep.o \
692 sparc64-sol2-tdep.o \
695 # All other target-dependent objects files (used with --enable-targets=all).
702 arch
/arm-get-next-pcs.o \
705 arch
/ppc-linux-common.o \
748 i386-windows-tdep.o \
762 microblaze-linux-tdep.o \
769 mn10300-linux-tdep.o \
785 ppc-ravenscar-thread.o \
791 riscv-ravenscar-thread.o \
795 rs6000-lynx178-tdep.o \
814 sparc-ravenscar-thread.o \
820 tilegx-linux-tdep.o \
830 xtensa-linux-tdep.o \
833 # The following native-target dependent variables are defined on
835 NAT_FILE
= @NAT_FILE@
836 NATDEPFILES
= @NATDEPFILES@
837 NAT_CDEPS
= @NAT_CDEPS@
838 LOADLIBES
= @LOADLIBES@
839 MH_CFLAGS
= @MH_CFLAGS@
840 XM_CLIBS
= @XM_CLIBS@
841 NAT_GENERATED_FILES
= @NAT_GENERATED_FILES@
843 HAVE_NATIVE_GCORE_HOST
= @HAVE_NATIVE_GCORE_HOST@
845 # Native-target dependent makefile fragment comes in here.
848 # End of native-target dependent variables.
852 "exec_prefix=$(exec_prefix)" \
853 "infodir=$(infodir)" \
854 "datarootdir=$(datarootdir)" \
856 "htmldir=$(htmldir)" \
860 "datadir=$(datadir)" \
861 "includedir=$(includedir)" \
862 "against=$(against)" \
863 "DESTDIR=$(DESTDIR)" \
865 "AR_FLAGS=$(AR_FLAGS)" \
869 "CXX_DIALECT=$(CXX_DIALECT)" \
870 "CXXFLAGS=$(CXXFLAGS)" \
871 "DLLTOOL=$(DLLTOOL)" \
872 "LDFLAGS=$(LDFLAGS)" \
874 "MAKEINFO=$(MAKEINFO)" \
875 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
876 "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
877 "MAKEHTML=$(MAKEHTML)" \
878 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
879 "INSTALL=$(INSTALL)" \
880 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
881 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
882 "INSTALL_DATA=$(INSTALL_DATA)" \
883 "RUNTEST=$(RUNTEST)" \
884 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
886 # Flags that we pass when building the testsuite.
888 # empty for native, $(target_alias)/ for cross
889 target_subdir
= @target_subdir@
892 if [ -f $${rootme}/../gcc/xgcc ] ; then \
893 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
894 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/; \
896 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
899 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
902 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
907 if [ -f $${rootme}/../gcc/xg++ ] ; then \
908 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
909 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/; \
911 echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
914 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
917 t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
921 # The use of $$(x_FOR_TARGET) reduces the command line length by not
922 # duplicating the lengthy definition.
923 TARGET_FLAGS_TO_PASS
= \
925 "exec_prefix=$(exec_prefix)" \
926 "against=$(against)" \
927 'CC=$$(CC_FOR_TARGET)' \
928 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
930 'CXX=$$(CXX_FOR_TARGET)' \
931 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
932 "CXXFLAGS=$(CXXFLAGS)" \
933 "INSTALL=$(INSTALL)" \
934 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
935 "INSTALL_DATA=$(INSTALL_DATA)" \
936 "MAKEINFO=$(MAKEINFO)" \
937 "MAKEHTML=$(MAKEHTML)" \
938 "RUNTEST=$(RUNTEST)" \
939 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
940 "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
943 # All source files that go into linking GDB.
945 # Files that should wind up in SFILES and whose corresponding .o
946 # should be in COMMON_OBS.
968 break-catch-syscall.c \
969 break-catch-throw.c \
1000 debuginfod-support.c \
1005 dwarf2
/attribute.c \
1006 dwarf2
/comp-unit.c \
1009 dwarf2
/frame-tailcall.c \
1011 dwarf2
/index-cache.c \
1012 dwarf2
/index-common.c \
1013 dwarf2
/index-write.c \
1015 dwarf2
/line-header.c \
1020 dwarf2
/stringify.c \
1030 filename-seen-cache.c \
1071 maint-test-options.c \
1072 maint-test-settings.c \
1094 process-stratum-target.c \
1097 progspace-and-thread.c \
1111 run-on-main-thread.c \
1129 target-connection.c \
1131 target-descriptions.c \
1161 # Links made at configuration time should not be specified here, since
1162 # SFILES is used in building the distribution archive.
1186 $(SUBDIR_CLI_SRCS
) \
1187 $(SUBDIR_TARGET_SRCS
) \
1189 $(SUBDIR_GCC_COMPILE_SRCS
)
1191 # Header files that need to have srcdir added. Note that in the cases
1192 # where we use a macro like $(gdbcmd_h), things are carefully arranged
1193 # so that each .h file is listed exactly once (M-x tags-search works
1194 # wrong if TAGS has files twice). Because this is tricky to get
1195 # right, it is probably easiest just to list .h files here directly.
1197 HFILES_NO_SRCDIR
= \
1199 aarch64-ravenscar-thread.h \
1205 amd64-darwin-tdep.h \
1206 amd64-linux-tdep.h \
1249 dwarf2
/frame-tailcall.h \
1252 dwarf2
/index-cache.h \
1253 dwarf2
/index-common.h \
1276 gdb_proc_service.h \
1292 hppa-linux-offsets.h \
1295 i386-darwin-tdep.h \
1300 ia64-libunwind-tdep.h \
1352 ppc-ravenscar-thread.h \
1359 progspace-and-thread.h \
1363 ravenscar-thread.h \
1373 riscv-ravenscar-thread.h \
1377 run-on-main-thread.h \
1401 sparc-ravenscar-thread.h \
1411 target-descriptions.h \
1446 arch
/aarch64-insn.h \
1450 arch
/ppc-linux-common.h \
1451 arch
/ppc-linux-tdesc.h \
1460 compile
/compile-c.h \
1461 compile
/compile-cplus.h \
1462 compile
/compile-internal.h \
1463 compile
/compile-object-load.h \
1464 compile
/compile-object-run.h \
1465 compile
/gcc-c-plugin.h \
1466 compile
/gcc-cp-plugin.h \
1469 config
/djgpp
/langinfo.h \
1470 config
/djgpp
/nl_types.h \
1471 config
/i386
/nm-i386gnu.h \
1472 config
/sparc
/nm-sol2.h \
1480 nat
/aarch64-linux.h \
1481 nat
/aarch64-linux-hw-point.h \
1482 nat
/aarch64-sve-linux-ptrace.h \
1483 nat
/amd64-linux-siginfo.h \
1485 nat
/gdb_thread_db.h \
1486 nat
/fork-inferior.h \
1487 nat
/linux-btrace.h \
1488 nat
/linux-namespaces.h \
1490 nat
/linux-osdata.h \
1491 nat
/linux-personality.h \
1492 nat
/linux-ptrace.h \
1493 nat
/linux-waitpid.h \
1494 nat
/mips-linux-watch.h \
1498 nat
/x86-gcc-cpuid.h \
1500 nat
/x86-linux-dregs.h \
1502 python
/py-events.h \
1503 python
/py-stopevent.h \
1505 python
/python-internal.h \
1506 regformats
/regdef.h \
1510 target
/waitstatus.h \
1524 tui
/tui-wingeneral.h \
1525 tui
/tui-winsource.h \
1528 # Header files that already have srcdir in them, or which are in objdir.
1530 HFILES_WITH_SRCDIR
= \
1534 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1535 # default their values the way we do for SER_HARDWIRE; in the future
1536 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1537 # variables analogous to SER_HARDWIRE which get defaulted in this
1540 DEPFILES
= $(TARGET_OBS
) $(SER_HARDWIRE
) $(NATDEPFILES
) $(SIM_OBS
)
1542 SOURCES
= $(SFILES
) $(ALLDEPFILES
) $(YYFILES
) $(CONFIG_SRCS
)
1543 # Don't include YYFILES (*.c) because we already include *.y in SFILES,
1544 # and it's more useful to see it in the .y file.
1545 TAGFILES_NO_SRCDIR
= $(SFILES
) $(HFILES_NO_SRCDIR
) $(ALLDEPFILES
) \
1547 TAGFILES_WITH_SRCDIR
= $(HFILES_WITH_SRCDIR
)
1549 COMMON_OBS
= $(DEPFILES
) $(CONFIG_OBS
) $(YYOBJ
) \
1553 $(patsubst %.c
,%.o
,$(COMMON_SFILES
)) \
1555 $(SUBDIR_TARGET_OBS
) \
1556 $(SUBDIR_GCC_COMPILE_OBS
)
1558 SUBDIRS
= doc @subdirs@ data-directory
1559 CLEANDIRS
= $(SUBDIRS
)
1561 # List of subdirectories in the build tree that must exist.
1562 # This is used to force build failures in existing trees when
1563 # a new directory is added.
1564 # The format here is for the `case' shell command.
1565 REQUIRED_SUBDIRS
= doc | testsuite | data-directory
1567 # Parser intermediate files.
1580 # ada-lex.c is included by another file, so it shouldn't wind up as a
1582 YYOBJ
= $(filter-out ada-lex.o
,$(patsubst %.c
,%.o
,$(YYFILES
)))
1584 # Things which need to be built when making a distribution.
1586 DISTSTUFF
= $(YYFILES
)
1589 # All generated files which can be included by another file.
1594 $(NAT_GENERATED_FILES
) \
1597 # Flags needed to compile Python code
1598 PYTHON_CFLAGS
= @PYTHON_CFLAGS@
1600 all: gdb
$(EXEEXT
) $(CONFIG_ALL
) gdb-gdb.py gdb-gdb.gdb
1601 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
1603 # Rule for compiling .c files in the top-level gdb directory.
1604 # The order-only dependencies ensure that we create the build subdirectories.
1605 %.o
: %.c |
$(CONFIG_DEP_SUBDIR
)
1609 $(CONFIG_DEP_SUBDIR
):
1610 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$@
1612 # Python files need special flags.
1613 python
/%.o
: INTERNAL_CFLAGS
+= $(PYTHON_CFLAGS
)
1615 # Rules for compiling .c files in the various source subdirectories.
1616 %.o
: $(srcdir)/gdbtk
/generic
/%.c
1617 $(COMPILE
) $(all_gdbtk_cflags
) $<
1622 # The check target can not use subdir_do, because subdir_do does not
1623 # use TARGET_FLAGS_TO_PASS.
1625 @if
[ -f testsuite
/Makefile
]; then \
1626 rootme
=`pwd`; export rootme
; \
1627 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1629 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check; \
1633 @if
[ -f testsuite
/Makefile
]; then \
1634 rootme
=`pwd`; export rootme
; \
1635 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1637 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-perf
; \
1641 @if
[ -f testsuite
/Makefile
]; then \
1642 rootme
=`pwd`; export rootme
; \
1643 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1645 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-read1
; \
1648 check-parallel
: force
1649 @if
[ -f testsuite
/Makefile
]; then \
1650 rootme
=`pwd`; export rootme
; \
1651 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1653 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-parallel
; \
1656 # The idea is to parallelize testing of multilibs, for example:
1657 # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1658 # will run 3 concurrent sessions of check, eventually testing all 10
1659 # combinations. GNU make is required for the % pattern to work, as is
1660 # a shell that expands alternations within braces. If GNU make is not
1661 # used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to
1662 # prevent serialized checking due to the passed RUNTESTFLAGS.
1663 # FIXME: use config.status --config not --version, when available.
1665 @if
[ -f testsuite
/config.status
]; then \
1666 rootme
=`pwd`; export rootme
; \
1667 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1668 target
=`echo "$@" | sed 's,//.*,,'`; \
1669 variant
=`echo "$@" | sed 's,^[^/]*//,,'`; \
1670 vardots
=`echo "$$variant" | sed 's,/,.,g'`; \
1671 testdir
=testsuite.
$$vardots; \
1672 if
[ ! -f
$$testdir/Makefile
] && [ -f testsuite
/config.status
]; then \
1673 configargs
=`cd testsuite && ./config.status --version | \
1674 sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
1675 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$$testdir && \
1677 eval
$(SHELL
) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
1678 "\"--srcdir=\$$rootsrc/testsuite\"" \
1680 else :; fi
&& cd
$$testdir && \
1681 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) \
1682 RUNTESTFLAGS
="--target_board=$$variant $(RUNTESTFLAGS)" \
1683 FORCE_PARALLEL
=$(if
$(FORCE_PARALLEL
),1,$(if
$(RUNTESTFLAGS
),,1)) \
1687 # The set of headers checked by 'check-headers' by default.
1688 CHECK_HEADERS
= $(HFILES_NO_SRCDIR
)
1690 # Try to compile each header in isolation, thus ensuring headers are
1693 # Defaults to checking all $HFILES_NO_SRCDIR headers.
1697 # make check-headers CHECK_HEADERS="header.h list.h"
1699 # to check specific headers.
1702 @echo Checking headers.
1703 for i in
$(CHECK_HEADERS
) ; do \
1704 $(CXX
) $(CXX_DIALECT
) -x c
++-header
-c
-fsyntax-only \
1705 $(INTERNAL_CFLAGS
) -include defs.h
$(srcdir)/$$i ; \
1707 .PHONY
: check-headers
1709 info install-info clean-info
dvi pdf install-pdf html install-html
: force
1710 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
1712 # Traditionally "install" depends on "all". But it may be useful
1713 # not to; for example, if the user has made some trivial change to a
1714 # source file and doesn't care about rebuilding or just wants to save the
1715 # time it takes for make to check that all is up to date.
1716 # install-only is intended to address that need.
1718 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
1720 install-only
: $(CONFIG_INSTALL
)
1721 transformed_name
=`t='$(program_transform_name)'; \
1722 echo gdb | sed -e "$$t"` ; \
1723 if
test "x$$transformed_name" = x
; then \
1724 transformed_name
=gdb
; \
1728 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
1729 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) gdb
$(EXEEXT
) \
1730 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
1731 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(includedir)/gdb
; \
1732 $(INSTALL_DATA
) jit-reader.h
$(DESTDIR
)$(includedir)/gdb
/jit-reader.h
1733 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
1735 transformed_name
=`t='$(program_transform_name)'; \
1736 echo gcore | sed -e "$$t"` ; \
1737 if
test "x$$transformed_name" = x
; then \
1738 transformed_name
=gcore
; \
1742 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
1743 $(INSTALL_SCRIPT
) gcore \
1744 $(DESTDIR
)$(bindir)/$$transformed_name; \
1746 transformed_name
=`t='$(program_transform_name)'; \
1747 echo gdb-add-index | sed -e "$$t"` ; \
1748 if
test "x$$transformed_name" = x
; then \
1749 transformed_name
=gdb-add-index
; \
1753 $(INSTALL_SCRIPT
) $(srcdir)/contrib
/gdb-add-index.sh \
1754 $(DESTDIR
)$(bindir)/$$transformed_name
1755 @
$(MAKE
) DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
1758 $(MAKE
) $(FLAGS_TO_PASS
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" \
1759 install_sh_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG
=-s \
1760 `test -z '$(STRIP)' || \
1761 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
1764 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/guile
/gdb
1767 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/python
/gdb
1769 uninstall: force $(CONFIG_UNINSTALL
)
1770 transformed_name
=`t='$(program_transform_name)'; \
1771 echo gdb | sed -e $$t` ; \
1772 if
test "x$$transformed_name" = x
; then \
1773 transformed_name
=gdb
; \
1777 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) \
1778 $(DESTDIR
)$(man1dir)/$$transformed_name.1
1779 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
1781 transformed_name
=`t='$(program_transform_name)'; \
1782 echo gcore | sed -e "$$t"` ; \
1783 if
test "x$$transformed_name" = x
; then \
1784 transformed_name
=gcore
; \
1788 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name; \
1790 @
$(MAKE
) DO
=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
1792 # The C++ name parser can be built standalone for testing.
1793 test-cp-name-parser.o
: cp-name-parser.c
1794 $(COMPILE
) -DTEST_CPNAMES cp-name-parser.c
1797 test-cp-name-parser
$(EXEEXT
): test-cp-name-parser.o
$(LIBIBERTY
)
1798 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) \
1799 -o test-cp-name-parser
$(EXEEXT
) test-cp-name-parser.o \
1802 # We do this by grepping through sources. If that turns out to be too slow,
1803 # maybe we could just require every .o file to have an initialization routine
1804 # of a given name (top.o -> _initialize_top, etc.).
1806 # Formatting conventions: The name of the _initialize_* routines must start
1807 # in column zero, and must not be inside #if.
1809 # Note that the set of files with init functions might change, or the names
1810 # of the functions might change, so this files needs to depend on all the
1811 # source files that will be linked into gdb. However, due to the way
1812 # this Makefile has generally been written, we do this indirectly, by
1813 # computing the list of source files from the list of object files.
1816 $(patsubst %.o
,%.c
, \
1817 $(patsubst %-exp.o
,%-exp.y
, \
1818 $(filter-out init.o version.o
%_S.o
%_U.o
,\
1821 init.c
: stamp-init
; @true
1822 stamp-init
: $(INIT_FILES
)
1823 @
$(ECHO_INIT_C
) echo
"Making init.c"
1824 @
rm -f init.c-tmp init.l-tmp
1826 @
-for f in
$(INIT_FILES
); do \
1827 sed
-n
-e
's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' \
1828 $(srcdir)/$$f 2>/dev
/null
; \
1830 @echo
'/* Do not modify this file. */' >>init.c-tmp
1831 @echo
'/* It is created automatically by the Makefile. */'>>init.c-tmp
1832 @echo
'#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp
1833 @echo
'extern void initialize_all_files(void);' >>init.c-tmp
1834 @sed
-e
's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp
>>init.c-tmp
1835 @echo
'void' >>init.c-tmp
1836 @echo
'initialize_all_files (void)' >>init.c-tmp
1837 @echo
'{' >>init.c-tmp
1838 @sed
-e
's/\(.*\)/ _initialize_\1 ();/' <init.l-tmp
>>init.c-tmp
1839 @echo
'}' >>init.c-tmp
1840 @
$(SHELL
) $(srcdir)/..
/move-if-change init.c-tmp init.c
1841 @echo stamp
> stamp-init
1845 # Create a library of the gdb object files and build GDB by linking
1848 # init.o is very important. It pulls in the rest of GDB.
1849 LIBGDB_OBS
= $(sort $(COMMON_OBS
)) init.o
1850 libgdb.a
: $(LIBGDB_OBS
)
1852 $(AR
) q libgdb.a
$(LIBGDB_OBS
)
1855 # Removing the old gdb first works better if it is running, at least on SunOS.
1856 gdb
$(EXEEXT
): gdb.o
$(LIBGDB_OBS
) $(CDEPS
) $(TDEPLIBS
)
1857 $(SILENCE
) rm -f gdb
$(EXEEXT
)
1858 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
1859 -o gdb
$(EXEEXT
) gdb.o
$(LIBGDB_OBS
) \
1860 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
1861 ifneq ($(CODESIGN_CERT
),)
1862 $(ECHO_SIGN
) $(CODESIGN
) -s
$(CODESIGN_CERT
) gdb
$(EXEEXT
)
1865 # Convenience rule to handle recursion.
1866 .PHONY
: all-data-directory
1867 all-data-directory
: data-directory
/Makefile
1868 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all DODIRS
=data-directory subdir_do
1870 # This is useful when debugging GDB, because some Unix's don't let you run GDB
1871 # on itself without copying the executable. So "make gdb1" will make
1872 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
1873 # Removing gdb1 before the copy is the right thing if gdb1 is open
1874 # in another process.
1875 gdb1
$(EXEEXT
): gdb
$(EXEEXT
)
1877 cp gdb
$(EXEEXT
) gdb1
$(EXEEXT
)
1879 # Put the proper machine-specific files first, so M-. on a machine
1880 # specific routine gets the one for the correct machine. (FIXME: those
1881 # files go in twice; we should be removing them from the main list).
1883 # TAGS depends on all the files that go into it so you can rebuild TAGS
1884 # with `make TAGS' and not have to say `rm TAGS' first.
1886 GDB_NM_FILE
= @GDB_NM_FILE@
1887 TAGS
: $(TAGFILES_NO_SRCDIR
) $(TAGFILES_WITH_SRCDIR
)
1889 etags
`(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
1890 `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
1891 echo $(srcdir)/$$i ; \
1892 done ; for i in $(TAGFILES_WITH_SRCDIR); do \
1894 done) | sed -e 's/\.o$$/\.c/'` \
1895 `find $(srcdir)/config -name '*.h' -print`
1899 clean mostlyclean: $(CONFIG_CLEAN
)
1900 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=clean "DODIRS=$(CLEANDIRS)" subdir_do
1901 rm -f
*.o
*.a
*~ init.c-tmp init.l-tmp version.c-tmp
1902 rm -f init.c stamp-init version.c stamp-version
1903 rm -f gdb
$(EXEEXT
) core make.log
1904 rm -f gdb
[0-9]$(EXEEXT
)
1905 rm -f test-cp-name-parser
$(EXEEXT
)
1906 rm -f xml-builtin.c stamp-xml
1908 for i in
$(CONFIG_SRC_SUBDIR
); do \
1910 rm -f
$$i/$(DEPDIR
)/*; \
1913 # This used to depend on c-exp.c m2-exp.c TAGS
1914 # I believe this is wrong; the makefile standards for distclean just
1915 # describe removing files; the only sort of "re-create a distribution"
1916 # functionality described is if the distributed files are unmodified.
1918 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=distclean "DODIRS=$(CLEANDIRS)" subdir_do
1919 rm -f nm.h config.status config.h stamp-h b jit-reader.h
1920 rm -f gdb-gdb.py gdb-gdb.gdb
1921 rm -f y.output
yacc.acts
yacc.tmp y.tab.h
1922 rm -f config.log config.cache
1925 for i in
$(CONFIG_SRC_SUBDIR
); do \
1926 if
test -d
$$i/$(DEPDIR
); then rmdir
$$i/$(DEPDIR
); fi \
1929 maintainer-clean
: local-maintainer-clean do-maintainer-clean
distclean
1930 realclean: maintainer-clean
1932 local-maintainer-clean
:
1933 @echo
"This command is intended for maintainers to use;"
1934 @echo
"it deletes files that may require special tools to rebuild."
1937 ada-lex.c ada-exp.c \
1938 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
1941 rm -f nm.h config.status
1943 do-maintainer-clean
:
1944 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=maintainer-clean
"DODIRS=$(CLEANDIRS)" \
1947 diststuff
: $(DISTSTUFF
) $(PACKAGE
).pot
$(CATALOGS
)
1948 cd doc
; $(MAKE
) $(MFLAGS
) diststuff
1951 @for i in
$(DODIRS
); do \
1953 $(REQUIRED_SUBDIRS
)) \
1954 if
[ ! -f .
/$$i/Makefile
] ; then \
1955 echo
"Missing $$i/Makefile" >&2 ; \
1959 if
[ -f .
/$$i/Makefile
] ; then \
1961 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1962 else exit
1 ; fi
; \
1966 Makefile
: Makefile.in config.status
1967 $(SHELL
) config.status
$@
1969 data-directory
/Makefile
: data-directory
/Makefile.in config.status
1970 $(SHELL
) config.status
$@
1974 .
/gdb
$(EXEEXT
) --data-directory
=`pwd`/data-directory
$(GDBFLAGS
)
1976 jit-reader.h
: $(srcdir)/jit-reader.in
1977 $(SHELL
) config.status
$@
1979 gcore
: $(srcdir)/gcore.in
1980 $(SHELL
) config.status
$@
1982 gdb-gdb.py
: $(srcdir)/gdb-gdb.py.in
1983 $(SHELL
) config.status
$@
1985 gdb-gdb.gdb
: $(srcdir)/gdb-gdb.gdb.in
1986 $(SHELL
) config.status
$@
1988 config.h
: stamp-h
; @true
1989 stamp-h
: $(srcdir)/config.in config.status
1990 $(SHELL
) config.status config.h
1992 nm.h
: stamp-nmh
; @true
1993 stamp-nmh
: config.status
1994 $(SHELL
) config.status nm.h
1996 config.status
: $(srcdir)/configure configure.nat configure.tgt configure.host ..
/bfd
/development.sh
1997 $(SHELL
) config.status
--recheck
2000 ACLOCAL_AMFLAGS
= -I ..
/config
2002 # Keep these in sync with the includes in acinclude.m4.
2005 acx_configure_dir.m4 \
2008 ..
/config
/acinclude.m4 \
2009 ..
/config
/plugins.m4 \
2010 ..
/config
/lead-dot.m4 \
2011 ..
/config
/override.m4 \
2012 ..
/config
/largefile.m4 \
2013 ..
/config
/gettext-sister.m4 \
2014 ..
/config
/lib-ld.m4 \
2015 ..
/config
/lib-prefix.m4 \
2016 ..
/config
/lib-link.m4 \
2019 ..
/config
/depstand.m4 \
2020 ..
/config
/lcmessage.m4 \
2021 ..
/config
/codeset.m4 \
2023 ..
/config
/ax_pthread.m4
2025 $(srcdir)/aclocal.m4
: @MAINTAINER_MODE_TRUE@
$(aclocal_m4_deps
)
2026 cd
$(srcdir) && $(ACLOCAL
) $(ACLOCAL_AMFLAGS
)
2029 configure_deps
= $(srcdir)/configure.ac
$(srcdir)/aclocal.m4
2030 $(srcdir)/configure
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2031 cd
$(srcdir) && $(AUTOCONF
)
2033 AUTOHEADER
= autoheader
2034 $(srcdir)/config.in
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2035 cd
$(srcdir) && $(AUTOHEADER
)
2039 # automatic rebuilding in automake-generated Makefiles requires
2040 # this rule in the toplevel Makefile, which, with GNU make, causes
2041 # the desired updates through the implicit regeneration of the Makefile
2042 # and all of its prerequisites.
2049 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
2051 cd doc
; $(MAKE
) refcard.
dvi $(FLAGS_TO_PASS
)
2053 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
2055 cd doc
; $(MAKE
) refcard.ps
$(FLAGS_TO_PASS
)
2057 # GDB MANUAL: TeX dvi file
2059 cd doc
; $(MAKE
) gdb.
dvi $(FLAGS_TO_PASS
)
2061 # GDB MANUAL: info file
2063 cd doc
; $(MAKE
) gdb.
info $(FLAGS_TO_PASS
)
2065 # Make copying.c from COPYING
2066 $(srcdir)/copying.c
: @MAINTAINER_MODE_TRUE@
$(srcdir)/..
/COPYING3
$(srcdir)/copying.awk
2067 awk
-f
$(srcdir)/copying.awk \
2068 < $(srcdir)/..
/COPYING3
> $(srcdir)/copying.tmp
2069 mv
$(srcdir)/copying.tmp
$(srcdir)/copying.c
2071 version.c
: stamp-version
; @true
2072 # Note that the obvious names for the temp file are taken by
2073 # create-version.sh.
2074 stamp-version
: Makefile version.in
$(srcdir)/..
/bfd
/version.h
$(srcdir)/..
/gdbsupport
/create-version.sh
2075 $(ECHO_GEN
) $(SHELL
) $(srcdir)/..
/gdbsupport
/create-version.sh
$(srcdir) \
2076 $(host_alias
) $(target_alias
) version-t.t
2077 @
$(SHELL
) $(srcdir)/..
/move-if-change version-t.t version.c
2078 @echo stamp
> stamp-version
2081 gdb.cxref
: $(SFILES
)
2082 cxref
-I.
$(SFILES
) >gdb.cxref
2086 # GNU Make has an annoying habit of putting *all* the Makefile variables
2087 # into the environment, unless you include this target as a circumvention.
2088 # Rumor is that this will be fixed (and this target can be removed)
2092 # GNU Make 3.63 has a different problem: it keeps tacking command line
2093 # overrides onto the definition of $(MAKE). This variable setting
2099 aarch64-fbsd-nat.c \
2100 aarch64-fbsd-tdep.c \
2101 aarch64-linux-nat.c \
2102 aarch64-linux-tdep.c \
2103 aarch64-newlib-tdep.c \
2104 aarch64-ravenscar-thread.c \
2110 alpha-linux-tdep.c \
2111 alpha-mdebug-tdep.c \
2116 amd64-darwin-tdep.c \
2117 amd64-dicos-tdep.c \
2121 amd64-linux-tdep.c \
2134 arm-get-next-pcs.c \
2141 arm-symbian-tdep.c \
2170 i386-darwin-tdep.c \
2185 i386-windows-tdep.c \
2187 ia64-libunwind-tdep.c \
2206 microblaze-linux-tdep.c \
2218 mips64-obsd-tdep.c \
2223 nios2-linux-tdep.c \
2236 ppc-ravenscar-thread.c \
2240 ravenscar-thread.c \
2245 riscv-linux-tdep.c \
2246 riscv-ravenscar-thread.c \
2249 rs6000-lynx178-tdep.c \
2269 sparc-linux-tdep.c \
2274 sparc-ravenscar-thread.c \
2278 sparc64-fbsd-nat.c \
2279 sparc64-fbsd-tdep.c \
2280 sparc64-linux-nat.c \
2281 sparc64-linux-tdep.c \
2283 sparc64-nbsd-nat.c \
2284 sparc64-nbsd-tdep.c \
2285 sparc64-obsd-nat.c \
2286 sparc64-obsd-tdep.c \
2287 sparc64-sol2-tdep.c \
2289 tilegx-linux-nat.c \
2290 tilegx-linux-tdep.c \
2303 xtensa-linux-nat.c \
2304 xtensa-linux-tdep.c \
2308 # Some files need explicit build rules (due to -Werror problems) or due
2309 # to sub-directory fun 'n' games.
2311 # ada-exp.c can appear in srcdir, for releases; or in ., for
2312 # development builds.
2313 ADA_EXP_C
= `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
2315 ada-exp.o
: ada-exp.c
2316 $(COMPILE
) $(ADA_EXP_C
)
2319 # Message files. Based on code in gcc/Makefile.in.
2321 # Rules for generating translated message descriptions. Disabled by
2322 # autoconf if the tools are not available.
2324 .PHONY
: all-po install-po uninstall-po clean-po update-po
$(PACKAGE
).pot
2328 # This notation should be acceptable to all Make implementations used
2329 # by people who are interested in updating .po files.
2330 update-po
: $(CATALOGS
:.gmo
=.pox
)
2332 # N.B. We do not attempt to copy these into $(srcdir). The snapshot
2335 -test -d po || mkdir po
2336 $(GMSGFMT
) --statistics
-o
$@
$<
2338 # The new .po has to be gone over by hand, so we deposit it into
2339 # build/po with a different extension. If build/po/$(PACKAGE).pot
2340 # exists, use it (it was just created), else use the one in srcdir.
2342 -test -d po || mkdir po
2343 $(MSGMERGE
) $< `if test -f po/$(PACKAGE).pot; \
2344 then echo po/$(PACKAGE).pot; \
2345 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o
$@
2347 # This rule has to look for .gmo modules in both srcdir and the cwd,
2348 # and has to check that we actually have a catalog for each language,
2349 # in case they weren't built or included with the distribution.
2351 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(datadir)
2352 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2353 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2354 if
[ -f
$$cat ]; then
:; \
2355 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2358 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2359 echo
$(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir; \
2360 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir || exit
1; \
2361 echo
$(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2362 $(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2365 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2366 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2367 if
[ -f
$$cat ]; then
:; \
2368 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2371 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2372 rm -f
$(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2374 # Delete po/*.gmo only if we are not building in the source directory.
2376 -if
[ ! -f Makefile.in
]; then
rm -f po
/*.gmo
; fi
2378 # Rule for regenerating the message template (gdb.pot). Instead of
2379 # forcing everyone to edit POTFILES.in, which proved impractical, this
2380 # rule has no dependencies and always regenerates gdb.pot. This is
2381 # relatively harmless since the .po files do not directly depend on
2382 # it. The .pot file is left in the build directory. Since GDB's
2383 # Makefile lacks a cannonical list of sources (missing xm, tm and nm
2384 # files) force this rule.
2385 $(PACKAGE
).pot
: po
/$(PACKAGE
).pot
2386 po
/$(PACKAGE
).pot
: force
2387 -test -d po || mkdir po
2388 sh
-e
$(srcdir)/po
/gdbtext
$(XGETTEXT
) $(PACKAGE
) .
$(srcdir)
2392 # YACC/LEX dependencies
2394 # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
2395 # exist in srcdir, then compiled in objdir to LANG-exp.o. If we
2396 # said LANG-exp.c rather than ./c-exp.c some makes would
2397 # sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus
2398 # decls for malloc/realloc/free which conflict with everything else.
2399 # Strictly speaking c-exp.c should therefore depend on
2400 # Makefile.in, but that was a pretty big annoyance.
2403 $(ECHO_YACC
) $(SHELL
) $(YLWRAP
) $< y.tab.c
$@.tmp
-- \
2404 $(YACC
) $(YFLAGS
) ||
(rm -f
$@.tmp
; false
)
2405 @sed
-e
'/extern.*malloc/d' \
2406 -e
'/extern.*realloc/d' \
2407 -e
'/extern.*free/d' \
2408 -e
'/include.*malloc.h/d' \
2409 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2410 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2411 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2412 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2413 -e
'/^#line.*y.tab.c/d' \
2414 -e
's/YY_NULL/YY_NULLPTR/g' \
2415 < $@.tmp
> $@.new
&& \
2419 $(ECHO_LEX
) $(FLEX
) -t
$< \
2420 | sed
-e
'/extern.*malloc/d' \
2421 -e
'/extern.*realloc/d' \
2422 -e
'/extern.*free/d' \
2423 -e
'/include.*malloc.h/d' \
2424 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2425 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2426 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2427 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2428 -e
's/yy_flex_xrealloc/yyxrealloc/g' \
2432 .PRECIOUS
: ada-lex.c
2436 xml-builtin.c
: stamp-xml
; @true
2437 stamp-xml
: $(srcdir)/features
/feature_to_c.sh Makefile
$(XMLFILES
)
2438 $(SILENCE
) rm -f xml-builtin.tmp
2439 $(ECHO_GEN_XML_BUILTIN
) AWK
="$(AWK)" \
2440 $(SHELL
) $(srcdir)/features
/feature_to_c.sh \
2441 xml-builtin.tmp
$(XMLFILES
)
2442 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change xml-builtin.tmp xml-builtin.c
2443 $(SILENCE
) echo stamp
> stamp-xml
2445 .PRECIOUS
: xml-builtin.c
2448 # GDBTK sub-directory
2451 all-gdbtk
: insight
$(EXEEXT
)
2454 transformed_name
=`t='$(program_transform_name)'; \
2455 echo insight | sed -e $$t` ; \
2456 if
test "x$$transformed_name" = x
; then \
2457 transformed_name
=insight
; \
2461 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
2462 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) insight
$(EXEEXT
) \
2463 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2464 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2465 $(DESTDIR
)$(GDBTK_LIBRARY
) ; \
2466 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2467 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
) ; \
2468 $(INSTALL_DATA
) $(srcdir)/gdbtk
/plugins
/plugins.tcl \
2469 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
)/plugins.tcl
; \
2470 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2471 $(DESTDIR
)$(GDBTK_LIBRARY
)/images \
2472 $(DESTDIR
)$(GDBTK_LIBRARY
)/images2
; \
2473 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2474 $(DESTDIR
)$(GDBTK_LIBRARY
)/help \
2475 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/images \
2476 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/trace
; \
2477 cd
$(srcdir)/gdbtk
/library
; \
2478 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
; \
2480 $(INSTALL_DATA
) $$i $(DESTDIR
)$(GDBTK_LIBRARY
)/$$i ; \
2484 transformed_name
=`t='$(program_transform_name)'; \
2485 echo insight | sed -e $$t` ; \
2486 if
test "x$$transformed_name" = x
; then \
2487 transformed_name
=insight
; \
2491 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2492 rm -rf
$(DESTDIR
)$(GDBTK_LIBRARY
)
2495 rm -f insight
$(EXEEXT
)
2497 # Removing the old gdb first works better if it is running, at least on SunOS.
2498 insight
$(EXEEXT
): gdbtk-main.o libgdb.a
$(CDEPS
) $(TDEPLIBS
)
2499 rm -f insight
$(EXEEXT
)
2500 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
2501 -o insight
$(EXEEXT
) gdbtk-main.o libgdb.a \
2502 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
2504 gdbres.o
: $(srcdir)/gdbtk
/gdb.rc
$(srcdir)/gdbtk
/gdbtool.ico
2505 $(WINDRES
) --include $(srcdir)/gdbtk
$(srcdir)/gdbtk
/gdb.rc gdbres.o
2507 all_gdbtk_cflags
= $(IDE_CFLAGS
) $(ITCL_CFLAGS
) \
2508 $(ITK_CFLAGS
) $(TCL_CFLAGS
) $(TK_CFLAGS
) $(X11_CFLAGS
) \
2510 -DGDBTK_LIBRARY
=\"$(GDBTK_LIBRARY
)\" \
2511 -DSRC_DIR
=\"$(GDBTK_SRC_DIR
)\"
2514 # Dependency tracking.
2517 ifeq ($(DEPMODE
),depmode
=gcc3
)
2518 # Note that we put the dependencies into a .Tpo file, then move them
2519 # into place if the compile succeeds. We need this because gcc does
2520 # not atomically write the dependency output file.
2521 override COMPILE.post
= -c
-o
$@
-MT
$@
-MMD
-MP \
2522 -MF
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo
2523 override POSTCOMPILE
= @mv
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo \
2524 $(@D
)/$(DEPDIR
)/$(basename $(@F
)).Po
2526 override COMPILE.pre
= source
='$<' object
='$@' libtool
=no \
2527 DEPDIR
=$(DEPDIR
) $(DEPMODE
) $(depcomp
) \
2528 $(CXX
) -x c
++ $(CXX_DIALECT
)
2529 # depcomp handles atomicity for us, so we don't need a postcompile
2531 override POSTCOMPILE
=
2534 # A list of all the objects we might care about in this build, for
2535 # dependency tracking.
2536 all_object_files
= gdb.o
$(LIBGDB_OBS
) gdbtk-main.o \
2537 test-cp-name-parser.o
2539 # All the .deps files to include.
2540 all_deps_files
= $(foreach dep
,$(patsubst %.o
,%.Po
,$(all_object_files
)),\
2541 $(dir $(dep
))/$(DEPDIR
)/$(notdir $(dep
)))
2543 # Ensure that generated files are created early. Use order-only
2544 # dependencies if available. They require GNU make 3.80 or newer,
2545 # and the .VARIABLES variable was introduced at the same time.
2547 $(all_object_files
): |
$(generated_files
)
2549 $(all_object_files
) : $(generated_files
)
2553 -include $(all_deps_files
)
2555 # Disable implicit make rules.
2556 include $(srcdir)/disable-implicit-rules.mk
2558 ### end of the gdb Makefile.in.