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 \
413 python
/py-xmethods.c \
416 SUBDIR_PYTHON_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_PYTHON_SRCS
))
419 SUBDIR_PYTHON_LDFLAGS
=
420 SUBDIR_PYTHON_CFLAGS
=
422 SUBDIR_UNITTESTS_SRCS
= \
423 unittests
/array-view-selftests.c \
424 unittests
/child-path-selftests.c \
425 unittests
/cli-utils-selftests.c \
426 unittests
/common-utils-selftests.c \
427 unittests
/copy_bitwise-selftests.c \
428 unittests
/environ-selftests.c \
429 unittests
/filtered_iterator-selftests.c \
430 unittests
/format_pieces-selftests.c \
431 unittests
/function-view-selftests.c \
432 unittests
/help-doc-selftests.c \
433 unittests
/lookup_name_info-selftests.c \
434 unittests
/memory-map-selftests.c \
435 unittests
/memrange-selftests.c \
436 unittests
/offset-type-selftests.c \
437 unittests
/observable-selftests.c \
438 unittests
/optional-selftests.c \
439 unittests
/parse-connection-spec-selftests.c \
440 unittests
/ptid-selftests.c \
441 unittests
/main-thread-selftests.c \
442 unittests
/mkdir-recursive-selftests.c \
443 unittests
/rsp-low-selftests.c \
444 unittests
/scoped_fd-selftests.c \
445 unittests
/scoped_mmap-selftests.c \
446 unittests
/scoped_restore-selftests.c \
447 unittests
/string_view-selftests.c \
448 unittests
/style-selftests.c \
449 unittests
/tracepoint-selftests.c \
450 unittests
/tui-selftests.c \
451 unittests
/unpack-selftests.c \
452 unittests
/utils-selftests.c \
453 unittests
/vec-utils-selftests.c \
454 unittests
/xml-utils-selftests.c
456 SUBDIR_UNITTESTS_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_UNITTESTS_SRCS
))
458 SUBDIR_TARGET_SRCS
= target
/waitstatus.c
459 SUBDIR_TARGET_OBS
= $(patsubst %.c
,%.o
,$(SUBDIR_TARGET_SRCS
))
462 # Opcodes currently live in one of two places. Either they are in the
463 # opcode library, typically ../opcodes, or they are in a header file
465 # Where is the "-lopcodes" library, with (some of) the opcode tables and
467 OPCODES_DIR
= ..
/opcodes
468 OPCODES_SRC
= $(srcdir)/$(OPCODES_DIR
)
469 OPCODES
= $(OPCODES_DIR
)/libopcodes.a
470 # Where are the other opcode tables which only have header file
472 OP_INCLUDE
= $(INCLUDE_DIR
)/opcode
473 # See TOP_CFLAGS as well.
474 OPCODES_CFLAGS
= -I
$(OP_INCLUDE
)
476 # Allow includes like "opcodes/mumble.h".
477 TOP_CFLAGS
= -I
$(top_srcdir
)/..
479 # The simulator is usually nonexistent; targets that include one
480 # should set this to list all the .o or .a files to be linked in.
483 WIN32LIBS
= @WIN32LIBS@
485 # Tcl et al cflags and libraries
487 TCL_CFLAGS
= @TCL_INCLUDE@
488 GDBTKLIBS
= @GDBTKLIBS@
489 # Extra flags that the GDBTK files need:
490 GDBTK_CFLAGS
= @GDBTK_CFLAGS@
493 TK_CFLAGS
= @TK_INCLUDE@
495 X11_CFLAGS
= @TK_XINCLUDES@
499 WIN32LDAPP
= @WIN32LDAPP@
502 GUI_CFLAGS_X
= @GUI_CFLAGS_X@
503 IDE_CFLAGS
= $(GUI_CFLAGS_X
) $(IDE_CFLAGS_X
)
505 ALL_TCL_CFLAGS
= $(TCL_CFLAGS
) $(TK_CFLAGS
)
507 # The version of gdbtk we're building. This should be kept
508 # in sync with GDBTK_VERSION and friends in gdbtk.h.
510 GDBTK_LIBRARY
= $(datadir)/insight
$(GDBTK_VERSION
)
512 # Gdbtk requires an absolute path to the source directory or
513 # the testsuite won't run properly.
514 GDBTK_SRC_DIR
= @GDBTK_SRC_DIR@
527 SUBDIR_GDBTK_SRCS
= \
528 gdbtk
/generic
/gdbtk.c \
529 gdbtk
/generic
/gdbtk-bp.c \
530 gdbtk
/generic
/gdbtk-cmds.c \
531 gdbtk
/generic
/gdbtk-hooks.c \
532 gdbtk
/generic
/gdbtk-interp.c \
533 gdbtk
/generic
/gdbtk-main.c \
534 gdbtk
/generic
/gdbtk-register.c \
535 gdbtk
/generic
/gdbtk-stack.c \
536 gdbtk
/generic
/gdbtk-varobj.c \
537 gdbtk
/generic
/gdbtk-wrapper.c
539 SUBDIR_GDBTK_DEPS
= $(LIBGUI
) $(TCL_DEPS
) $(TK_DEPS
)
540 SUBDIR_GDBTK_LDFLAGS
=
541 SUBDIR_GDBTK_CFLAGS
= -DGDBTK
543 CONFIG_OBS
= @CONFIG_OBS@
544 CONFIG_SRCS
= @CONFIG_SRCS@
545 CONFIG_DEPS
= @CONFIG_DEPS@
546 CONFIG_LDFLAGS
= @CONFIG_LDFLAGS@
547 ENABLE_CFLAGS
= @ENABLE_CFLAGS@
548 CONFIG_ALL
= @CONFIG_ALL@
549 CONFIG_CLEAN
= @CONFIG_CLEAN@
550 CONFIG_INSTALL
= @CONFIG_INSTALL@
551 CONFIG_UNINSTALL
= @CONFIG_UNINSTALL@
552 HAVE_NATIVE_GCORE_TARGET
= @HAVE_NATIVE_GCORE_TARGET@
554 CONFIG_SRC_SUBDIR
= arch cli dwarf2 mi compile tui unittests guile python \
556 CONFIG_DEP_SUBDIR
= $(addsuffix /$(DEPDIR
),$(CONFIG_SRC_SUBDIR
))
558 # -I. for config files.
559 # -I$(srcdir) for gdb internal headers.
560 # -I$(srcdir)/config for more generic config files.
562 # It is also possible that you will need to add -I/usr/include/sys if
563 # your system doesn't have fcntl.h in /usr/include (which is where it
564 # should be according to Posix).
566 GDB_CFLAGS
= -I.
-I
$(srcdir) -I
$(srcdir)/config \
567 -DLOCALEDIR
="\"$(localedir)\"" $(DEFS
)
569 # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
570 GLOBAL_CFLAGS
= $(MH_CFLAGS
)
572 PROFILE_CFLAGS
= @PROFILE_CFLAGS@
574 # These are specifically reserved for setting from the command line
575 # when running make. I.E.: "make CFLAGS=-Wmissing-prototypes".
577 CXXFLAGS
= @CXXFLAGS@
578 CPPFLAGS
= @CPPFLAGS@
580 # Set by configure, for e.g. expat. Python installations are such that
581 # C headers are included using their basename (for example, we #include
582 # <Python.h> rather than, say, <python/Python.h>). Since the file names
583 # are sometimes a little generic, we think that the risk of collision
584 # with other header files is high. If that happens, we try to mitigate
585 # a bit the consequences by putting the Python includes last in the list.
586 INTERNAL_CPPFLAGS
= $(CPPFLAGS
) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
588 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
589 INTERNAL_CFLAGS_BASE
= \
590 $(CXXFLAGS
) $(GLOBAL_CFLAGS
) $(PROFILE_CFLAGS
) \
591 $(GDB_CFLAGS
) $(OPCODES_CFLAGS
) $(READLINE_CFLAGS
) $(ZLIBINC
) \
592 $(BFD_CFLAGS
) $(INCLUDE_CFLAGS
) $(LIBDECNUMBER_CFLAGS
) \
593 $(INTL_CFLAGS
) $(INCGNU
) $(INCSUPPORT
) $(ENABLE_CFLAGS
) \
594 $(INTERNAL_CPPFLAGS
) $(SRCHIGH_CFLAGS
) $(TOP_CFLAGS
) $(PTHREAD_CFLAGS
)
595 INTERNAL_WARN_CFLAGS
= $(INTERNAL_CFLAGS_BASE
) $(GDB_WARN_CFLAGS
)
596 INTERNAL_CFLAGS
= $(INTERNAL_WARN_CFLAGS
) $(GDB_WERROR_CFLAGS
)
598 # LDFLAGS is specifically reserved for setting from the command line
602 # Profiling options need to go here to work.
603 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
604 # and have it work; that's why CFLAGS is here.
605 # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
607 $(CXXFLAGS
) $(GLOBAL_CFLAGS
) $(MH_LDFLAGS
) \
608 $(LDFLAGS
) $(CONFIG_LDFLAGS
) $(PTHREAD_CFLAGS
)
610 # Libraries and corresponding dependencies for compiling gdb.
611 # XM_CLIBS, defined in *config files, have host-dependent libs.
612 # LIBIBERTY appears twice on purpose.
613 CLIBS
= $(SIM
) $(READLINE
) $(OPCODES
) $(BFD
) $(LIBCTF
) $(ZLIB
) \
614 $(LIBSUPPORT
) $(INTL
) $(LIBIBERTY
) $(LIBDECNUMBER
) \
615 $(XM_CLIBS
) $(GDBTKLIBS
) \
616 @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
617 $(LIBEXPAT
) $(LIBLZMA
) $(LIBBABELTRACE
) $(LIBIPT
) \
618 $(WIN32LIBS
) $(LIBGNU
) $(LIBICONV
) \
619 $(LIBMPFR
) $(SRCHIGH_LIBS
) $(LIBXXHASH
) $(PTHREAD_LIBS
)
620 CDEPS
= $(NAT_CDEPS
) $(SIM
) $(BFD
) $(READLINE_DEPS
) $(LIBCTF
) \
621 $(OPCODES
) $(INTL_DEPS
) $(LIBIBERTY
) $(CONFIG_DEPS
) $(LIBGNU
) \
629 # XML files to build in to GDB.
631 $(srcdir)/features
/btrace.dtd \
632 $(srcdir)/features
/btrace-conf.dtd \
633 $(srcdir)/features
/gdb-target.dtd \
634 $(srcdir)/features
/library-list.dtd \
635 $(srcdir)/features
/library-list-aix.dtd \
636 $(srcdir)/features
/library-list-svr4.dtd \
637 $(srcdir)/features
/osdata.dtd \
638 $(srcdir)/features
/threads.dtd \
639 $(srcdir)/features
/traceframe-info.dtd \
640 $(srcdir)/features
/xinclude.dtd
642 # Build the ser-*.o files the host supports. This includes ser-unix.o
643 # for any system that supports a POSIX interface to the serial port.
645 SER_HARDWIRE
= @SER_HARDWIRE@
647 # This is remote-sim.o if a simulator is to be linked in.
650 # Target-dependent object files.
651 TARGET_OBS
= @TARGET_OBS@
653 # All target-dependent objects files that require 64-bit CORE_ADDR
654 # (used with --enable-targets=all --enable-64-bit-bfd).
655 ALL_64_TARGET_OBS
= \
656 aarch64-fbsd-tdep.o \
657 aarch64-linux-tdep.o \
658 aarch64-newlib-tdep.o \
659 aarch64-ravenscar-thread.o \
663 alpha-mdebug-tdep.o \
667 amd64-darwin-tdep.o \
675 amd64-windows-tdep.o \
677 arch
/aarch64-insn.o \
683 sparc64-fbsd-tdep.o \
684 sparc64-linux-tdep.o \
685 sparc64-nbsd-tdep.o \
686 sparc64-obsd-tdep.o \
687 sparc64-sol2-tdep.o \
690 # All other target-dependent objects files (used with --enable-targets=all).
696 arch
/arm-get-next-pcs.o \
699 arch
/ppc-linux-common.o \
756 microblaze-linux-tdep.o \
763 mn10300-linux-tdep.o \
779 ppc-ravenscar-thread.o \
785 riscv-ravenscar-thread.o \
789 rs6000-lynx178-tdep.o \
808 sparc-ravenscar-thread.o \
814 tilegx-linux-tdep.o \
824 xtensa-linux-tdep.o \
827 # The following native-target dependent variables are defined on
829 NAT_FILE
= @NAT_FILE@
830 NATDEPFILES
= @NATDEPFILES@
831 NAT_CDEPS
= @NAT_CDEPS@
832 LOADLIBES
= @LOADLIBES@
833 MH_CFLAGS
= @MH_CFLAGS@
834 XM_CLIBS
= @XM_CLIBS@
835 NAT_GENERATED_FILES
= @NAT_GENERATED_FILES@
837 HAVE_NATIVE_GCORE_HOST
= @HAVE_NATIVE_GCORE_HOST@
839 # Native-target dependent makefile fragment comes in here.
842 # End of native-target dependent variables.
846 "exec_prefix=$(exec_prefix)" \
847 "infodir=$(infodir)" \
848 "datarootdir=$(datarootdir)" \
850 "htmldir=$(htmldir)" \
854 "datadir=$(datadir)" \
855 "includedir=$(includedir)" \
856 "against=$(against)" \
857 "DESTDIR=$(DESTDIR)" \
859 "AR_FLAGS=$(AR_FLAGS)" \
863 "CXX_DIALECT=$(CXX_DIALECT)" \
864 "CXXFLAGS=$(CXXFLAGS)" \
865 "DLLTOOL=$(DLLTOOL)" \
866 "LDFLAGS=$(LDFLAGS)" \
868 "MAKEINFO=$(MAKEINFO)" \
869 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
870 "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
871 "MAKEHTML=$(MAKEHTML)" \
872 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
873 "INSTALL=$(INSTALL)" \
874 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
875 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
876 "INSTALL_DATA=$(INSTALL_DATA)" \
877 "RUNTEST=$(RUNTEST)" \
878 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
880 # Flags that we pass when building the testsuite.
882 # empty for native, $(target_alias)/ for cross
883 target_subdir
= @target_subdir@
886 if [ -f $${rootme}/../gcc/xgcc ] ; then \
887 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
888 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/; \
890 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
893 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
896 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
901 if [ -f $${rootme}/../gcc/xg++ ] ; then \
902 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
903 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/; \
905 echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
908 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
911 t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
915 # The use of $$(x_FOR_TARGET) reduces the command line length by not
916 # duplicating the lengthy definition.
917 TARGET_FLAGS_TO_PASS
= \
919 "exec_prefix=$(exec_prefix)" \
920 "against=$(against)" \
921 'CC=$$(CC_FOR_TARGET)' \
922 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
924 'CXX=$$(CXX_FOR_TARGET)' \
925 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
926 "CXXFLAGS=$(CXXFLAGS)" \
927 "INSTALL=$(INSTALL)" \
928 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
929 "INSTALL_DATA=$(INSTALL_DATA)" \
930 "MAKEINFO=$(MAKEINFO)" \
931 "MAKEHTML=$(MAKEHTML)" \
932 "RUNTEST=$(RUNTEST)" \
933 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
934 "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
937 # All source files that go into linking GDB.
939 # Files that should wind up in SFILES and whose corresponding .o
940 # should be in COMMON_OBS.
961 break-catch-syscall.c \
962 break-catch-throw.c \
1001 dwarf2
/frame-tailcall.c \
1003 dwarf2
/index-cache.c \
1004 dwarf2
/index-common.c \
1005 dwarf2
/index-write.c \
1007 dwarf2
/line-header.c \
1021 filename-seen-cache.c \
1034 gdbarch-selftests.c \
1063 maint-test-options.c \
1064 maint-test-settings.c \
1086 process-stratum-target.c \
1089 progspace-and-thread.c \
1103 run-on-main-thread.c \
1121 target-connection.c \
1123 target-descriptions.c \
1153 # Links made at configuration time should not be specified here, since
1154 # SFILES is used in building the distribution archive.
1178 $(SUBDIR_CLI_SRCS
) \
1179 $(SUBDIR_TARGET_SRCS
) \
1181 $(SUBDIR_GCC_COMPILE_SRCS
)
1183 # Header files that need to have srcdir added. Note that in the cases
1184 # where we use a macro like $(gdbcmd_h), things are carefully arranged
1185 # so that each .h file is listed exactly once (M-x tags-search works
1186 # wrong if TAGS has files twice). Because this is tricky to get
1187 # right, it is probably easiest just to list .h files here directly.
1189 HFILES_NO_SRCDIR
= \
1191 aarch64-ravenscar-thread.h \
1197 amd64-darwin-tdep.h \
1198 amd64-linux-tdep.h \
1239 dwarf2
/frame-tailcall.h \
1242 dwarf2
/index-cache.h \
1243 dwarf2
/index-common.h \
1267 gdb_proc_service.h \
1283 hppa-linux-offsets.h \
1286 i386-darwin-tdep.h \
1291 ia64-libunwind-tdep.h \
1343 ppc-ravenscar-thread.h \
1350 progspace-and-thread.h \
1354 ravenscar-thread.h \
1364 riscv-ravenscar-thread.h \
1368 run-on-main-thread.h \
1392 sparc-ravenscar-thread.h \
1402 target-descriptions.h \
1437 arch
/aarch64-insn.h \
1440 arch
/ppc-linux-common.h \
1441 arch
/ppc-linux-tdesc.h \
1450 compile
/compile-c.h \
1451 compile
/compile-cplus.h \
1452 compile
/compile-internal.h \
1453 compile
/compile-object-load.h \
1454 compile
/compile-object-run.h \
1455 compile
/gcc-c-plugin.h \
1456 compile
/gcc-cp-plugin.h \
1459 config
/djgpp
/langinfo.h \
1460 config
/djgpp
/nl_types.h \
1461 config
/i386
/nm-i386gnu.h \
1462 config
/sparc
/nm-sol2.h \
1470 nat
/aarch64-linux.h \
1471 nat
/aarch64-linux-hw-point.h \
1472 nat
/aarch64-sve-linux-ptrace.h \
1473 nat
/amd64-linux-siginfo.h \
1475 nat
/gdb_thread_db.h \
1476 nat
/fork-inferior.h \
1477 nat
/linux-btrace.h \
1478 nat
/linux-namespaces.h \
1480 nat
/linux-osdata.h \
1481 nat
/linux-personality.h \
1482 nat
/linux-ptrace.h \
1483 nat
/linux-waitpid.h \
1484 nat
/mips-linux-watch.h \
1488 nat
/x86-gcc-cpuid.h \
1490 nat
/x86-linux-dregs.h \
1492 python
/py-events.h \
1493 python
/py-stopevent.h \
1495 python
/python-internal.h \
1496 regformats
/regdef.h \
1500 target
/waitstatus.h \
1514 tui
/tui-wingeneral.h \
1515 tui
/tui-winsource.h \
1518 # Header files that already have srcdir in them, or which are in objdir.
1520 HFILES_WITH_SRCDIR
= \
1524 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1525 # default their values the way we do for SER_HARDWIRE; in the future
1526 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1527 # variables analogous to SER_HARDWIRE which get defaulted in this
1530 DEPFILES
= $(TARGET_OBS
) $(SER_HARDWIRE
) $(NATDEPFILES
) $(SIM_OBS
)
1532 SOURCES
= $(SFILES
) $(ALLDEPFILES
) $(YYFILES
) $(CONFIG_SRCS
)
1533 # Don't include YYFILES (*.c) because we already include *.y in SFILES,
1534 # and it's more useful to see it in the .y file.
1535 TAGFILES_NO_SRCDIR
= $(SFILES
) $(HFILES_NO_SRCDIR
) $(ALLDEPFILES
) \
1537 TAGFILES_WITH_SRCDIR
= $(HFILES_WITH_SRCDIR
)
1539 COMMON_OBS
= $(DEPFILES
) $(CONFIG_OBS
) $(YYOBJ
) \
1543 $(patsubst %.c
,%.o
,$(COMMON_SFILES
)) \
1545 $(SUBDIR_TARGET_OBS
) \
1546 $(SUBDIR_GCC_COMPILE_OBS
)
1548 SUBDIRS
= doc @subdirs@ data-directory
1549 CLEANDIRS
= $(SUBDIRS
)
1551 # List of subdirectories in the build tree that must exist.
1552 # This is used to force build failures in existing trees when
1553 # a new directory is added.
1554 # The format here is for the `case' shell command.
1555 REQUIRED_SUBDIRS
= doc | testsuite | data-directory
1557 # Parser intermediate files.
1570 # ada-lex.c is included by another file, so it shouldn't wind up as a
1572 YYOBJ
= $(filter-out ada-lex.o
,$(patsubst %.c
,%.o
,$(YYFILES
)))
1574 # Things which need to be built when making a distribution.
1576 DISTSTUFF
= $(YYFILES
)
1579 # All generated files which can be included by another file.
1584 $(NAT_GENERATED_FILES
) \
1587 # Flags needed to compile Python code
1588 PYTHON_CFLAGS
= @PYTHON_CFLAGS@
1590 all: gdb
$(EXEEXT
) $(CONFIG_ALL
) gdb-gdb.py gdb-gdb.gdb
1591 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
1593 # Rule for compiling .c files in the top-level gdb directory.
1594 # The order-only dependencies ensure that we create the build subdirectories.
1595 %.o
: %.c |
$(CONFIG_DEP_SUBDIR
)
1599 $(CONFIG_DEP_SUBDIR
):
1600 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$@
1602 # Python files need special flags.
1603 python
/%.o
: INTERNAL_CFLAGS
+= $(PYTHON_CFLAGS
)
1605 # Rules for compiling .c files in the various source subdirectories.
1606 %.o
: $(srcdir)/gdbtk
/generic
/%.c
1607 $(COMPILE
) $(all_gdbtk_cflags
) $<
1612 # The check target can not use subdir_do, because subdir_do does not
1613 # use TARGET_FLAGS_TO_PASS.
1615 @if
[ -f testsuite
/Makefile
]; then \
1616 rootme
=`pwd`; export rootme
; \
1617 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1619 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check; \
1623 @if
[ -f testsuite
/Makefile
]; then \
1624 rootme
=`pwd`; export rootme
; \
1625 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1627 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-perf
; \
1631 @if
[ -f testsuite
/Makefile
]; then \
1632 rootme
=`pwd`; export rootme
; \
1633 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1635 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-read1
; \
1638 check-parallel
: force
1639 @if
[ -f testsuite
/Makefile
]; then \
1640 rootme
=`pwd`; export rootme
; \
1641 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1643 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check-parallel
; \
1646 # The idea is to parallelize testing of multilibs, for example:
1647 # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1648 # will run 3 concurrent sessions of check, eventually testing all 10
1649 # combinations. GNU make is required for the % pattern to work, as is
1650 # a shell that expands alternations within braces. If GNU make is not
1651 # used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to
1652 # prevent serialized checking due to the passed RUNTESTFLAGS.
1653 # FIXME: use config.status --config not --version, when available.
1655 @if
[ -f testsuite
/config.status
]; then \
1656 rootme
=`pwd`; export rootme
; \
1657 rootsrc
=`cd $(srcdir); pwd`; export rootsrc
; \
1658 target
=`echo "$@" | sed 's,//.*,,'`; \
1659 variant
=`echo "$@" | sed 's,^[^/]*//,,'`; \
1660 vardots
=`echo "$$variant" | sed 's,/,.,g'`; \
1661 testdir
=testsuite.
$$vardots; \
1662 if
[ ! -f
$$testdir/Makefile
] && [ -f testsuite
/config.status
]; then \
1663 configargs
=`cd testsuite && ./config.status --version | \
1664 sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
1665 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$$testdir && \
1667 eval
$(SHELL
) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
1668 "\"--srcdir=\$$rootsrc/testsuite\"" \
1670 else :; fi
&& cd
$$testdir && \
1671 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) \
1672 RUNTESTFLAGS
="--target_board=$$variant $(RUNTESTFLAGS)" \
1673 FORCE_PARALLEL
=$(if
$(FORCE_PARALLEL
),1,$(if
$(RUNTESTFLAGS
),,1)) \
1677 # The set of headers checked by 'check-headers' by default.
1678 CHECK_HEADERS
= $(HFILES_NO_SRCDIR
)
1680 # Try to compile each header in isolation, thus ensuring headers are
1683 # Defaults to checking all $HFILES_NO_SRCDIR headers.
1687 # make check-headers CHECK_HEADERS="header.h list.h"
1689 # to check specific headers.
1692 @echo Checking headers.
1693 for i in
$(CHECK_HEADERS
) ; do \
1694 $(CXX
) $(CXX_DIALECT
) -x c
++-header
-c
-fsyntax-only \
1695 $(INTERNAL_CFLAGS
) -include defs.h
$(srcdir)/$$i ; \
1697 .PHONY
: check-headers
1699 info install-info clean-info
dvi pdf install-pdf html install-html
: force
1700 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
1702 # Traditionally "install" depends on "all". But it may be useful
1703 # not to; for example, if the user has made some trivial change to a
1704 # source file and doesn't care about rebuilding or just wants to save the
1705 # time it takes for make to check that all is up to date.
1706 # install-only is intended to address that need.
1708 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
1710 install-only
: $(CONFIG_INSTALL
)
1711 transformed_name
=`t='$(program_transform_name)'; \
1712 echo gdb | sed -e "$$t"` ; \
1713 if
test "x$$transformed_name" = x
; then \
1714 transformed_name
=gdb
; \
1718 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
1719 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) gdb
$(EXEEXT
) \
1720 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
1721 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(includedir)/gdb
; \
1722 $(INSTALL_DATA
) jit-reader.h
$(DESTDIR
)$(includedir)/gdb
/jit-reader.h
1723 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
1725 transformed_name
=`t='$(program_transform_name)'; \
1726 echo gcore | sed -e "$$t"` ; \
1727 if
test "x$$transformed_name" = x
; then \
1728 transformed_name
=gcore
; \
1732 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir) ; \
1733 $(INSTALL_SCRIPT
) gcore \
1734 $(DESTDIR
)$(bindir)/$$transformed_name; \
1736 transformed_name
=`t='$(program_transform_name)'; \
1737 echo gdb-add-index | sed -e "$$t"` ; \
1738 if
test "x$$transformed_name" = x
; then \
1739 transformed_name
=gdb-add-index
; \
1743 $(INSTALL_SCRIPT
) $(srcdir)/contrib
/gdb-add-index.sh \
1744 $(DESTDIR
)$(bindir)/$$transformed_name
1745 @
$(MAKE
) DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
1748 $(MAKE
) $(FLAGS_TO_PASS
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" \
1749 install_sh_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG
=-s \
1750 `test -z '$(STRIP)' || \
1751 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
1754 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/guile
/gdb
1757 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(GDB_DATADIR
)/python
/gdb
1759 uninstall: force $(CONFIG_UNINSTALL
)
1760 transformed_name
=`t='$(program_transform_name)'; \
1761 echo gdb | sed -e $$t` ; \
1762 if
test "x$$transformed_name" = x
; then \
1763 transformed_name
=gdb
; \
1767 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) \
1768 $(DESTDIR
)$(man1dir)/$$transformed_name.1
1769 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x
; \
1771 transformed_name
=`t='$(program_transform_name)'; \
1772 echo gcore | sed -e "$$t"` ; \
1773 if
test "x$$transformed_name" = x
; then \
1774 transformed_name
=gcore
; \
1778 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name; \
1780 @
$(MAKE
) DO
=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
) subdir_do
1782 # The C++ name parser can be built standalone for testing.
1783 test-cp-name-parser.o
: cp-name-parser.c
1784 $(COMPILE
) -DTEST_CPNAMES cp-name-parser.c
1787 test-cp-name-parser
$(EXEEXT
): test-cp-name-parser.o
$(LIBIBERTY
)
1788 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) \
1789 -o test-cp-name-parser
$(EXEEXT
) test-cp-name-parser.o \
1792 # We do this by grepping through sources. If that turns out to be too slow,
1793 # maybe we could just require every .o file to have an initialization routine
1794 # of a given name (top.o -> _initialize_top, etc.).
1796 # Formatting conventions: The name of the _initialize_* routines must start
1797 # in column zero, and must not be inside #if.
1799 # Note that the set of files with init functions might change, or the names
1800 # of the functions might change, so this files needs to depend on all the
1801 # source files that will be linked into gdb. However, due to the way
1802 # this Makefile has generally been written, we do this indirectly, by
1803 # computing the list of source files from the list of object files.
1806 $(patsubst %.o
,%.c
, \
1807 $(patsubst %-exp.o
,%-exp.y
, \
1808 $(filter-out init.o version.o
%_S.o
%_U.o
,\
1811 init.c
: stamp-init
; @true
1812 stamp-init
: $(INIT_FILES
)
1813 @
$(ECHO_INIT_C
) echo
"Making init.c"
1814 @
rm -f init.c-tmp init.l-tmp
1816 @
-for f in
$(INIT_FILES
); do \
1817 sed
-n
-e
's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' \
1818 $(srcdir)/$$f 2>/dev
/null
; \
1820 @echo
'/* Do not modify this file. */' >>init.c-tmp
1821 @echo
'/* It is created automatically by the Makefile. */'>>init.c-tmp
1822 @echo
'#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp
1823 @echo
'extern void initialize_all_files(void);' >>init.c-tmp
1824 @sed
-e
's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp
>>init.c-tmp
1825 @echo
'void' >>init.c-tmp
1826 @echo
'initialize_all_files (void)' >>init.c-tmp
1827 @echo
'{' >>init.c-tmp
1828 @sed
-e
's/\(.*\)/ _initialize_\1 ();/' <init.l-tmp
>>init.c-tmp
1829 @echo
'}' >>init.c-tmp
1830 @
$(SHELL
) $(srcdir)/..
/move-if-change init.c-tmp init.c
1831 @echo stamp
> stamp-init
1835 # Create a library of the gdb object files and build GDB by linking
1838 # init.o is very important. It pulls in the rest of GDB.
1839 LIBGDB_OBS
= $(sort $(COMMON_OBS
)) init.o
1840 libgdb.a
: $(LIBGDB_OBS
)
1842 $(AR
) q libgdb.a
$(LIBGDB_OBS
)
1845 # Removing the old gdb first works better if it is running, at least on SunOS.
1846 gdb
$(EXEEXT
): gdb.o
$(LIBGDB_OBS
) $(CDEPS
) $(TDEPLIBS
)
1847 $(SILENCE
) rm -f gdb
$(EXEEXT
)
1848 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
1849 -o gdb
$(EXEEXT
) gdb.o
$(LIBGDB_OBS
) \
1850 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
1851 ifneq ($(CODESIGN_CERT
),)
1852 $(ECHO_SIGN
) $(CODESIGN
) -s
$(CODESIGN_CERT
) gdb
$(EXEEXT
)
1855 # Convenience rule to handle recursion.
1856 .PHONY
: all-data-directory
1857 all-data-directory
: data-directory
/Makefile
1858 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all DODIRS
=data-directory subdir_do
1860 # This is useful when debugging GDB, because some Unix's don't let you run GDB
1861 # on itself without copying the executable. So "make gdb1" will make
1862 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
1863 # Removing gdb1 before the copy is the right thing if gdb1 is open
1864 # in another process.
1865 gdb1
$(EXEEXT
): gdb
$(EXEEXT
)
1867 cp gdb
$(EXEEXT
) gdb1
$(EXEEXT
)
1869 # Put the proper machine-specific files first, so M-. on a machine
1870 # specific routine gets the one for the correct machine. (FIXME: those
1871 # files go in twice; we should be removing them from the main list).
1873 # TAGS depends on all the files that go into it so you can rebuild TAGS
1874 # with `make TAGS' and not have to say `rm TAGS' first.
1876 GDB_NM_FILE
= @GDB_NM_FILE@
1877 TAGS
: $(TAGFILES_NO_SRCDIR
) $(TAGFILES_WITH_SRCDIR
)
1879 etags
`(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
1880 `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
1881 echo $(srcdir)/$$i ; \
1882 done ; for i in $(TAGFILES_WITH_SRCDIR); do \
1884 done) | sed -e 's/\.o$$/\.c/'` \
1885 `find $(srcdir)/config -name '*.h' -print`
1889 clean mostlyclean: $(CONFIG_CLEAN
)
1890 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=clean "DODIRS=$(CLEANDIRS)" subdir_do
1891 rm -f
*.o
*.a
*~ init.c-tmp init.l-tmp version.c-tmp
1892 rm -f init.c stamp-init version.c stamp-version
1893 rm -f gdb
$(EXEEXT
) core make.log
1894 rm -f gdb
[0-9]$(EXEEXT
)
1895 rm -f test-cp-name-parser
$(EXEEXT
)
1896 rm -f xml-builtin.c stamp-xml
1898 for i in
$(CONFIG_SRC_SUBDIR
); do \
1900 rm -f
$$i/$(DEPDIR
)/*; \
1903 # This used to depend on c-exp.c m2-exp.c TAGS
1904 # I believe this is wrong; the makefile standards for distclean just
1905 # describe removing files; the only sort of "re-create a distribution"
1906 # functionality described is if the distributed files are unmodified.
1908 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=distclean "DODIRS=$(CLEANDIRS)" subdir_do
1909 rm -f nm.h config.status config.h stamp-h b jit-reader.h
1910 rm -f gdb-gdb.py gdb-gdb.gdb
1911 rm -f y.output
yacc.acts
yacc.tmp y.tab.h
1912 rm -f config.log config.cache
1915 for i in
$(CONFIG_SRC_SUBDIR
); do \
1916 if
test -d
$$i/$(DEPDIR
); then rmdir
$$i/$(DEPDIR
); fi \
1919 maintainer-clean
: local-maintainer-clean do-maintainer-clean
distclean
1920 realclean: maintainer-clean
1922 local-maintainer-clean
:
1923 @echo
"This command is intended for maintainers to use;"
1924 @echo
"it deletes files that may require special tools to rebuild."
1927 ada-lex.c ada-exp.c \
1928 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
1931 rm -f nm.h config.status
1933 do-maintainer-clean
:
1934 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=maintainer-clean
"DODIRS=$(CLEANDIRS)" \
1937 diststuff
: $(DISTSTUFF
) $(PACKAGE
).pot
$(CATALOGS
)
1938 cd doc
; $(MAKE
) $(MFLAGS
) diststuff
1941 @for i in
$(DODIRS
); do \
1943 $(REQUIRED_SUBDIRS
)) \
1944 if
[ ! -f .
/$$i/Makefile
] ; then \
1945 echo
"Missing $$i/Makefile" >&2 ; \
1949 if
[ -f .
/$$i/Makefile
] ; then \
1951 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1952 else exit
1 ; fi
; \
1956 Makefile
: Makefile.in config.status
1957 $(SHELL
) config.status
$@
1959 data-directory
/Makefile
: data-directory
/Makefile.in config.status
1960 $(SHELL
) config.status
$@
1964 .
/gdb
$(EXEEXT
) --data-directory
=`pwd`/data-directory
$(GDBFLAGS
)
1966 jit-reader.h
: $(srcdir)/jit-reader.in
1967 $(SHELL
) config.status
$@
1969 gcore
: $(srcdir)/gcore.in
1970 $(SHELL
) config.status
$@
1972 gdb-gdb.py
: $(srcdir)/gdb-gdb.py.in
1973 $(SHELL
) config.status
$@
1975 gdb-gdb.gdb
: $(srcdir)/gdb-gdb.gdb.in
1976 $(SHELL
) config.status
$@
1978 config.h
: stamp-h
; @true
1979 stamp-h
: $(srcdir)/config.in config.status
1980 $(SHELL
) config.status config.h
1982 nm.h
: stamp-nmh
; @true
1983 stamp-nmh
: config.status
1984 $(SHELL
) config.status nm.h
1986 config.status
: $(srcdir)/configure configure.nat configure.tgt configure.host ..
/bfd
/development.sh
1987 $(SHELL
) config.status
--recheck
1990 ACLOCAL_AMFLAGS
= -I ..
/config
1992 # Keep these in sync with the includes in acinclude.m4.
1995 acx_configure_dir.m4 \
1998 ..
/config
/acinclude.m4 \
1999 ..
/config
/plugins.m4 \
2000 ..
/config
/lead-dot.m4 \
2001 ..
/config
/override.m4 \
2002 ..
/config
/largefile.m4 \
2003 ..
/config
/gettext-sister.m4 \
2004 ..
/config
/lib-ld.m4 \
2005 ..
/config
/lib-prefix.m4 \
2006 ..
/config
/lib-link.m4 \
2009 ..
/config
/depstand.m4 \
2010 ..
/config
/lcmessage.m4 \
2011 ..
/config
/codeset.m4 \
2013 ..
/config
/ax_pthread.m4
2015 $(srcdir)/aclocal.m4
: @MAINTAINER_MODE_TRUE@
$(aclocal_m4_deps
)
2016 cd
$(srcdir) && $(ACLOCAL
) $(ACLOCAL_AMFLAGS
)
2019 configure_deps
= $(srcdir)/configure.ac
$(srcdir)/aclocal.m4
2020 $(srcdir)/configure
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2021 cd
$(srcdir) && $(AUTOCONF
)
2023 AUTOHEADER
= autoheader
2024 $(srcdir)/config.in
: @MAINTAINER_MODE_TRUE@
$(configure_deps
)
2025 cd
$(srcdir) && $(AUTOHEADER
)
2029 # automatic rebuilding in automake-generated Makefiles requires
2030 # this rule in the toplevel Makefile, which, with GNU make, causes
2031 # the desired updates through the implicit regeneration of the Makefile
2032 # and all of its prerequisites.
2039 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
2041 cd doc
; $(MAKE
) refcard.
dvi $(FLAGS_TO_PASS
)
2043 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
2045 cd doc
; $(MAKE
) refcard.ps
$(FLAGS_TO_PASS
)
2047 # GDB MANUAL: TeX dvi file
2049 cd doc
; $(MAKE
) gdb.
dvi $(FLAGS_TO_PASS
)
2051 # GDB MANUAL: info file
2053 cd doc
; $(MAKE
) gdb.
info $(FLAGS_TO_PASS
)
2055 # Make copying.c from COPYING
2056 $(srcdir)/copying.c
: @MAINTAINER_MODE_TRUE@
$(srcdir)/..
/COPYING3
$(srcdir)/copying.awk
2057 awk
-f
$(srcdir)/copying.awk \
2058 < $(srcdir)/..
/COPYING3
> $(srcdir)/copying.tmp
2059 mv
$(srcdir)/copying.tmp
$(srcdir)/copying.c
2061 version.c
: stamp-version
; @true
2062 # Note that the obvious names for the temp file are taken by
2063 # create-version.sh.
2064 stamp-version
: Makefile version.in
$(srcdir)/..
/bfd
/version.h
$(srcdir)/..
/gdbsupport
/create-version.sh
2065 $(ECHO_GEN
) $(SHELL
) $(srcdir)/..
/gdbsupport
/create-version.sh
$(srcdir) \
2066 $(host_alias
) $(target_alias
) version-t.t
2067 @
$(SHELL
) $(srcdir)/..
/move-if-change version-t.t version.c
2068 @echo stamp
> stamp-version
2071 gdb.cxref
: $(SFILES
)
2072 cxref
-I.
$(SFILES
) >gdb.cxref
2076 # GNU Make has an annoying habit of putting *all* the Makefile variables
2077 # into the environment, unless you include this target as a circumvention.
2078 # Rumor is that this will be fixed (and this target can be removed)
2082 # GNU Make 3.63 has a different problem: it keeps tacking command line
2083 # overrides onto the definition of $(MAKE). This variable setting
2089 aarch64-fbsd-nat.c \
2090 aarch64-fbsd-tdep.c \
2091 aarch64-linux-nat.c \
2092 aarch64-linux-tdep.c \
2093 aarch64-newlib-tdep.c \
2094 aarch64-ravenscar-thread.c \
2100 alpha-linux-tdep.c \
2101 alpha-mdebug-tdep.c \
2106 amd64-darwin-tdep.c \
2107 amd64-dicos-tdep.c \
2111 amd64-linux-tdep.c \
2124 arm-get-next-pcs.c \
2131 arm-symbian-tdep.c \
2159 i386-cygwin-tdep.c \
2161 i386-darwin-tdep.c \
2177 ia64-libunwind-tdep.c \
2196 microblaze-linux-tdep.c \
2208 mips64-obsd-tdep.c \
2213 nios2-linux-tdep.c \
2226 ppc-ravenscar-thread.c \
2230 ravenscar-thread.c \
2235 riscv-linux-tdep.c \
2236 riscv-ravenscar-thread.c \
2239 rs6000-lynx178-tdep.c \
2259 sparc-linux-tdep.c \
2264 sparc-ravenscar-thread.c \
2268 sparc64-fbsd-nat.c \
2269 sparc64-fbsd-tdep.c \
2270 sparc64-linux-nat.c \
2271 sparc64-linux-tdep.c \
2273 sparc64-nbsd-nat.c \
2274 sparc64-nbsd-tdep.c \
2275 sparc64-obsd-nat.c \
2276 sparc64-obsd-tdep.c \
2277 sparc64-sol2-tdep.c \
2279 tilegx-linux-nat.c \
2280 tilegx-linux-tdep.c \
2293 xtensa-linux-nat.c \
2294 xtensa-linux-tdep.c \
2298 # Some files need explicit build rules (due to -Werror problems) or due
2299 # to sub-directory fun 'n' games.
2301 # ada-exp.c can appear in srcdir, for releases; or in ., for
2302 # development builds.
2303 ADA_EXP_C
= `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
2305 ada-exp.o
: ada-exp.c
2306 $(COMPILE
) $(ADA_EXP_C
)
2309 # Message files. Based on code in gcc/Makefile.in.
2311 # Rules for generating translated message descriptions. Disabled by
2312 # autoconf if the tools are not available.
2314 .PHONY
: all-po install-po uninstall-po clean-po update-po
$(PACKAGE
).pot
2318 # This notation should be acceptable to all Make implementations used
2319 # by people who are interested in updating .po files.
2320 update-po
: $(CATALOGS
:.gmo
=.pox
)
2322 # N.B. We do not attempt to copy these into $(srcdir). The snapshot
2325 -test -d po || mkdir po
2326 $(GMSGFMT
) --statistics
-o
$@
$<
2328 # The new .po has to be gone over by hand, so we deposit it into
2329 # build/po with a different extension. If build/po/$(PACKAGE).pot
2330 # exists, use it (it was just created), else use the one in srcdir.
2332 -test -d po || mkdir po
2333 $(MSGMERGE
) $< `if test -f po/$(PACKAGE).pot; \
2334 then echo po/$(PACKAGE).pot; \
2335 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o
$@
2337 # This rule has to look for .gmo modules in both srcdir and the cwd,
2338 # and has to check that we actually have a catalog for each language,
2339 # in case they weren't built or included with the distribution.
2341 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(datadir)
2342 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2343 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2344 if
[ -f
$$cat ]; then
:; \
2345 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2348 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2349 echo
$(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir; \
2350 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$$dir || exit
1; \
2351 echo
$(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2352 $(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2355 cats
="$(CATALOGS)"; for cat in
$$cats; do \
2356 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
2357 if
[ -f
$$cat ]; then
:; \
2358 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
2361 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
2362 rm -f
$(DESTDIR
)$$dir/$(PACKAGE
).mo
; \
2364 # Delete po/*.gmo only if we are not building in the source directory.
2366 -if
[ ! -f Makefile.in
]; then
rm -f po
/*.gmo
; fi
2368 # Rule for regenerating the message template (gdb.pot). Instead of
2369 # forcing everyone to edit POTFILES.in, which proved impractical, this
2370 # rule has no dependencies and always regenerates gdb.pot. This is
2371 # relatively harmless since the .po files do not directly depend on
2372 # it. The .pot file is left in the build directory. Since GDB's
2373 # Makefile lacks a cannonical list of sources (missing xm, tm and nm
2374 # files) force this rule.
2375 $(PACKAGE
).pot
: po
/$(PACKAGE
).pot
2376 po
/$(PACKAGE
).pot
: force
2377 -test -d po || mkdir po
2378 sh
-e
$(srcdir)/po
/gdbtext
$(XGETTEXT
) $(PACKAGE
) .
$(srcdir)
2382 # YACC/LEX dependencies
2384 # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
2385 # exist in srcdir, then compiled in objdir to LANG-exp.o. If we
2386 # said LANG-exp.c rather than ./c-exp.c some makes would
2387 # sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus
2388 # decls for malloc/realloc/free which conflict with everything else.
2389 # Strictly speaking c-exp.c should therefore depend on
2390 # Makefile.in, but that was a pretty big annoyance.
2393 $(ECHO_YACC
) $(SHELL
) $(YLWRAP
) $< y.tab.c
$@.tmp
-- \
2394 $(YACC
) $(YFLAGS
) ||
(rm -f
$@.tmp
; false
)
2395 @sed
-e
'/extern.*malloc/d' \
2396 -e
'/extern.*realloc/d' \
2397 -e
'/extern.*free/d' \
2398 -e
'/include.*malloc.h/d' \
2399 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2400 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2401 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2402 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2403 -e
'/^#line.*y.tab.c/d' \
2404 -e
's/YY_NULL/YY_NULLPTR/g' \
2405 < $@.tmp
> $@.new
&& \
2409 $(ECHO_LEX
) $(FLEX
) -t
$< \
2410 | sed
-e
'/extern.*malloc/d' \
2411 -e
'/extern.*realloc/d' \
2412 -e
'/extern.*free/d' \
2413 -e
'/include.*malloc.h/d' \
2414 -e
's/\([^x]\)malloc/\1xmalloc/g' \
2415 -e
's/\([^x]\)realloc/\1xrealloc/g' \
2416 -e
's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2417 -e
's/\([ \t;,(]\)free$$/\1xfree/g' \
2418 -e
's/yy_flex_xrealloc/yyxrealloc/g' \
2422 .PRECIOUS
: ada-lex.c
2426 xml-builtin.c
: stamp-xml
; @true
2427 stamp-xml
: $(srcdir)/features
/feature_to_c.sh Makefile
$(XMLFILES
)
2428 $(SILENCE
) rm -f xml-builtin.tmp
2429 $(ECHO_GEN_XML_BUILTIN
) AWK
="$(AWK)" \
2430 $(SHELL
) $(srcdir)/features
/feature_to_c.sh \
2431 xml-builtin.tmp
$(XMLFILES
)
2432 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change xml-builtin.tmp xml-builtin.c
2433 $(SILENCE
) echo stamp
> stamp-xml
2435 .PRECIOUS
: xml-builtin.c
2438 # GDBTK sub-directory
2441 all-gdbtk
: insight
$(EXEEXT
)
2444 transformed_name
=`t='$(program_transform_name)'; \
2445 echo insight | sed -e $$t` ; \
2446 if
test "x$$transformed_name" = x
; then \
2447 transformed_name
=insight
; \
2451 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
2452 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) insight
$(EXEEXT
) \
2453 $(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2454 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2455 $(DESTDIR
)$(GDBTK_LIBRARY
) ; \
2456 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2457 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
) ; \
2458 $(INSTALL_DATA
) $(srcdir)/gdbtk
/plugins
/plugins.tcl \
2459 $(DESTDIR
)$(libdir)/insight
$(GDBTK_VERSION
)/plugins.tcl
; \
2460 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2461 $(DESTDIR
)$(GDBTK_LIBRARY
)/images \
2462 $(DESTDIR
)$(GDBTK_LIBRARY
)/images2
; \
2463 $(SHELL
) $(srcdir)/..
/mkinstalldirs \
2464 $(DESTDIR
)$(GDBTK_LIBRARY
)/help \
2465 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/images \
2466 $(DESTDIR
)$(GDBTK_LIBRARY
)/help
/trace
; \
2467 cd
$(srcdir)/gdbtk
/library
; \
2468 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
; \
2470 $(INSTALL_DATA
) $$i $(DESTDIR
)$(GDBTK_LIBRARY
)/$$i ; \
2474 transformed_name
=`t='$(program_transform_name)'; \
2475 echo insight | sed -e $$t` ; \
2476 if
test "x$$transformed_name" = x
; then \
2477 transformed_name
=insight
; \
2481 rm -f
$(DESTDIR
)$(bindir)/$$transformed_name$(EXEEXT
) ; \
2482 rm -rf
$(DESTDIR
)$(GDBTK_LIBRARY
)
2485 rm -f insight
$(EXEEXT
)
2487 # Removing the old gdb first works better if it is running, at least on SunOS.
2488 insight
$(EXEEXT
): gdbtk-main.o libgdb.a
$(CDEPS
) $(TDEPLIBS
)
2489 rm -f insight
$(EXEEXT
)
2490 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_LDFLAGS
) $(WIN32LDAPP
) \
2491 -o insight
$(EXEEXT
) gdbtk-main.o libgdb.a \
2492 $(TDEPLIBS
) $(TUI_LIBRARY
) $(CLIBS
) $(LOADLIBES
)
2494 gdbres.o
: $(srcdir)/gdbtk
/gdb.rc
$(srcdir)/gdbtk
/gdbtool.ico
2495 $(WINDRES
) --include $(srcdir)/gdbtk
$(srcdir)/gdbtk
/gdb.rc gdbres.o
2497 all_gdbtk_cflags
= $(IDE_CFLAGS
) $(ITCL_CFLAGS
) \
2498 $(ITK_CFLAGS
) $(TCL_CFLAGS
) $(TK_CFLAGS
) $(X11_CFLAGS
) \
2500 -DGDBTK_LIBRARY
=\"$(GDBTK_LIBRARY
)\" \
2501 -DSRC_DIR
=\"$(GDBTK_SRC_DIR
)\"
2504 # Dependency tracking.
2507 ifeq ($(DEPMODE
),depmode
=gcc3
)
2508 # Note that we put the dependencies into a .Tpo file, then move them
2509 # into place if the compile succeeds. We need this because gcc does
2510 # not atomically write the dependency output file.
2511 override COMPILE.post
= -c
-o
$@
-MT
$@
-MMD
-MP \
2512 -MF
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo
2513 override POSTCOMPILE
= @mv
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo \
2514 $(@D
)/$(DEPDIR
)/$(basename $(@F
)).Po
2516 override COMPILE.pre
= source
='$<' object
='$@' libtool
=no \
2517 DEPDIR
=$(DEPDIR
) $(DEPMODE
) $(depcomp
) \
2518 $(CXX
) -x c
++ $(CXX_DIALECT
)
2519 # depcomp handles atomicity for us, so we don't need a postcompile
2521 override POSTCOMPILE
=
2524 # A list of all the objects we might care about in this build, for
2525 # dependency tracking.
2526 all_object_files
= gdb.o
$(LIBGDB_OBS
) gdbtk-main.o \
2527 test-cp-name-parser.o
2529 # All the .deps files to include.
2530 all_deps_files
= $(foreach dep
,$(patsubst %.o
,%.Po
,$(all_object_files
)),\
2531 $(dir $(dep
))/$(DEPDIR
)/$(notdir $(dep
)))
2533 # Ensure that generated files are created early. Use order-only
2534 # dependencies if available. They require GNU make 3.80 or newer,
2535 # and the .VARIABLES variable was introduced at the same time.
2537 $(all_object_files
): |
$(generated_files
)
2539 $(all_object_files
) : $(generated_files
)
2543 -include $(all_deps_files
)
2545 # Disable implicit make rules.
2546 include $(srcdir)/disable-implicit-rules.mk
2548 ### end of the gdb Makefile.in.