1# Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 3# This file is part of GDB. 4 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. 9# 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. 14# 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/>. 17 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: 20# 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 26# characters. 27# 28# For example: 29# 30# SOME_FILES = \ 31# foo.c \ 32# foo.h \ 33# foo-bar.c \ 34# foobar.c \ 35# foo/bar.c 36 37prefix = @prefix@ 38exec_prefix = @exec_prefix@ 39 40host_alias = @host_alias@ 41target_alias = @target_alias@ 42program_transform_name = @program_transform_name@ 43bindir = @bindir@ 44libdir = @libdir@ 45tooldir = $(libdir)/$(target_alias) 46 47datadir = @datadir@ 48localedir = @localedir@ 49mandir = @mandir@ 50man1dir = $(mandir)/man1 51man2dir = $(mandir)/man2 52man3dir = $(mandir)/man3 53man4dir = $(mandir)/man4 54man5dir = $(mandir)/man5 55man6dir = $(mandir)/man6 56man7dir = $(mandir)/man7 57man8dir = $(mandir)/man8 58man9dir = $(mandir)/man9 59infodir = @infodir@ 60datarootdir = @datarootdir@ 61docdir = @docdir@ 62htmldir = @htmldir@ 63pdfdir = @pdfdir@ 64includedir = @includedir@ 65 66install_sh = @install_sh@ 67 68# This can be referenced by `LIBINTL' as computed by 69# ZW_GNU_GETTEXT_SISTER_DIR. 70top_builddir = . 71 72SHELL = @SHELL@ 73EXEEXT = @EXEEXT@ 74 75AWK = @AWK@ 76LN_S = @LN_S@ 77 78INSTALL = @INSTALL@ 79INSTALL_PROGRAM = @INSTALL_PROGRAM@ 80INSTALL_SCRIPT = @INSTALL_SCRIPT@ 81INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 82INSTALL_DATA = @INSTALL_DATA@ 83 84DESTDIR = 85 86AR = @AR@ 87AR_FLAGS = qv 88RANLIB = @RANLIB@ 89DLLTOOL = @DLLTOOL@ 90WINDRES = @WINDRES@ 91MIG = @MIG@ 92STRIP = @STRIP@ 93 94XGETTEXT = @XGETTEXT@ 95GMSGFMT = @GMSGFMT@ 96MSGMERGE = msgmerge 97 98PACKAGE = @PACKAGE@ 99CATALOGS = @CATALOGS@ 100 101CC = @CC@ 102CXX = @CXX@ 103CXX_DIALECT = @CXX_DIALECT@ 104 105# Dependency tracking information. 106DEPMODE = @CCDEPMODE@ 107DEPDIR = @DEPDIR@ 108depcomp = $(SHELL) $(srcdir)/../depcomp 109 110# Directory containing source files. 111srcdir = @srcdir@ 112VPATH = @srcdir@ 113top_srcdir = @top_srcdir@ 114 115include $(srcdir)/silent-rules.mk 116 117# Note that these are overridden by GNU make-specific code below if 118# GNU make is used. The overrides implement dependency tracking. 119COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT) 120COMPILE.post = -c -o $@ 121POSTCOMPILE = @true 122 123# CXXFLAGS is at the very end on purpose, so that user-supplied flags can 124# override internal flags. 125COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(CXXFLAGS) \ 126 $(COMPILE.post) 127 128YACC = @YACC@ 129 130# This is used to rebuild ada-lex.c from ada-lex.l. If the program is 131# not defined, but ada-lex.c is present, compilation will continue, 132# possibly with a warning. 133FLEX = flex 134 135YLWRAP = $(srcdir)/../ylwrap 136 137# where to find makeinfo, preferably one designed for texinfo-2 138MAKEINFO = @MAKEINFO@ 139MAKEINFOFLAGS = @MAKEINFOFLAGS@ 140MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@ 141MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) 142 143MAKEHTML = $(MAKEINFO_CMD) --html 144MAKEHTMLFLAGS = 145 146# Set this up with gcc if you have gnu ld and the loader will print out 147# line numbers for undefined references. 148#CC_LD = g++ -static 149CC_LD = $(CXX) $(CXX_DIALECT) 150 151# Where is our "include" directory? Typically $(srcdir)/../include. 152# This is essentially the header file directory for the library 153# routines in libiberty. 154INCLUDE_DIR = $(srcdir)/../include 155INCLUDE_CFLAGS = -I$(INCLUDE_DIR) 156 157# Where is the "-liberty" library? Typically in ../libiberty. 158LIBIBERTY = ../libiberty/libiberty.a 159 160# Where is the CTF library? Typically in ../libctf. 161LIBCTF = @LIBCTF@ 162CTF_DEPS = @CTF_DEPS@ 163 164# Where is the BFD library? Typically in ../bfd. 165BFD_DIR = ../bfd 166BFD = $(BFD_DIR)/libbfd.a 167BFD_SRC = $(srcdir)/$(BFD_DIR) 168BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) 169 170# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is 171# -I../zlib, unless we were configured with --with-system-zlib, in which 172# case both are empty. 173ZLIB = @zlibdir@ -lz 174ZLIBINC = @zlibinc@ 175 176# Where is the decnumber library? Typically in ../libdecnumber. 177LIBDECNUMBER_DIR = ../libdecnumber 178LIBDECNUMBER = $(LIBDECNUMBER_DIR)/libdecnumber.a 179LIBDECNUMBER_SRC = $(srcdir)/$(LIBDECNUMBER_DIR) 180LIBDECNUMBER_CFLAGS = -I$(LIBDECNUMBER_DIR) -I$(LIBDECNUMBER_SRC) 181 182# Where is the READLINE library? Typically in ../readline/readline. 183READLINE_DIR = ../readline/readline 184READLINE_SRC = $(srcdir)/$(READLINE_DIR) 185READLINE = @READLINE@ 186READLINE_DEPS = @READLINE_DEPS@ 187READLINE_CFLAGS = @READLINE_CFLAGS@ 188 189# Where is expat? This will be empty if expat was not available. 190LIBEXPAT = @LIBEXPAT@ 191 192# Where is lzma? This will be empty if lzma was not available. 193LIBLZMA = @LIBLZMA@ 194 195# Where is libbabeltrace? This will be empty if libbabeltrace was not 196# available. 197LIBBABELTRACE = @LIBBABELTRACE@ 198 199# Where is libxxhash? This will be empty if libxxhash was not 200# available. 201LIBXXHASH = @LIBXXHASH@ 202 203# Where is libipt? This will be empty if libipt was not available. 204LIBIPT = @LIBIPT@ 205 206# Where is libgmp? 207LIBGMP = @LIBGMP@ 208 209# Where is libmpfr? This will be empty if libmpfr was not available. 210LIBMPFR = @LIBMPFR@ 211 212# GNU source highlight library. 213SRCHIGH_LIBS = @SRCHIGH_LIBS@ 214SRCHIGH_CFLAGS = @SRCHIGH_CFLAGS@ 215 216WARN_CFLAGS = @WARN_CFLAGS@ 217WERROR_CFLAGS = @WERROR_CFLAGS@ 218GDB_WARN_CFLAGS = $(WARN_CFLAGS) 219GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) 220 221PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ 222PTHREAD_LIBS = @PTHREAD_LIBS@ 223 224DEBUGINFOD_CFLAGS = @DEBUGINFOD_CFLAGS@ 225DEBUGINFOD_LIBS = @DEBUGINFOD_LIBS@ 226 227RDYNAMIC = @RDYNAMIC@ 228 229# Where is the INTL library? Typically in ../intl. 230INTL = @LIBINTL@ 231INTL_DEPS = @LIBINTL_DEP@ 232INTL_CFLAGS = @INCINTL@ 233 234# Where is the ICONV library? This will be empty if in libc or not available. 235LIBICONV = @LIBICONV@ 236 237# Did the user give us a --with-gdb-datadir option? 238GDB_DATADIR = @GDB_DATADIR@ 239 240# Code signing. 241CODESIGN = codesign 242CODESIGN_CERT = @CODESIGN_CERT@ 243 244# Flags to pass to gdb when invoked with "make run". 245GDBFLAGS = 246 247# Helper code from gnulib. 248GNULIB_PARENT_DIR = .. 249include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc 250 251SUPPORT = ../gdbsupport 252LIBSUPPORT = $(SUPPORT)/libgdbsupport.a 253INCSUPPORT = -I$(srcdir)/.. -I.. 254 255# 256# CLI sub directory definitons 257# 258SUBDIR_CLI_SRCS = \ 259 cli/cli-cmds.c \ 260 cli/cli-decode.c \ 261 cli/cli-dump.c \ 262 cli/cli-interp.c \ 263 cli/cli-logging.c \ 264 cli/cli-option.c \ 265 cli/cli-script.c \ 266 cli/cli-setshow.c \ 267 cli/cli-style.c \ 268 cli/cli-utils.c 269 270SUBDIR_CLI_OBS = $(patsubst %.c,%.o,$(SUBDIR_CLI_SRCS)) 271 272# 273# MI sub directory definitons 274# 275SUBDIR_MI_SRCS = \ 276 mi/mi-cmd-break.c \ 277 mi/mi-cmd-catch.c \ 278 mi/mi-cmd-disas.c \ 279 mi/mi-cmd-env.c \ 280 mi/mi-cmd-file.c \ 281 mi/mi-cmd-info.c \ 282 mi/mi-cmd-stack.c \ 283 mi/mi-cmd-target.c \ 284 mi/mi-cmd-var.c \ 285 mi/mi-cmds.c \ 286 mi/mi-console.c \ 287 mi/mi-getopt.c \ 288 mi/mi-interp.c \ 289 mi/mi-main.c \ 290 mi/mi-out.c \ 291 mi/mi-parse.c \ 292 mi/mi-symbol-cmds.c 293 294SUBDIR_MI_OBS = $(patsubst %.c,%.o,$(SUBDIR_MI_SRCS)) 295 296SUBDIR_MI_DEPS = 297SUBDIR_MI_LDFLAGS = 298SUBDIR_MI_CFLAGS = 299 300# 301# TUI sub directory definitions 302# 303SUBDIR_TUI_SRCS = \ 304 tui/tui.c \ 305 tui/tui-command.c \ 306 tui/tui-data.c \ 307 tui/tui-disasm.c \ 308 tui/tui-file.c \ 309 tui/tui-hooks.c \ 310 tui/tui-interp.c \ 311 tui/tui-io.c \ 312 tui/tui-layout.c \ 313 tui/tui-location.c \ 314 tui/tui-out.c \ 315 tui/tui-regs.c \ 316 tui/tui-source.c \ 317 tui/tui-stack.c \ 318 tui/tui-win.c \ 319 tui/tui-wingeneral.c \ 320 tui/tui-winsource.c 321 322SUBDIR_TUI_OBS = $(patsubst %.c,%.o,$(SUBDIR_TUI_SRCS)) 323 324SUBDIR_TUI_DEPS = 325SUBDIR_TUI_LDFLAGS = 326SUBDIR_TUI_CFLAGS = -DTUI=1 327 328# 329# GCC Compile support sub-directory definitions 330# 331SUBDIR_GCC_COMPILE_SRCS = \ 332 compile/compile.c \ 333 compile/compile-c-support.c \ 334 compile/compile-c-symbols.c \ 335 compile/compile-c-types.c \ 336 compile/compile-cplus-symbols.c \ 337 compile/compile-cplus-types.c \ 338 compile/compile-loc2c.c \ 339 compile/compile-object-load.c \ 340 compile/compile-object-run.c 341 342SUBDIR_GCC_COMPILE_OBS = $(patsubst %.c,%.o,$(filter %.c,$(SUBDIR_GCC_COMPILE_SRCS))) 343 344# 345# Guile sub directory definitons for guile support. 346# 347SUBDIR_GUILE_SRCS = \ 348 guile/guile.c \ 349 guile/scm-arch.c \ 350 guile/scm-auto-load.c \ 351 guile/scm-block.c \ 352 guile/scm-breakpoint.c \ 353 guile/scm-cmd.c \ 354 guile/scm-disasm.c \ 355 guile/scm-exception.c \ 356 guile/scm-frame.c \ 357 guile/scm-gsmob.c \ 358 guile/scm-iterator.c \ 359 guile/scm-lazy-string.c \ 360 guile/scm-math.c \ 361 guile/scm-objfile.c \ 362 guile/scm-param.c \ 363 guile/scm-ports.c \ 364 guile/scm-pretty-print.c \ 365 guile/scm-progspace.c \ 366 guile/scm-safe-call.c \ 367 guile/scm-string.c \ 368 guile/scm-symbol.c \ 369 guile/scm-symtab.c \ 370 guile/scm-type.c \ 371 guile/scm-utils.c \ 372 guile/scm-value.c 373 374SUBDIR_GUILE_OBS = $(patsubst %.c,%.o,$(SUBDIR_GUILE_SRCS)) 375 376SUBDIR_GUILE_DEPS = 377SUBDIR_GUILE_LDFLAGS = 378SUBDIR_GUILE_CFLAGS = 379 380# 381# python sub directory definitons 382# 383SUBDIR_PYTHON_SRCS = \ 384 python/py-arch.c \ 385 python/py-auto-load.c \ 386 python/py-block.c \ 387 python/py-bpevent.c \ 388 python/py-breakpoint.c \ 389 python/py-cmd.c \ 390 python/py-continueevent.c \ 391 python/py-event.c \ 392 python/py-evtregistry.c \ 393 python/py-evts.c \ 394 python/py-exitedevent.c \ 395 python/py-finishbreakpoint.c \ 396 python/py-frame.c \ 397 python/py-framefilter.c \ 398 python/py-function.c \ 399 python/py-gdb-readline.c \ 400 python/py-inferior.c \ 401 python/py-infevents.c \ 402 python/py-infthread.c \ 403 python/py-instruction.c \ 404 python/py-lazy-string.c \ 405 python/py-linetable.c \ 406 python/py-newobjfileevent.c \ 407 python/py-objfile.c \ 408 python/py-param.c \ 409 python/py-prettyprint.c \ 410 python/py-progspace.c \ 411 python/py-record.c \ 412 python/py-record-btrace.c \ 413 python/py-record-full.c \ 414 python/py-registers.c \ 415 python/py-signalevent.c \ 416 python/py-stopevent.c \ 417 python/py-symbol.c \ 418 python/py-symtab.c \ 419 python/py-threadevent.c \ 420 python/py-tui.c \ 421 python/py-type.c \ 422 python/py-unwind.c \ 423 python/py-utils.c \ 424 python/py-value.c \ 425 python/py-varobj.c \ 426 python/py-xmethods.c \ 427 python/python.c 428 429SUBDIR_PYTHON_OBS = $(patsubst %.c,%.o,$(SUBDIR_PYTHON_SRCS)) 430 431SUBDIR_PYTHON_DEPS = 432SUBDIR_PYTHON_LDFLAGS = 433SUBDIR_PYTHON_CFLAGS = 434 435SELFTESTS_SRCS = \ 436 disasm-selftests.c \ 437 gdbarch-selftests.c \ 438 selftest-arch.c \ 439 unittests/array-view-selftests.c \ 440 unittests/child-path-selftests.c \ 441 unittests/cli-utils-selftests.c \ 442 unittests/command-def-selftests.c \ 443 unittests/common-utils-selftests.c \ 444 unittests/copy_bitwise-selftests.c \ 445 unittests/enum-flags-selftests.c \ 446 unittests/environ-selftests.c \ 447 unittests/filtered_iterator-selftests.c \ 448 unittests/format_pieces-selftests.c \ 449 unittests/function-view-selftests.c \ 450 unittests/gdb_tilde_expand-selftests.c \ 451 unittests/gmp-utils-selftests.c \ 452 unittests/lookup_name_info-selftests.c \ 453 unittests/memory-map-selftests.c \ 454 unittests/memrange-selftests.c \ 455 unittests/offset-type-selftests.c \ 456 unittests/observable-selftests.c \ 457 unittests/optional-selftests.c \ 458 unittests/parse-connection-spec-selftests.c \ 459 unittests/ptid-selftests.c \ 460 unittests/main-thread-selftests.c \ 461 unittests/mkdir-recursive-selftests.c \ 462 unittests/rsp-low-selftests.c \ 463 unittests/scoped_fd-selftests.c \ 464 unittests/scoped_ignore_signal-selftests.c \ 465 unittests/scoped_mmap-selftests.c \ 466 unittests/scoped_restore-selftests.c \ 467 unittests/search-memory-selftests.c \ 468 unittests/string_view-selftests.c \ 469 unittests/style-selftests.c \ 470 unittests/tracepoint-selftests.c \ 471 unittests/tui-selftests.c \ 472 unittests/unpack-selftests.c \ 473 unittests/utils-selftests.c \ 474 unittests/vec-utils-selftests.c \ 475 unittests/xml-utils-selftests.c 476 477SELFTESTS_OBS = $(patsubst %.c,%.o,$(SELFTESTS_SRCS)) 478 479SUBDIR_TARGET_SRCS = target/waitstatus.c 480SUBDIR_TARGET_OBS = $(patsubst %.c,%.o,$(SUBDIR_TARGET_SRCS)) 481 482 483# Opcodes currently live in one of two places. Either they are in the 484# opcode library, typically ../opcodes, or they are in a header file 485# in INCLUDE_DIR. 486# Where is the "-lopcodes" library, with (some of) the opcode tables and 487# disassemblers? 488OPCODES_DIR = ../opcodes 489OPCODES_SRC = $(srcdir)/$(OPCODES_DIR) 490OPCODES = $(OPCODES_DIR)/libopcodes.a 491# Where are the other opcode tables which only have header file 492# versions? 493OP_INCLUDE = $(INCLUDE_DIR)/opcode 494# See TOP_CFLAGS as well. 495OPCODES_CFLAGS = -I$(OP_INCLUDE) 496 497# Allow includes like "opcodes/mumble.h". 498TOP_CFLAGS = -I$(top_srcdir)/.. 499 500# The simulator is usually nonexistent; targets that include one 501# should set this to list all the .o or .a files to be linked in. 502SIM = @SIM@ 503 504WIN32LIBS = @WIN32LIBS@ 505 506# Tcl et al cflags and libraries 507TCL = @TCL_LIBRARY@ 508TCL_CFLAGS = @TCL_INCLUDE@ 509GDBTKLIBS = @GDBTKLIBS@ 510# Extra flags that the GDBTK files need: 511GDBTK_CFLAGS = @GDBTK_CFLAGS@ 512 513TK = @TK_LIBRARY@ 514TK_CFLAGS = @TK_INCLUDE@ 515 516X11_CFLAGS = @TK_XINCLUDES@ 517X11_LDFLAGS = 518X11_LIBS = 519 520WIN32LDAPP = @WIN32LDAPP@ 521 522LIBGUI = @LIBGUI@ 523GUI_CFLAGS_X = @GUI_CFLAGS_X@ 524IDE_CFLAGS = $(GUI_CFLAGS_X) $(IDE_CFLAGS_X) 525 526ALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS) 527 528# The version of gdbtk we're building. This should be kept 529# in sync with GDBTK_VERSION and friends in gdbtk.h. 530GDBTK_VERSION = 1.0 531GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) 532 533# Gdbtk requires an absolute path to the source directory or 534# the testsuite won't run properly. 535GDBTK_SRC_DIR = @GDBTK_SRC_DIR@ 536 537SUBDIR_GDBTK_OBS = \ 538 gdbtk.o \ 539 gdbtk-bp.o \ 540 gdbtk-cmds.o \ 541 gdbtk-hooks.o \ 542 gdbtk-interp.o \ 543 gdbtk-register.o \ 544 gdbtk-stack.o \ 545 gdbtk-varobj.o \ 546 gdbtk-wrapper.o 547 548SUBDIR_GDBTK_SRCS = \ 549 gdbtk/generic/gdbtk.c \ 550 gdbtk/generic/gdbtk-bp.c \ 551 gdbtk/generic/gdbtk-cmds.c \ 552 gdbtk/generic/gdbtk-hooks.c \ 553 gdbtk/generic/gdbtk-interp.c \ 554 gdbtk/generic/gdbtk-main.c \ 555 gdbtk/generic/gdbtk-register.c \ 556 gdbtk/generic/gdbtk-stack.c \ 557 gdbtk/generic/gdbtk-varobj.c \ 558 gdbtk/generic/gdbtk-wrapper.c 559 560SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS) 561SUBDIR_GDBTK_LDFLAGS = 562SUBDIR_GDBTK_CFLAGS = -DGDBTK 563 564CONFIG_OBS = @CONFIG_OBS@ 565CONFIG_SRCS = @CONFIG_SRCS@ 566CONFIG_DEPS = @CONFIG_DEPS@ 567CONFIG_LDFLAGS = @CONFIG_LDFLAGS@ 568ENABLE_CFLAGS = @ENABLE_CFLAGS@ 569CONFIG_ALL = @CONFIG_ALL@ 570CONFIG_CLEAN = @CONFIG_CLEAN@ 571CONFIG_INSTALL = @CONFIG_INSTALL@ 572CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ 573HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@ 574 575CONFIG_SRC_SUBDIR = arch cli dwarf2 mi compile tui unittests guile python \ 576 target nat 577CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR)) 578 579# -I. for config files. 580# -I$(srcdir) for gdb internal headers. 581# -I$(srcdir)/config for more generic config files. 582 583# It is also possible that you will need to add -I/usr/include/sys if 584# your system doesn't have fcntl.h in /usr/include (which is where it 585# should be according to Posix). 586DEFS = @DEFS@ 587GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \ 588 -DLOCALEDIR="\"$(localedir)\"" $(DEFS) 589 590# MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory. 591GLOBAL_CFLAGS = $(MH_CFLAGS) 592 593PROFILE_CFLAGS = @PROFILE_CFLAGS@ 594 595# These are specifically reserved for setting from the command line 596# when running make. I.E.: "make CFLAGS=-Wmissing-prototypes". 597CFLAGS = @CFLAGS@ 598CXXFLAGS = @CXXFLAGS@ 599CPPFLAGS = @CPPFLAGS@ 600 601# Set by configure, for e.g. expat. Python installations are such that 602# C headers are included using their basename (for example, we #include 603# <Python.h> rather than, say, <python/Python.h>). Since the file names 604# are sometimes a little generic, we think that the risk of collision 605# with other header files is high. If that happens, we try to mitigate 606# a bit the consequences by putting the Python includes last in the list. 607INTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ \ 608 @LARGEFILE_CPPFLAGS@ 609 610# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. 611INTERNAL_CFLAGS_BASE = \ 612 $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ 613 $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \ 614 $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \ 615 $(INTL_CFLAGS) $(INCGNU) $(INCSUPPORT) $(ENABLE_CFLAGS) \ 616 $(INTERNAL_CPPFLAGS) $(SRCHIGH_CFLAGS) $(TOP_CFLAGS) $(PTHREAD_CFLAGS) \ 617 $(DEBUGINFOD_CFLAGS) 618INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS) 619INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) 620 621# LDFLAGS is specifically reserved for setting from the command line 622# when running make. 623LDFLAGS = @LDFLAGS@ 624 625# Profiling options need to go here to work. 626# I think it's perfectly reasonable for a user to set -pg in CFLAGS 627# and have it work; that's why CFLAGS is here. 628# PROFILE_CFLAGS is _not_ included, however, because we use monstartup. 629INTERNAL_LDFLAGS = \ 630 $(CXXFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \ 631 $(LDFLAGS) $(CONFIG_LDFLAGS) $(PTHREAD_CFLAGS) 632 633# Libraries and corresponding dependencies for compiling gdb. 634# XM_CLIBS, defined in *config files, have host-dependent libs. 635# LIBIBERTY appears twice on purpose. 636CLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD) $(ZLIB) \ 637 $(LIBSUPPORT) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \ 638 $(XM_CLIBS) $(GDBTKLIBS) \ 639 @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \ 640 $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \ 641 $(WIN32LIBS) $(LIBGNU) $(LIBGNU_EXTRA_LIBS) $(LIBICONV) \ 642 $(LIBMPFR) $(LIBGMP) $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) \ 643 $(DEBUGINFOD_LIBS) 644CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) $(CTF_DEPS) \ 645 $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \ 646 $(LIBSUPPORT) 647 648DIST = gdb 649 650RUNTEST = runtest 651RUNTESTFLAGS = 652 653# XML files to build in to GDB. 654XMLFILES = \ 655 $(srcdir)/features/btrace.dtd \ 656 $(srcdir)/features/btrace-conf.dtd \ 657 $(srcdir)/features/gdb-target.dtd \ 658 $(srcdir)/features/library-list.dtd \ 659 $(srcdir)/features/library-list-aix.dtd \ 660 $(srcdir)/features/library-list-svr4.dtd \ 661 $(srcdir)/features/osdata.dtd \ 662 $(srcdir)/features/threads.dtd \ 663 $(srcdir)/features/traceframe-info.dtd \ 664 $(srcdir)/features/xinclude.dtd 665 666# Build the ser-*.o files the host supports. This includes ser-unix.o 667# for any system that supports a POSIX interface to the serial port. 668# See configure.ac. 669SER_HARDWIRE = @SER_HARDWIRE@ 670 671# This is remote-sim.o if a simulator is to be linked in. 672SIM_OBS = @SIM_OBS@ 673 674# Target-dependent object files. 675TARGET_OBS = @TARGET_OBS@ 676 677# All target-dependent objects files that require 64-bit CORE_ADDR 678# (used with --enable-targets=all --enable-64-bit-bfd). 679ALL_64_TARGET_OBS = \ 680 aarch64-fbsd-tdep.o \ 681 aarch64-linux-tdep.o \ 682 aarch64-newlib-tdep.o \ 683 aarch64-ravenscar-thread.o \ 684 aarch64-tdep.o \ 685 alpha-bsd-tdep.o \ 686 alpha-linux-tdep.o \ 687 alpha-mdebug-tdep.o \ 688 alpha-netbsd-tdep.o \ 689 alpha-obsd-tdep.o \ 690 alpha-tdep.o \ 691 amd64-darwin-tdep.o \ 692 amd64-dicos-tdep.o \ 693 amd64-dfly-tdep.o \ 694 amd64-fbsd-tdep.o \ 695 amd64-linux-tdep.o \ 696 amd64-netbsd-tdep.o \ 697 amd64-obsd-tdep.o \ 698 amd64-ravenscar-thread.o \ 699 amd64-sol2-tdep.o \ 700 amd64-tdep.o \ 701 amd64-windows-tdep.o \ 702 arch/aarch64.o \ 703 arch/aarch64-insn.o \ 704 arch/aarch64-mte-linux.o \ 705 arch/amd64.o \ 706 ia64-linux-tdep.o \ 707 ia64-tdep.o \ 708 ia64-vms-tdep.o \ 709 mips64-obsd-tdep.o \ 710 sparc64-fbsd-tdep.o \ 711 sparc64-linux-tdep.o \ 712 sparc64-netbsd-tdep.o \ 713 sparc64-obsd-tdep.o \ 714 sparc64-sol2-tdep.o \ 715 sparc64-tdep.o 716 717# All other target-dependent objects files (used with --enable-targets=all). 718ALL_TARGET_OBS = \ 719 aarch32-tdep.o \ 720 arc-linux-tdep.o \ 721 arc-tdep.o \ 722 arch/aarch32.o \ 723 arch/arc.o \ 724 arch/arm.o \ 725 arch/arm-get-next-pcs.o \ 726 arch/arm-linux.o \ 727 arch/i386.o \ 728 arch/ppc-linux-common.o \ 729 arch/riscv.o \ 730 arm-bsd-tdep.o \ 731 arm-fbsd-tdep.o \ 732 arm-linux-tdep.o \ 733 arm-netbsd-tdep.o \ 734 arm-none-tdep.o \ 735 arm-obsd-tdep.o \ 736 arm-pikeos-tdep.o \ 737 arm-tdep.o \ 738 arm-wince-tdep.o \ 739 avr-tdep.o \ 740 bfin-linux-tdep.o \ 741 bfin-tdep.o \ 742 bpf-tdep.o \ 743 bsd-uthread.o \ 744 cris-linux-tdep.o \ 745 cris-tdep.o \ 746 csky-linux-tdep.o \ 747 csky-tdep.o \ 748 dicos-tdep.o \ 749 dfly-tdep.o \ 750 fbsd-tdep.o \ 751 frv-linux-tdep.o \ 752 frv-tdep.o \ 753 ft32-tdep.o \ 754 glibc-tdep.o \ 755 h8300-tdep.o \ 756 hppa-bsd-tdep.o \ 757 hppa-linux-tdep.o \ 758 hppa-netbsd-tdep.o \ 759 hppa-obsd-tdep.o \ 760 hppa-tdep.o \ 761 i386-bsd-tdep.o \ 762 i386-darwin-tdep.o \ 763 i386-dicos-tdep.o \ 764 i386-dfly-tdep.o \ 765 i386-fbsd-tdep.o \ 766 i386-gnu-tdep.o \ 767 i386-go32-tdep.o \ 768 i386-linux-tdep.o \ 769 i386-netbsd-tdep.o \ 770 i386-nto-tdep.o \ 771 i386-obsd-tdep.o \ 772 i386-sol2-tdep.o \ 773 i386-tdep.o \ 774 i386-windows-tdep.o \ 775 i387-tdep.o \ 776 iq2000-tdep.o \ 777 linux-record.o \ 778 linux-tdep.o \ 779 lm32-tdep.o \ 780 m32c-tdep.o \ 781 m32r-linux-tdep.o \ 782 m32r-tdep.o \ 783 m68hc11-tdep.o \ 784 m68k-bsd-tdep.o \ 785 m68k-linux-tdep.o \ 786 m68k-tdep.o \ 787 mep-tdep.o \ 788 microblaze-linux-tdep.o \ 789 microblaze-tdep.o \ 790 mips-fbsd-tdep.o \ 791 mips-linux-tdep.o \ 792 mips-netbsd-tdep.o \ 793 mips-sde-tdep.o \ 794 mips-tdep.o \ 795 mn10300-linux-tdep.o \ 796 mn10300-tdep.o \ 797 moxie-tdep.o \ 798 msp430-tdep.o \ 799 netbsd-tdep.o \ 800 nds32-tdep.o \ 801 nios2-linux-tdep.o \ 802 nios2-tdep.o \ 803 nto-tdep.o \ 804 obsd-tdep.o \ 805 or1k-linux-tdep.o \ 806 or1k-tdep.o \ 807 ppc-fbsd-tdep.o \ 808 ppc-linux-tdep.o \ 809 ppc-netbsd-tdep.o \ 810 ppc-obsd-tdep.o \ 811 ppc-ravenscar-thread.o \ 812 ppc-sysv-tdep.o \ 813 ppc64-tdep.o \ 814 ravenscar-thread.o \ 815 riscv-fbsd-tdep.o \ 816 riscv-linux-tdep.o \ 817 riscv-none-tdep.o \ 818 riscv-ravenscar-thread.o \ 819 riscv-tdep.o \ 820 rl78-tdep.o \ 821 rs6000-aix-tdep.o \ 822 rs6000-lynx178-tdep.o \ 823 rs6000-tdep.o \ 824 rx-tdep.o \ 825 s12z-tdep.o \ 826 s390-linux-tdep.o \ 827 s390-tdep.o \ 828 score-tdep.o \ 829 sh-linux-tdep.o \ 830 sh-netbsd-tdep.o \ 831 sh-tdep.o \ 832 sol2-tdep.o \ 833 solib-aix.o \ 834 solib-darwin.o \ 835 solib-dsbt.o \ 836 solib-frv.o \ 837 solib-svr4.o \ 838 sparc-linux-tdep.o \ 839 sparc-netbsd-tdep.o \ 840 sparc-obsd-tdep.o \ 841 sparc-ravenscar-thread.o \ 842 sparc-sol2-tdep.o \ 843 sparc-tdep.o \ 844 symfile-mem.o \ 845 tic6x-linux-tdep.o \ 846 tic6x-tdep.o \ 847 tilegx-linux-tdep.o \ 848 tilegx-tdep.o \ 849 v850-tdep.o \ 850 vax-netbsd-tdep.o \ 851 vax-tdep.o \ 852 windows-tdep.o \ 853 x86-tdep.o \ 854 xcoffread.o \ 855 xstormy16-tdep.o \ 856 xtensa-config.o \ 857 xtensa-linux-tdep.o \ 858 xtensa-tdep.o \ 859 z80-tdep.o 860 861# The following native-target dependent variables are defined on 862# configure.nat. 863NAT_FILE = @NAT_FILE@ 864NATDEPFILES = @NATDEPFILES@ 865NAT_CDEPS = @NAT_CDEPS@ 866LOADLIBES = @LOADLIBES@ 867MH_CFLAGS = @MH_CFLAGS@ 868XM_CLIBS = @XM_CLIBS@ 869NAT_GENERATED_FILES = @NAT_GENERATED_FILES@ 870NM_H = @NM_H@ 871HAVE_NATIVE_GCORE_HOST = @HAVE_NATIVE_GCORE_HOST@ 872 873# Native-target dependent makefile fragment comes in here. 874@nat_makefile_frag@ 875 876# End of native-target dependent variables. 877 878FLAGS_TO_PASS = \ 879 "prefix=$(prefix)" \ 880 "exec_prefix=$(exec_prefix)" \ 881 "infodir=$(infodir)" \ 882 "datarootdir=$(datarootdir)" \ 883 "docdir=$(docdir)" \ 884 "htmldir=$(htmldir)" \ 885 "pdfdir=$(pdfdir)" \ 886 "libdir=$(libdir)" \ 887 "mandir=$(mandir)" \ 888 "datadir=$(datadir)" \ 889 "includedir=$(includedir)" \ 890 "against=$(against)" \ 891 "DESTDIR=$(DESTDIR)" \ 892 "AR=$(AR)" \ 893 "AR_FLAGS=$(AR_FLAGS)" \ 894 "CC=$(CC)" \ 895 "CFLAGS=$(CFLAGS)" \ 896 "CXX=$(CXX)" \ 897 "CXX_DIALECT=$(CXX_DIALECT)" \ 898 "CXXFLAGS=$(CXXFLAGS)" \ 899 "DLLTOOL=$(DLLTOOL)" \ 900 "LDFLAGS=$(LDFLAGS)" \ 901 "RANLIB=$(RANLIB)" \ 902 "MAKEINFO=$(MAKEINFO)" \ 903 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ 904 "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \ 905 "MAKEHTML=$(MAKEHTML)" \ 906 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ 907 "INSTALL=$(INSTALL)" \ 908 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ 909 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ 910 "INSTALL_DATA=$(INSTALL_DATA)" \ 911 "RUNTEST=$(RUNTEST)" \ 912 "RUNTESTFLAGS=$(RUNTESTFLAGS)" 913 914# Flags that we pass when building the testsuite. 915 916# empty for native, $(target_alias)/ for cross 917target_subdir = @target_subdir@ 918 919CC_FOR_TARGET = ` \ 920 if [ -f $${rootme}/../gcc/xgcc ] ; then \ 921 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ 922 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/; \ 923 else \ 924 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ 925 fi; \ 926 else \ 927 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 928 echo $(CC); \ 929 else \ 930 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ 931 fi; \ 932 fi` 933 934CXX_FOR_TARGET = ` \ 935 if [ -f $${rootme}/../gcc/xg++ ] ; then \ 936 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ 937 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/; \ 938 else \ 939 echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \ 940 fi; \ 941 else \ 942 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 943 echo $(CXX); \ 944 else \ 945 t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \ 946 fi; \ 947 fi` 948 949# The use of $$(x_FOR_TARGET) reduces the command line length by not 950# duplicating the lengthy definition. 951TARGET_FLAGS_TO_PASS = \ 952 "prefix=$(prefix)" \ 953 "exec_prefix=$(exec_prefix)" \ 954 "against=$(against)" \ 955 'CC=$$(CC_FOR_TARGET)' \ 956 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ 957 "CFLAGS=$(CFLAGS)" \ 958 'CXX=$$(CXX_FOR_TARGET)' \ 959 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ 960 "CXXFLAGS=$(CXXFLAGS)" \ 961 "INSTALL=$(INSTALL)" \ 962 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ 963 "INSTALL_DATA=$(INSTALL_DATA)" \ 964 "MAKEINFO=$(MAKEINFO)" \ 965 "MAKEHTML=$(MAKEHTML)" \ 966 "RUNTEST=$(RUNTEST)" \ 967 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ 968 "FORCE_PARALLEL=$(FORCE_PARALLEL)" \ 969 "TESTS=$(TESTS)" 970 971# All source files that go into linking GDB. 972 973# Files that should wind up in SFILES and whose corresponding .o 974# should be in COMMON_OBS. 975COMMON_SFILES = \ 976 ada-lang.c \ 977 ada-tasks.c \ 978 ada-typeprint.c \ 979 ada-valprint.c \ 980 ada-varobj.c \ 981 addrmap.c \ 982 agent.c \ 983 alloc.c \ 984 annotate.c \ 985 arch-utils.c \ 986 async-event.c \ 987 auto-load.c \ 988 auxv.c \ 989 ax-gdb.c \ 990 ax-general.c \ 991 bcache.c \ 992 bfd-target.c \ 993 block.c \ 994 blockframe.c \ 995 break-catch-sig.c \ 996 break-catch-syscall.c \ 997 break-catch-throw.c \ 998 breakpoint.c \ 999 btrace.c \ 1000 build-id.c \ 1001 buildsym-legacy.c \ 1002 buildsym.c \ 1003 c-lang.c \ 1004 c-typeprint.c \ 1005 c-valprint.c \ 1006 c-varobj.c \ 1007 charset.c \ 1008 cli-out.c \ 1009 coff-pe-read.c \ 1010 coffread.c \ 1011 complaints.c \ 1012 completer.c \ 1013 copying.c \ 1014 corefile.c \ 1015 corelow.c \ 1016 cp-abi.c \ 1017 cp-namespace.c \ 1018 cp-support.c \ 1019 cp-valprint.c \ 1020 ctfread.c \ 1021 d-lang.c \ 1022 d-namespace.c \ 1023 d-valprint.c \ 1024 dbxread.c \ 1025 dcache.c \ 1026 debug.c \ 1027 debuginfod-support.c \ 1028 dictionary.c \ 1029 disasm.c \ 1030 displaced-stepping.c \ 1031 dummy-frame.c \ 1032 dwarf2/abbrev.c \ 1033 dwarf2/attribute.c \ 1034 dwarf2/comp-unit-head.c \ 1035 dwarf2/cu.c \ 1036 dwarf2/dwz.c \ 1037 dwarf2/expr.c \ 1038 dwarf2/frame-tailcall.c \ 1039 dwarf2/frame.c \ 1040 dwarf2/index-cache.c \ 1041 dwarf2/index-common.c \ 1042 dwarf2/index-write.c \ 1043 dwarf2/leb.c \ 1044 dwarf2/line-header.c \ 1045 dwarf2/loc.c \ 1046 dwarf2/macro.c \ 1047 dwarf2/read.c \ 1048 dwarf2/section.c \ 1049 dwarf2/stringify.c \ 1050 eval.c \ 1051 event-top.c \ 1052 exceptions.c \ 1053 exec.c \ 1054 expprint.c \ 1055 extension.c \ 1056 f-lang.c \ 1057 f-typeprint.c \ 1058 f-valprint.c \ 1059 filename-seen-cache.c \ 1060 filesystem.c \ 1061 findcmd.c \ 1062 findvar.c \ 1063 frame.c \ 1064 frame-base.c \ 1065 frame-unwind.c \ 1066 gcore.c \ 1067 gdb-demangle.c \ 1068 gdb_bfd.c \ 1069 gdb_obstack.c \ 1070 gdb_regex.c \ 1071 gdbarch.c \ 1072 gdbtypes.c \ 1073 gmp-utils.c \ 1074 gnu-v2-abi.c \ 1075 gnu-v3-abi.c \ 1076 go-lang.c \ 1077 go-typeprint.c \ 1078 go-valprint.c \ 1079 inf-child.c \ 1080 inf-loop.c \ 1081 infcall.c \ 1082 infcmd.c \ 1083 inferior.c \ 1084 inflow.c \ 1085 infrun.c \ 1086 inline-frame.c \ 1087 interps.c \ 1088 jit.c \ 1089 language.c \ 1090 linespec.c \ 1091 location.c \ 1092 m2-lang.c \ 1093 m2-typeprint.c \ 1094 m2-valprint.c \ 1095 macrocmd.c \ 1096 macroexp.c \ 1097 macroscope.c \ 1098 macrotab.c \ 1099 main.c \ 1100 maint.c \ 1101 maint-test-options.c \ 1102 maint-test-settings.c \ 1103 mdebugread.c \ 1104 mem-break.c \ 1105 memattr.c \ 1106 memory-map.c \ 1107 memrange.c \ 1108 minidebug.c \ 1109 minsyms.c \ 1110 mipsread.c \ 1111 namespace.c \ 1112 objc-lang.c \ 1113 objfiles.c \ 1114 observable.c \ 1115 opencl-lang.c \ 1116 osabi.c \ 1117 osdata.c \ 1118 p-lang.c \ 1119 p-typeprint.c \ 1120 p-valprint.c \ 1121 parse.c \ 1122 printcmd.c \ 1123 probe.c \ 1124 process-stratum-target.c \ 1125 producer.c \ 1126 progspace.c \ 1127 progspace-and-thread.c \ 1128 prologue-value.c \ 1129 psymtab.c \ 1130 record.c \ 1131 record-btrace.c \ 1132 record-full.c \ 1133 regcache.c \ 1134 regcache-dump.c \ 1135 reggroups.c \ 1136 registry.c \ 1137 remote.c \ 1138 remote-fileio.c \ 1139 remote-notif.c \ 1140 reverse.c \ 1141 run-on-main-thread.c \ 1142 rust-lang.c \ 1143 rust-parse.c \ 1144 sentinel-frame.c \ 1145 ser-event.c \ 1146 serial.c \ 1147 skip.c \ 1148 solib.c \ 1149 solib-target.c \ 1150 source.c \ 1151 source-cache.c \ 1152 stabsread.c \ 1153 stack.c \ 1154 std-regs.c \ 1155 symfile.c \ 1156 symfile-debug.c \ 1157 symmisc.c \ 1158 symtab.c \ 1159 target.c \ 1160 target-connection.c \ 1161 target-dcache.c \ 1162 target-descriptions.c \ 1163 target-memory.c \ 1164 test-target.c \ 1165 thread.c \ 1166 thread-iter.c \ 1167 tid-parse.c \ 1168 top.c \ 1169 tracectf.c \ 1170 tracefile.c \ 1171 tracefile-tfile.c \ 1172 tracepoint.c \ 1173 trad-frame.c \ 1174 tramp-frame.c \ 1175 target-float.c \ 1176 type-stack.c \ 1177 typeprint.c \ 1178 ui-file.c \ 1179 ui-out.c \ 1180 ui-style.c \ 1181 user-regs.c \ 1182 utils.c \ 1183 valarith.c \ 1184 valops.c \ 1185 valprint.c \ 1186 value.c \ 1187 varobj.c \ 1188 xml-support.c \ 1189 xml-syscall.c \ 1190 xml-tdesc.c 1191 1192# Links made at configuration time should not be specified here, since 1193# SFILES is used in building the distribution archive. 1194SFILES = \ 1195 ada-exp.y \ 1196 arch/i386.c \ 1197 c-exp.y \ 1198 cp-name-parser.y \ 1199 d-exp.y \ 1200 dtrace-probe.c \ 1201 elf-none-tdep.c \ 1202 elfread.c \ 1203 f-exp.y \ 1204 gcore-elf.c \ 1205 gdb.c \ 1206 go-exp.y \ 1207 m2-exp.y \ 1208 p-exp.y \ 1209 proc-service.list \ 1210 ser-base.c \ 1211 ser-unix.c \ 1212 sol-thread.c \ 1213 stap-probe.c \ 1214 stub-termcap.c \ 1215 symfile-mem.c \ 1216 ui-file.h \ 1217 mi/mi-common.c \ 1218 $(SUBDIR_CLI_SRCS) \ 1219 $(SUBDIR_TARGET_SRCS) \ 1220 $(COMMON_SFILES) \ 1221 $(SUBDIR_GCC_COMPILE_SRCS) 1222 1223# Header files that need to have srcdir added. Note that in the cases 1224# where we use a macro like $(gdbcmd_h), things are carefully arranged 1225# so that each .h file is listed exactly once (M-x tags-search works 1226# wrong if TAGS has files twice). Because this is tricky to get 1227# right, it is probably easiest just to list .h files here directly. 1228 1229HFILES_NO_SRCDIR = \ 1230 aarch32-tdep.h \ 1231 aarch64-ravenscar-thread.h \ 1232 aarch64-tdep.h \ 1233 ada-lang.h \ 1234 addrmap.h \ 1235 alpha-bsd-tdep.h \ 1236 alpha-tdep.h \ 1237 amd64-darwin-tdep.h \ 1238 amd64-linux-tdep.h \ 1239 amd64-nat.h \ 1240 amd64-ravenscar-thread.h \ 1241 amd64-tdep.h \ 1242 annotate.h \ 1243 arc-tdep.h \ 1244 arch-utils.h \ 1245 arm-linux-tdep.h \ 1246 arm-netbsd-tdep.h \ 1247 arm-tdep.h \ 1248 async-event.h \ 1249 auto-load.h \ 1250 auxv.h \ 1251 ax.h \ 1252 ax-gdb.h \ 1253 bcache.h \ 1254 bfd-target.h \ 1255 bfin-tdep.h \ 1256 block.h \ 1257 breakpoint.h \ 1258 bsd-kvm.h \ 1259 bsd-uthread.h \ 1260 build-id.h \ 1261 buildsym-legacy.h \ 1262 buildsym.h \ 1263 c-lang.h \ 1264 charset.h \ 1265 charset-list.h \ 1266 cli-out.h \ 1267 coff-pe-read.h \ 1268 command.h \ 1269 complaints.h \ 1270 completer.h \ 1271 cp-abi.h \ 1272 cp-support.h \ 1273 csky-tdep.h \ 1274 d-lang.h \ 1275 darwin-nat.h \ 1276 dcache.h \ 1277 defs.h \ 1278 dicos-tdep.h \ 1279 dictionary.h \ 1280 disasm.h \ 1281 dummy-frame.h \ 1282 dwarf2/cu.h \ 1283 dwarf2/frame-tailcall.h \ 1284 dwarf2/frame.h \ 1285 dwarf2/expr.h \ 1286 dwarf2/index-cache.h \ 1287 dwarf2/index-common.h \ 1288 dwarf2/loc.h \ 1289 dwarf2/read.h \ 1290 event-top.h \ 1291 exceptions.h \ 1292 exec.h \ 1293 expression.h \ 1294 extension.h \ 1295 extension-priv.h \ 1296 f-array-walker.h \ 1297 f-lang.h \ 1298 dfly-nat.h \ 1299 dfly-tdep.h \ 1300 fbsd-nat.h \ 1301 fbsd-tdep.h \ 1302 filesystem.h \ 1303 frame.h \ 1304 frame-base.h \ 1305 frame-unwind.h \ 1306 frv-tdep.h \ 1307 ft32-tdep.h \ 1308 gcore-elf.h \ 1309 gcore.h \ 1310 gdb_bfd.h \ 1311 gdb_curses.h \ 1312 gdb_expat.h \ 1313 gdb_obstack.h \ 1314 gdb_proc_service.h \ 1315 gdb_regex.h \ 1316 gdb_select.h \ 1317 gdb-stabs.h \ 1318 gdb_vfork.h \ 1319 gdb_wchar.h \ 1320 gdbarch.h \ 1321 gdbcmd.h \ 1322 gdbcore.h \ 1323 gdbthread.h \ 1324 gdbtypes.h \ 1325 glibc-tdep.h \ 1326 gmp-utils.h \ 1327 gnu-nat.h \ 1328 go-lang.h \ 1329 gregset.h \ 1330 hppa-bsd-tdep.h \ 1331 hppa-linux-offsets.h \ 1332 hppa-tdep.h \ 1333 i386-bsd-nat.h \ 1334 i386-darwin-tdep.h \ 1335 i386-linux-nat.h \ 1336 i386-linux-tdep.h \ 1337 i386-tdep.h \ 1338 i387-tdep.h \ 1339 ia64-libunwind-tdep.h \ 1340 ia64-tdep.h \ 1341 inf-child.h \ 1342 inf-loop.h \ 1343 inf-ptrace.h \ 1344 infcall.h \ 1345 inferior.h \ 1346 inline-frame.h \ 1347 interps.h \ 1348 jit.h \ 1349 language.h \ 1350 linespec.h \ 1351 linux-fork.h \ 1352 linux-nat.h \ 1353 linux-record.h \ 1354 linux-tdep.h \ 1355 location.h \ 1356 m2-lang.h \ 1357 m32r-tdep.h \ 1358 m68k-tdep.h \ 1359 macroexp.h \ 1360 macroscope.h \ 1361 macrotab.h \ 1362 main.h \ 1363 mdebugread.h \ 1364 memattr.h \ 1365 memory-map.h \ 1366 memrange.h \ 1367 microblaze-tdep.h \ 1368 mips-linux-tdep.h \ 1369 mips-netbsd-tdep.h \ 1370 mips-tdep.h \ 1371 mn10300-tdep.h \ 1372 moxie-tdep.h \ 1373 netbsd-nat.h \ 1374 netbsd-tdep.h \ 1375 nds32-tdep.h \ 1376 nios2-tdep.h \ 1377 elf-none-tdep.h \ 1378 nto-tdep.h \ 1379 objc-lang.h \ 1380 objfiles.h \ 1381 obsd-nat.h \ 1382 obsd-tdep.h \ 1383 osabi.h \ 1384 osdata.h \ 1385 p-lang.h \ 1386 parser-defs.h \ 1387 ppc-fbsd-tdep.h \ 1388 ppc-linux-tdep.h \ 1389 ppc-netbsd-tdep.h \ 1390 ppc-obsd-tdep.h \ 1391 ppc-ravenscar-thread.h \ 1392 ppc-tdep.h \ 1393 ppc64-tdep.h \ 1394 probe.h \ 1395 proc-utils.h \ 1396 procfs.h \ 1397 progspace.h \ 1398 progspace-and-thread.h \ 1399 prologue-value.h \ 1400 psympriv.h \ 1401 psymtab.h \ 1402 ravenscar-thread.h \ 1403 record.h \ 1404 record-full.h \ 1405 regcache.h \ 1406 reggroups.h \ 1407 regset.h \ 1408 remote.h \ 1409 remote-fileio.h \ 1410 remote-notif.h \ 1411 riscv-fbsd-tdep.h \ 1412 riscv-ravenscar-thread.h \ 1413 riscv-tdep.h \ 1414 rs6000-aix-tdep.h \ 1415 rs6000-tdep.h \ 1416 run-on-main-thread.h \ 1417 s390-linux-tdep.h \ 1418 s390-tdep.h \ 1419 score-tdep.h \ 1420 selftest-arch.h \ 1421 sentinel-frame.h \ 1422 ser-base.h \ 1423 ser-event.h \ 1424 ser-tcp.h \ 1425 ser-unix.h \ 1426 serial.h \ 1427 sh-tdep.h \ 1428 sim-regno.h \ 1429 skip.h \ 1430 sol2-tdep.h \ 1431 solib.h \ 1432 solib-aix.h \ 1433 solib-darwin.h \ 1434 solib-svr4.h \ 1435 solib-target.h \ 1436 solist.h \ 1437 source.h \ 1438 source-cache.h \ 1439 sparc-nat.h \ 1440 sparc-ravenscar-thread.h \ 1441 sparc-tdep.h \ 1442 sparc64-tdep.h \ 1443 stabsread.h \ 1444 stack.h \ 1445 stap-probe.h \ 1446 symfile.h \ 1447 symtab.h \ 1448 target.h \ 1449 target-dcache.h \ 1450 target-descriptions.h \ 1451 terminal.h \ 1452 tid-parse.h \ 1453 top.h \ 1454 tracectf.h \ 1455 tracefile.h \ 1456 tracepoint.h \ 1457 trad-frame.h \ 1458 target-float.h \ 1459 tramp-frame.h \ 1460 type-stack.h \ 1461 typeprint.h \ 1462 ui-file.h \ 1463 ui-out.h \ 1464 ui-style.h \ 1465 user-regs.h \ 1466 utils.h \ 1467 valprint.h \ 1468 value.h \ 1469 varobj.h \ 1470 varobj-iter.h \ 1471 vax-tdep.h \ 1472 windows-nat.h \ 1473 windows-tdep.h \ 1474 x86-bsd-nat.h \ 1475 x86-linux-nat.h \ 1476 x86-nat.h \ 1477 xcoffread.h \ 1478 xml-builtin.h \ 1479 xml-support.h \ 1480 xml-syscall.h \ 1481 xml-tdesc.h \ 1482 xtensa-tdep.h \ 1483 arch/aarch32.h \ 1484 arch/aarch64.h \ 1485 arch/aarch64-insn.h \ 1486 arch/aarch64-mte-linux.h \ 1487 arch/arc.h \ 1488 arch/arm.h \ 1489 arch/i386.h \ 1490 arch/ppc-linux-common.h \ 1491 arch/ppc-linux-tdesc.h \ 1492 arch/riscv.h \ 1493 cli/cli-cmds.h \ 1494 cli/cli-decode.h \ 1495 cli/cli-script.h \ 1496 cli/cli-setshow.h \ 1497 cli/cli-style.h \ 1498 cli/cli-utils.h \ 1499 compile/compile.h \ 1500 compile/compile-c.h \ 1501 compile/compile-cplus.h \ 1502 compile/compile-internal.h \ 1503 compile/compile-object-load.h \ 1504 compile/compile-object-run.h \ 1505 compile/gcc-c-plugin.h \ 1506 compile/gcc-cp-plugin.h \ 1507 config/nm-linux.h \ 1508 config/nm-nto.h \ 1509 config/djgpp/langinfo.h \ 1510 config/djgpp/nl_types.h \ 1511 config/i386/nm-i386gnu.h \ 1512 config/sparc/nm-sol2.h \ 1513 mi/mi-cmds.h \ 1514 mi/mi-common.h \ 1515 mi/mi-console.h \ 1516 mi/mi-getopt.h \ 1517 mi/mi-main.h \ 1518 mi/mi-out.h \ 1519 mi/mi-parse.h \ 1520 nat/aarch64-linux.h \ 1521 nat/aarch64-linux-hw-point.h \ 1522 nat/aarch64-mte-linux-ptrace.h \ 1523 nat/aarch64-sve-linux-ptrace.h \ 1524 nat/amd64-linux-siginfo.h \ 1525 nat/gdb_ptrace.h \ 1526 nat/gdb_thread_db.h \ 1527 nat/fork-inferior.h \ 1528 nat/linux-btrace.h \ 1529 nat/linux-namespaces.h \ 1530 nat/linux-nat.h \ 1531 nat/linux-osdata.h \ 1532 nat/linux-personality.h \ 1533 nat/linux-ptrace.h \ 1534 nat/linux-waitpid.h \ 1535 nat/mips-linux-watch.h \ 1536 nat/ppc-linux.h \ 1537 nat/x86-cpuid.h \ 1538 nat/x86-dregs.h \ 1539 nat/x86-gcc-cpuid.h \ 1540 nat/x86-linux.h \ 1541 nat/x86-linux-dregs.h \ 1542 python/py-event.h \ 1543 python/py-events.h \ 1544 python/py-stopevent.h \ 1545 python/python.h \ 1546 python/python-internal.h \ 1547 regformats/regdef.h \ 1548 target/resume.h \ 1549 target/target.h \ 1550 target/wait.h \ 1551 target/waitstatus.h \ 1552 tui/tui.h \ 1553 tui/tui-command.h \ 1554 tui/tui-data.h \ 1555 tui/tui-disasm.h \ 1556 tui/tui-file.h \ 1557 tui/tui-hooks.h \ 1558 tui/tui-io.h \ 1559 tui/tui-layout.h \ 1560 tui/tui-location.h \ 1561 tui/tui-out.h \ 1562 tui/tui-regs.h \ 1563 tui/tui-source.h \ 1564 tui/tui-stack.h \ 1565 tui/tui-win.h \ 1566 tui/tui-wingeneral.h \ 1567 tui/tui-winsource.h \ 1568 x86-tdep.h 1569 1570# Header files that already have srcdir in them, or which are in objdir. 1571 1572HFILES_WITH_SRCDIR = \ 1573 ../bfd/bfd.h \ 1574 jit-reader.h 1575 1576# {X,T,NAT}DEPFILES are something of a pain in that it's hard to 1577# default their values the way we do for SER_HARDWIRE; in the future 1578# maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other 1579# variables analogous to SER_HARDWIRE which get defaulted in this 1580# Makefile.in 1581 1582DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) $(SIM_OBS) 1583 1584SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) 1585# Don't include YYFILES (*.c) because we already include *.y in SFILES, 1586# and it's more useful to see it in the .y file. 1587TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ 1588 $(CONFIG_SRCS) 1589TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) 1590 1591COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \ 1592 mi/mi-common.o \ 1593 version.o \ 1594 xml-builtin.o \ 1595 $(patsubst %.c,%.o,$(COMMON_SFILES)) \ 1596 $(SUBDIR_CLI_OBS) \ 1597 $(SUBDIR_TARGET_OBS) \ 1598 $(SUBDIR_GCC_COMPILE_OBS) 1599 1600SUBDIRS = doc @subdirs@ data-directory 1601CLEANDIRS = $(SUBDIRS) 1602 1603# List of subdirectories in the build tree that must exist. 1604# This is used to force build failures in existing trees when 1605# a new directory is added. 1606# The format here is for the `case' shell command. 1607REQUIRED_SUBDIRS = doc | testsuite | data-directory 1608 1609# Parser intermediate files. 1610YYFILES = \ 1611 ada-exp.c \ 1612 ada-lex.c \ 1613 c-exp.c \ 1614 cp-name-parser.c \ 1615 d-exp.c \ 1616 f-exp.c \ 1617 go-exp.c \ 1618 m2-exp.c \ 1619 p-exp.c 1620 1621# ada-lex.c is included by another file, so it shouldn't wind up as a 1622# .o itself. 1623YYOBJ = $(filter-out ada-lex.o,$(patsubst %.c,%.o,$(YYFILES))) 1624 1625# Things which need to be built when making a distribution. 1626 1627DISTSTUFF = $(YYFILES) 1628 1629 1630# All generated files which can be included by another file. 1631generated_files = \ 1632 ada-lex.c \ 1633 config.h \ 1634 jit-reader.h \ 1635 $(NAT_GENERATED_FILES) \ 1636 $(NM_H) 1637 1638# Flags needed to compile Python code 1639PYTHON_CFLAGS = @PYTHON_CFLAGS@ 1640 1641all: gdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb 1642 @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=$(SUBDIRS)" subdir_do 1643 1644# Rule for compiling .c files in the top-level gdb directory. 1645# The order-only dependencies ensure that we create the build subdirectories. 1646%.o: %.c | $(CONFIG_DEP_SUBDIR) 1647 $(COMPILE) $< 1648 $(POSTCOMPILE) 1649 1650$(CONFIG_DEP_SUBDIR): 1651 $(SHELL) $(srcdir)/../mkinstalldirs $@ 1652 1653# Python files need special flags. 1654python/%.o: INTERNAL_CFLAGS += $(PYTHON_CFLAGS) 1655 1656# Rules for compiling .c files in the various source subdirectories. 1657%.o: $(srcdir)/gdbtk/generic/%.c 1658 $(COMPILE) $(all_gdbtk_cflags) $< 1659 $(POSTCOMPILE) 1660 1661installcheck: 1662 1663# The check target can not use subdir_do, because subdir_do does not 1664# use TARGET_FLAGS_TO_PASS. 1665check: force 1666 @if [ -f testsuite/Makefile ]; then \ 1667 rootme=`pwd`; export rootme; \ 1668 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ 1669 cd testsuite; \ 1670 $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \ 1671 else true; fi 1672 1673check-perf: force 1674 @if [ -f testsuite/Makefile ]; then \ 1675 rootme=`pwd`; export rootme; \ 1676 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ 1677 cd testsuite; \ 1678 $(MAKE) $(TARGET_FLAGS_TO_PASS) check-perf; \ 1679 else true; fi 1680 1681check-read1: force 1682 @if [ -f testsuite/Makefile ]; then \ 1683 rootme=`pwd`; export rootme; \ 1684 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ 1685 cd testsuite; \ 1686 $(MAKE) $(TARGET_FLAGS_TO_PASS) check-read1; \ 1687 else true; fi 1688 1689check-parallel: force 1690 @if [ -f testsuite/Makefile ]; then \ 1691 rootme=`pwd`; export rootme; \ 1692 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ 1693 cd testsuite; \ 1694 $(MAKE) $(TARGET_FLAGS_TO_PASS) check-parallel; \ 1695 else true; fi 1696 1697# The idea is to parallelize testing of multilibs, for example: 1698# make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu} 1699# will run 3 concurrent sessions of check, eventually testing all 10 1700# combinations. GNU make is required for the % pattern to work, as is 1701# a shell that expands alternations within braces. If GNU make is not 1702# used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to 1703# prevent serialized checking due to the passed RUNTESTFLAGS. 1704# FIXME: use config.status --config not --version, when available. 1705check//%: force 1706 @if [ -f testsuite/config.status ]; then \ 1707 rootme=`pwd`; export rootme; \ 1708 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ 1709 target=`echo "$@" | sed 's,//.*,,'`; \ 1710 variant=`echo "$@" | sed 's,^[^/]*//,,'`; \ 1711 vardots=`echo "$$variant" | sed 's,/,.,g'`; \ 1712 testdir=testsuite.$$vardots; \ 1713 if [ ! -f $$testdir/Makefile ] && [ -f testsuite/config.status ]; then \ 1714 configargs=`cd testsuite && ./config.status --version | \ 1715 sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \ 1716 $(SHELL) $(srcdir)/../mkinstalldirs $$testdir && \ 1717 (cd $$testdir && \ 1718 eval $(SHELL) "\"\$$rootsrc/testsuite/configure\" $$configargs" \ 1719 "\"--srcdir=\$$rootsrc/testsuite\"" \ 1720 ); \ 1721 else :; fi && cd $$testdir && \ 1722 $(MAKE) $(TARGET_FLAGS_TO_PASS) \ 1723 RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \ 1724 FORCE_PARALLEL=$(if $(FORCE_PARALLEL),1,$(if $(RUNTESTFLAGS),,1)) \ 1725 "$$target"; \ 1726 else true; fi 1727 1728# The set of headers checked by 'check-headers' by default. 1729CHECK_HEADERS = $(HFILES_NO_SRCDIR) 1730 1731# Try to compile each header in isolation, thus ensuring headers are 1732# self-contained. 1733# 1734# Defaults to checking all $HFILES_NO_SRCDIR headers. 1735# 1736# Do: 1737# 1738# make check-headers CHECK_HEADERS="header.h list.h" 1739# 1740# to check specific headers. 1741# 1742check-headers: 1743 @echo Checking headers. 1744 for i in $(CHECK_HEADERS) ; do \ 1745 $(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \ 1746 $(INTERNAL_CFLAGS) $(CXXFLAGS) -include defs.h $(srcdir)/$$i ; \ 1747 done 1748.PHONY: check-headers 1749 1750info install-info clean-info dvi pdf install-pdf html install-html: force 1751 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do 1752 1753# Traditionally "install" depends on "all". But it may be useful 1754# not to; for example, if the user has made some trivial change to a 1755# source file and doesn't care about rebuilding or just wants to save the 1756# time it takes for make to check that all is up to date. 1757# install-only is intended to address that need. 1758install: all 1759 @$(MAKE) $(FLAGS_TO_PASS) install-only 1760 1761install-only: $(CONFIG_INSTALL) 1762 transformed_name=`t='$(program_transform_name)'; \ 1763 echo gdb | sed -e "$$t"` ; \ 1764 if test "x$$transformed_name" = x; then \ 1765 transformed_name=gdb ; \ 1766 else \ 1767 true ; \ 1768 fi ; \ 1769 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ 1770 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdb$(EXEEXT) \ 1771 $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ 1772 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \ 1773 $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h 1774 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \ 1775 then \ 1776 transformed_name=`t='$(program_transform_name)'; \ 1777 echo gcore | sed -e "$$t"` ; \ 1778 if test "x$$transformed_name" = x; then \ 1779 transformed_name=gcore ; \ 1780 else \ 1781 true ; \ 1782 fi ; \ 1783 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ 1784 $(INSTALL_SCRIPT) gcore \ 1785 $(DESTDIR)$(bindir)/$$transformed_name; \ 1786 fi 1787 transformed_name=`t='$(program_transform_name)'; \ 1788 echo gdb-add-index | sed -e "$$t"` ; \ 1789 if test "x$$transformed_name" = x; then \ 1790 transformed_name=gdb-add-index ; \ 1791 else \ 1792 true ; \ 1793 fi ; \ 1794 $(INSTALL_SCRIPT) $(srcdir)/contrib/gdb-add-index.sh \ 1795 $(DESTDIR)$(bindir)/$$transformed_name 1796 @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 1797 1798install-strip: 1799 $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 1800 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 1801 `test -z '$(STRIP)' || \ 1802 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only 1803 1804install-guile: 1805 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/guile/gdb 1806 1807install-python: 1808 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb 1809 1810uninstall: force $(CONFIG_UNINSTALL) 1811 transformed_name=`t='$(program_transform_name)'; \ 1812 echo gdb | sed -e $$t` ; \ 1813 if test "x$$transformed_name" = x; then \ 1814 transformed_name=gdb ; \ 1815 else \ 1816 true ; \ 1817 fi ; \ 1818 rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ 1819 $(DESTDIR)$(man1dir)/$$transformed_name.1 1820 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \ 1821 then \ 1822 transformed_name=`t='$(program_transform_name)'; \ 1823 echo gcore | sed -e "$$t"` ; \ 1824 if test "x$$transformed_name" = x; then \ 1825 transformed_name=gcore ; \ 1826 else \ 1827 true ; \ 1828 fi ; \ 1829 rm -f $(DESTDIR)$(bindir)/$$transformed_name; \ 1830 fi 1831 @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 1832 1833# The C++ name parser can be built standalone for testing. 1834test-cp-name-parser.o: cp-name-parser.c 1835 $(COMPILE) -DTEST_CPNAMES cp-name-parser.c 1836 $(POSTCOMPILE) 1837 1838test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY) 1839 $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) \ 1840 -o test-cp-name-parser$(EXEEXT) test-cp-name-parser.o \ 1841 $(LIBIBERTY) 1842 1843# We do this by grepping through sources. If that turns out to be too slow, 1844# maybe we could just require every .o file to have an initialization routine 1845# of a given name (top.o -> _initialize_top, etc.). 1846# 1847# Note that the set of files with init functions might change, or the names 1848# of the functions might change, so this files needs to depend on all the 1849# source files that will be linked into gdb. However, due to the way 1850# this Makefile has generally been written, we do this indirectly, by 1851# computing the list of source files from the list of object files. 1852 1853INIT_FILES_FILTER_OUT = \ 1854 cp-name-parser.o \ 1855 init.o \ 1856 version.o \ 1857 xml-builtin.o \ 1858 %_S.o \ 1859 %_U.o 1860 1861INIT_FILES = \ 1862 $(patsubst %.o,%.c, \ 1863 $(patsubst %-exp.o,%-exp.y, \ 1864 $(filter-out $(INIT_FILES_FILTER_OUT), $(COMMON_OBS)))) 1865 1866init.c: stamp-init; @true 1867stamp-init: $(INIT_FILES) config.status $(srcdir)/make-init-c 1868 $(ECHO_INIT_C) 1869 $(SILENCE) $(srcdir)/make-init-c $(addprefix $(srcdir)/,$(INIT_FILES)) > init.c-tmp 1870 $(SILENCE) $(SHELL) $(srcdir)/../move-if-change init.c-tmp init.c 1871 $(SILENCE) echo stamp > stamp-init 1872 1873.PRECIOUS: init.c 1874 1875# Create a library of the gdb object files and build GDB by linking 1876# against that. 1877# 1878# init.o is very important. It pulls in the rest of GDB. 1879LIBGDB_OBS = $(sort $(COMMON_OBS)) init.o 1880libgdb.a: $(LIBGDB_OBS) 1881 -rm -f libgdb.a 1882 $(AR) q libgdb.a $(LIBGDB_OBS) 1883 $(RANLIB) libgdb.a 1884 1885# Removing the old gdb first works better if it is running, at least on SunOS. 1886gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(CDEPS) $(TDEPLIBS) 1887 $(SILENCE) rm -f gdb$(EXEEXT) 1888 $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ 1889 -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \ 1890 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) 1891ifneq ($(CODESIGN_CERT),) 1892 $(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT) 1893endif 1894 1895# This is useful when debugging GDB, because some Unix's don't let you run GDB 1896# on itself without copying the executable. So "make gdb1" will make 1897# gdb and put a copy in gdb1, and you can run it with "gdb gdb1". 1898# Removing gdb1 before the copy is the right thing if gdb1 is open 1899# in another process. 1900gdb1$(EXEEXT): gdb$(EXEEXT) 1901 rm -f gdb1$(EXEEXT) 1902 cp gdb$(EXEEXT) gdb1$(EXEEXT) 1903 1904# Put the proper machine-specific files first, so M-. on a machine 1905# specific routine gets the one for the correct machine. (FIXME: those 1906# files go in twice; we should be removing them from the main list). 1907 1908# TAGS depends on all the files that go into it so you can rebuild TAGS 1909# with `make TAGS' and not have to say `rm TAGS' first. 1910 1911GDB_NM_FILE = @GDB_NM_FILE@ 1912TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR) 1913 @echo Making TAGS 1914 etags `(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \ 1915 `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \ 1916 echo $(srcdir)/$$i ; \ 1917 done ; for i in $(TAGFILES_WITH_SRCDIR); do \ 1918 echo $$i ; \ 1919 done) | sed -e 's/\.o$$/\.c/'` \ 1920 `find $(srcdir)/config -name '*.h' -print` 1921 1922tags: TAGS 1923 1924clean mostlyclean: $(CONFIG_CLEAN) 1925 @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do 1926 rm -f *.o *.a *~ init.c-tmp init.l-tmp version.c-tmp 1927 rm -f init.c stamp-init version.c stamp-version 1928 rm -f gdb$(EXEEXT) core make.log 1929 rm -f gdb[0-9]$(EXEEXT) 1930 rm -f test-cp-name-parser$(EXEEXT) 1931 rm -f xml-builtin.c stamp-xml 1932 rm -f $(DEPDIR)/* 1933 for i in $(CONFIG_SRC_SUBDIR); do \ 1934 rm -f $$i/*.o; \ 1935 rm -f $$i/$(DEPDIR)/*; \ 1936 done 1937 1938# This used to depend on c-exp.c m2-exp.c TAGS 1939# I believe this is wrong; the makefile standards for distclean just 1940# describe removing files; the only sort of "re-create a distribution" 1941# functionality described is if the distributed files are unmodified. 1942distclean: clean 1943 @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do 1944 rm -f nm.h config.status config.h stamp-h b jit-reader.h 1945 rm -f gdb-gdb.py gdb-gdb.gdb 1946 rm -f y.output yacc.acts yacc.tmp y.tab.h 1947 rm -f config.log config.cache 1948 rm -f Makefile 1949 rm -rf $(DEPDIR) 1950 for i in $(CONFIG_SRC_SUBDIR); do \ 1951 if test -d $$i/$(DEPDIR); then rmdir $$i/$(DEPDIR); fi \ 1952 done 1953 1954maintainer-clean: local-maintainer-clean do-maintainer-clean distclean 1955realclean: maintainer-clean 1956 1957local-maintainer-clean: 1958 @echo "This command is intended for maintainers to use;" 1959 @echo "it deletes files that may require special tools to rebuild." 1960 rm -f c-exp.c \ 1961 cp-name-parser.c \ 1962 ada-lex.c ada-exp.c \ 1963 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c 1964 rm -f TAGS 1965 rm -f $(YYFILES) 1966 rm -f nm.h config.status 1967 1968do-maintainer-clean: 1969 @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(CLEANDIRS)" \ 1970 subdir_do 1971 1972diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS) 1973 cd doc; $(MAKE) $(MFLAGS) diststuff 1974 1975subdir_do: force 1976 @for i in $(DODIRS); do \ 1977 case $$i in \ 1978 $(REQUIRED_SUBDIRS)) \ 1979 if [ ! -f ./$$i/Makefile ] ; then \ 1980 echo "Missing $$i/Makefile" >&2 ; \ 1981 exit 1 ; \ 1982 fi ;; \ 1983 esac ; \ 1984 if [ -f ./$$i/Makefile ] ; then \ 1985 if (cd ./$$i; \ 1986 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ 1987 else exit 1 ; fi ; \ 1988 else true ; fi ; \ 1989 done 1990 1991Makefile: Makefile.in config.status 1992 $(SHELL) config.status $@ 1993 1994.PHONY: run 1995run: Makefile 1996 ./gdb$(EXEEXT) --data-directory=`pwd`/data-directory $(GDBFLAGS) 1997 1998jit-reader.h: $(srcdir)/jit-reader.in 1999 $(SHELL) config.status $@ 2000 2001gcore: $(srcdir)/gcore.in 2002 $(SHELL) config.status $@ 2003 2004gdb-gdb.py: $(srcdir)/gdb-gdb.py.in 2005 $(SHELL) config.status $@ 2006 2007gdb-gdb.gdb: $(srcdir)/gdb-gdb.gdb.in 2008 $(SHELL) config.status $@ 2009 2010config.h: stamp-h ; @true 2011stamp-h: $(srcdir)/config.in config.status 2012 $(SHELL) config.status config.h 2013 2014nm.h: stamp-nmh ; @true 2015stamp-nmh: config.status 2016 $(SHELL) config.status nm.h 2017 2018config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh 2019 $(SHELL) config.status --recheck 2020 2021ACLOCAL = aclocal 2022ACLOCAL_AMFLAGS = -I ../config 2023 2024# Keep these in sync with the includes in acinclude.m4. 2025aclocal_m4_deps = \ 2026 configure.ac \ 2027 acx_configure_dir.m4 \ 2028 transform.m4 \ 2029 ../bfd/bfd.m4 \ 2030 ../config/acinclude.m4 \ 2031 ../config/enable.m4 \ 2032 ../config/plugins.m4 \ 2033 ../config/lead-dot.m4 \ 2034 ../config/override.m4 \ 2035 ../config/largefile.m4 \ 2036 ../config/gettext-sister.m4 \ 2037 ../config/lib-ld.m4 \ 2038 ../config/lib-prefix.m4 \ 2039 ../config/lib-link.m4 \ 2040 ../config/acx.m4 \ 2041 ../config/tcl.m4 \ 2042 ../config/depstand.m4 \ 2043 ../config/lcmessage.m4 \ 2044 ../config/codeset.m4 \ 2045 ../config/zlib.m4 \ 2046 ../config/ax_pthread.m4 2047 2048$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) 2049 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 2050 2051AUTOCONF = autoconf 2052configure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4 2053$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(configure_deps) 2054 cd $(srcdir) && $(AUTOCONF) 2055 2056AUTOHEADER = autoheader 2057$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(configure_deps) 2058 cd $(srcdir) && $(AUTOHEADER) 2059 rm -f stamp-h 2060 touch $@ 2061 2062# automatic rebuilding in automake-generated Makefiles requires 2063# this rule in the toplevel Makefile, which, with GNU make, causes 2064# the desired updates through the implicit regeneration of the Makefile 2065# and all of its prerequisites. 2066am--refresh: 2067 @: 2068 2069force: 2070 2071# Documentation! 2072# GDB QUICK REFERENCE (TeX dvi file, CM fonts) 2073doc/refcard.dvi: 2074 cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) 2075 2076# GDB QUICK REFERENCE (PostScript output, common PS fonts) 2077doc/refcard.ps: 2078 cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) 2079 2080# GDB MANUAL: TeX dvi file 2081doc/gdb.dvi: 2082 cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) 2083 2084# GDB MANUAL: info file 2085doc/gdb.info: 2086 cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) 2087 2088# Make copying.c from COPYING 2089$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copying.awk 2090 awk -f $(srcdir)/copying.awk \ 2091 < $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp 2092 mv $(srcdir)/copying.tmp $(srcdir)/copying.c 2093 2094version.c: stamp-version; @true 2095# Note that the obvious names for the temp file are taken by 2096# create-version.sh. 2097stamp-version: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh 2098 $(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir) \ 2099 $(host_alias) $(target_alias) version-t.t 2100 @$(SHELL) $(srcdir)/../move-if-change version-t.t version.c 2101 @echo stamp > stamp-version 2102 2103 2104gdb.cxref: $(SFILES) 2105 cxref -I. $(SFILES) >gdb.cxref 2106 2107force_update: 2108 2109# GNU Make has an annoying habit of putting *all* the Makefile variables 2110# into the environment, unless you include this target as a circumvention. 2111# Rumor is that this will be fixed (and this target can be removed) 2112# in GNU Make 4.0. 2113.NOEXPORT: 2114 2115# GNU Make 3.63 has a different problem: it keeps tacking command line 2116# overrides onto the definition of $(MAKE). This variable setting 2117# will remove them. 2118MAKEOVERRIDES = 2119 2120ALLDEPFILES = \ 2121 aarch32-tdep.c \ 2122 aarch64-fbsd-nat.c \ 2123 aarch64-fbsd-tdep.c \ 2124 aarch64-linux-nat.c \ 2125 aarch64-linux-tdep.c \ 2126 aarch64-newlib-tdep.c \ 2127 aarch64-ravenscar-thread.c \ 2128 aarch64-tdep.c \ 2129 aix-thread.c \ 2130 alpha-bsd-nat.c \ 2131 alpha-bsd-tdep.c \ 2132 alpha-linux-nat.c \ 2133 alpha-linux-tdep.c \ 2134 alpha-mdebug-tdep.c \ 2135 alpha-netbsd-tdep.c \ 2136 alpha-obsd-tdep.c \ 2137 alpha-tdep.c \ 2138 amd64-bsd-nat.c \ 2139 amd64-darwin-tdep.c \ 2140 amd64-dicos-tdep.c \ 2141 amd64-fbsd-nat.c \ 2142 amd64-fbsd-tdep.c \ 2143 amd64-linux-nat.c \ 2144 amd64-linux-tdep.c \ 2145 amd64-nat.c \ 2146 amd64-netbsd-nat.c \ 2147 amd64-netbsd-tdep.c \ 2148 amd64-obsd-nat.c \ 2149 amd64-obsd-tdep.c \ 2150 amd64-ravenscar-thread.c \ 2151 amd64-sol2-tdep.c \ 2152 amd64-tdep.c \ 2153 arc-linux-nat.c \ 2154 arc-tdep.c \ 2155 arm.c \ 2156 arm-bsd-tdep.c \ 2157 arm-fbsd-nat.c \ 2158 arm-fbsd-tdep.c \ 2159 arm-get-next-pcs.c \ 2160 arm-linux.c \ 2161 arm-linux-nat.c \ 2162 arm-linux-tdep.c \ 2163 arm-netbsd-nat.c \ 2164 arm-netbsd-tdep.c \ 2165 arm-none-tdep.c \ 2166 arm-obsd-tdep.c \ 2167 arm-tdep.c \ 2168 avr-tdep.c \ 2169 bfin-linux-tdep.c \ 2170 bfin-tdep.c \ 2171 bpf-tdep.c \ 2172 bsd-kvm.c \ 2173 bsd-uthread.c \ 2174 csky-linux-tdep.c \ 2175 csky-tdep.c \ 2176 darwin-nat.c \ 2177 dicos-tdep.c \ 2178 fbsd-nat.c \ 2179 fbsd-tdep.c \ 2180 fork-child.c \ 2181 ft32-tdep.c \ 2182 glibc-tdep.c \ 2183 go32-nat.c \ 2184 h8300-tdep.c \ 2185 hppa-bsd-tdep.c \ 2186 hppa-linux-nat.c \ 2187 hppa-linux-tdep.c \ 2188 hppa-netbsd-nat.c \ 2189 hppa-netbsd-tdep.c \ 2190 hppa-obsd-nat.c \ 2191 hppa-obsd-tdep.c \ 2192 hppa-tdep.c \ 2193 i386-bsd-nat.c \ 2194 i386-bsd-tdep.c \ 2195 i386-darwin-nat.c \ 2196 i386-darwin-tdep.c \ 2197 i386-dicos-tdep.c \ 2198 i386-fbsd-nat.c \ 2199 i386-fbsd-tdep.c \ 2200 i386-gnu-nat.c \ 2201 i386-gnu-tdep.c \ 2202 i386-linux-nat.c \ 2203 i386-linux-tdep.c \ 2204 i386-netbsd-nat.c \ 2205 i386-netbsd-tdep.c \ 2206 i386-obsd-nat.c \ 2207 i386-obsd-tdep.c \ 2208 i386-sol2-nat.c \ 2209 i386-sol2-tdep.c \ 2210 i386-tdep.c \ 2211 i386-windows-tdep.c \ 2212 i387-tdep.c \ 2213 ia64-libunwind-tdep.c \ 2214 ia64-linux-nat.c \ 2215 ia64-linux-tdep.c \ 2216 ia64-tdep.c \ 2217 ia64-vms-tdep.c \ 2218 inf-ptrace.c \ 2219 linux-fork.c \ 2220 linux-record.c \ 2221 linux-tdep.c \ 2222 lm32-tdep.c \ 2223 m32r-linux-nat.c \ 2224 m32r-linux-tdep.c \ 2225 m32r-tdep.c \ 2226 m68hc11-tdep.c \ 2227 m68k-bsd-nat.c \ 2228 m68k-bsd-tdep.c \ 2229 m68k-linux-nat.c \ 2230 m68k-linux-tdep.c \ 2231 m68k-tdep.c \ 2232 microblaze-linux-tdep.c \ 2233 microblaze-tdep.c \ 2234 mingw-hdep.c \ 2235 mips-fbsd-nat.c \ 2236 mips-fbsd-tdep.c \ 2237 mips-linux-nat.c \ 2238 mips-linux-tdep.c \ 2239 mips-netbsd-nat.c \ 2240 mips-netbsd-tdep.c \ 2241 mips-sde-tdep.c \ 2242 mips-tdep.c \ 2243 mips64-obsd-nat.c \ 2244 mips64-obsd-tdep.c \ 2245 msp430-tdep.c \ 2246 netbsd-nat.c \ 2247 netbsd-tdep.c \ 2248 nds32-tdep.c \ 2249 nios2-linux-tdep.c \ 2250 nios2-tdep.c \ 2251 obsd-nat.c \ 2252 obsd-tdep.c \ 2253 posix-hdep.c \ 2254 ppc-fbsd-nat.c \ 2255 ppc-fbsd-tdep.c \ 2256 ppc-linux-nat.c \ 2257 ppc-linux-tdep.c \ 2258 ppc-netbsd-nat.c \ 2259 ppc-netbsd-tdep.c \ 2260 ppc-obsd-nat.c \ 2261 ppc-obsd-tdep.c \ 2262 ppc-ravenscar-thread.c \ 2263 ppc-sysv-tdep.c \ 2264 ppc64-tdep.c \ 2265 procfs.c \ 2266 ravenscar-thread.c \ 2267 remote-sim.c \ 2268 riscv-fbsd-nat.c \ 2269 riscv-fbsd-tdep.c \ 2270 riscv-linux-nat.c \ 2271 riscv-linux-tdep.c \ 2272 riscv-none-tdep.c \ 2273 riscv-ravenscar-thread.c \ 2274 riscv-tdep.c \ 2275 rl78-tdep.c \ 2276 rs6000-lynx178-tdep.c \ 2277 rs6000-nat.c \ 2278 rs6000-tdep.c \ 2279 rx-tdep.c \ 2280 s390-linux-nat.c \ 2281 s390-linux-tdep.c \ 2282 s390-tdep.c \ 2283 score-tdep.c \ 2284 ser-go32.c \ 2285 ser-mingw.c \ 2286 ser-pipe.c \ 2287 ser-tcp.c \ 2288 ser-uds.c \ 2289 sh-netbsd-nat.c \ 2290 sh-netbsd-tdep.c \ 2291 sh-tdep.c \ 2292 sol2-tdep.c \ 2293 solib-aix.c \ 2294 solib-svr4.c \ 2295 sparc-linux-nat.c \ 2296 sparc-linux-tdep.c \ 2297 sparc-nat.c \ 2298 sparc-netbsd-nat.c \ 2299 sparc-netbsd-tdep.c \ 2300 sparc-obsd-tdep.c \ 2301 sparc-ravenscar-thread.c \ 2302 sparc-sol2-nat.c \ 2303 sparc-sol2-tdep.c \ 2304 sparc-tdep.c \ 2305 sparc64-fbsd-nat.c \ 2306 sparc64-fbsd-tdep.c \ 2307 sparc64-linux-nat.c \ 2308 sparc64-linux-tdep.c \ 2309 sparc64-nat.c \ 2310 sparc64-netbsd-nat.c \ 2311 sparc64-netbsd-tdep.c \ 2312 sparc64-obsd-nat.c \ 2313 sparc64-obsd-tdep.c \ 2314 sparc64-sol2-tdep.c \ 2315 sparc64-tdep.c \ 2316 tilegx-linux-nat.c \ 2317 tilegx-linux-tdep.c \ 2318 tilegx-tdep.c \ 2319 v850-tdep.c \ 2320 vax-bsd-nat.c \ 2321 vax-netbsd-tdep.c \ 2322 vax-tdep.c \ 2323 windows-nat.c \ 2324 windows-tdep.c \ 2325 x86-nat.c \ 2326 x86-tdep.c \ 2327 xcoffread.c \ 2328 xstormy16-tdep.c \ 2329 xtensa-config.c \ 2330 xtensa-linux-nat.c \ 2331 xtensa-linux-tdep.c \ 2332 xtensa-tdep.c \ 2333 xtensa-xtregs.c 2334 2335# Some files need explicit build rules (due to -Werror problems) or due 2336# to sub-directory fun 'n' games. 2337 2338# ada-exp.c can appear in srcdir, for releases; or in ., for 2339# development builds. 2340ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi` 2341 2342ada-exp.o: ada-exp.c 2343 $(COMPILE) $(ADA_EXP_C) 2344 $(POSTCOMPILE) 2345 2346# Message files. Based on code in gcc/Makefile.in. 2347 2348# Rules for generating translated message descriptions. Disabled by 2349# autoconf if the tools are not available. 2350 2351.PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot 2352 2353all-po: $(CATALOGS) 2354 2355# This notation should be acceptable to all Make implementations used 2356# by people who are interested in updating .po files. 2357update-po: $(CATALOGS:.gmo=.pox) 2358 2359# N.B. We do not attempt to copy these into $(srcdir). The snapshot 2360# script does that. 2361%.gmo: %.po 2362 -test -d po || mkdir po 2363 $(GMSGFMT) --statistics -o $@ $< 2364 2365# The new .po has to be gone over by hand, so we deposit it into 2366# build/po with a different extension. If build/po/$(PACKAGE).pot 2367# exists, use it (it was just created), else use the one in srcdir. 2368%.pox: %.po 2369 -test -d po || mkdir po 2370 $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \ 2371 then echo po/$(PACKAGE).pot; \ 2372 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@ 2373 2374# This rule has to look for .gmo modules in both srcdir and the cwd, 2375# and has to check that we actually have a catalog for each language, 2376# in case they weren't built or included with the distribution. 2377install-po: 2378 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir) 2379 cats="$(CATALOGS)"; for cat in $$cats; do \ 2380 lang=`basename $$cat | sed 's/\.gmo$$//'`; \ 2381 if [ -f $$cat ]; then :; \ 2382 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \ 2383 else continue; \ 2384 fi; \ 2385 dir=$(localedir)/$$lang/LC_MESSAGES; \ 2386 echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \ 2387 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \ 2388 echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ 2389 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ 2390 done 2391uninstall-po: 2392 cats="$(CATALOGS)"; for cat in $$cats; do \ 2393 lang=`basename $$cat | sed 's/\.gmo$$//'`; \ 2394 if [ -f $$cat ]; then :; \ 2395 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \ 2396 else continue; \ 2397 fi; \ 2398 dir=$(localedir)/$$lang/LC_MESSAGES; \ 2399 rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \ 2400 done 2401# Delete po/*.gmo only if we are not building in the source directory. 2402clean-po: 2403 -if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi 2404 2405# Rule for regenerating the message template (gdb.pot). Instead of 2406# forcing everyone to edit POTFILES.in, which proved impractical, this 2407# rule has no dependencies and always regenerates gdb.pot. This is 2408# relatively harmless since the .po files do not directly depend on 2409# it. The .pot file is left in the build directory. Since GDB's 2410# Makefile lacks a cannonical list of sources (missing xm, tm and nm 2411# files) force this rule. 2412$(PACKAGE).pot: po/$(PACKAGE).pot 2413po/$(PACKAGE).pot: force 2414 -test -d po || mkdir po 2415 sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir) 2416 2417 2418# 2419# YACC/LEX dependencies 2420# 2421# LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't 2422# exist in srcdir, then compiled in objdir to LANG-exp.o. If we 2423# said LANG-exp.c rather than ./c-exp.c some makes would 2424# sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus 2425# decls for malloc/realloc/free which conflict with everything else. 2426# Strictly speaking c-exp.c should therefore depend on 2427# Makefile.in, but that was a pretty big annoyance. 2428 2429%.c: %.y 2430 $(ECHO_YACC) $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- \ 2431 $(YACC) $(YFLAGS) || (rm -f $@.tmp; false) 2432 @sed -e '/extern.*malloc/d' \ 2433 -e '/extern.*realloc/d' \ 2434 -e '/extern.*free/d' \ 2435 -e '/include.*malloc.h/d' \ 2436 -e 's/\([^x]\)malloc/\1xmalloc/g' \ 2437 -e 's/\([^x]\)realloc/\1xrealloc/g' \ 2438 -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ 2439 -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ 2440 -e '/^#line.*y.tab.c/d' \ 2441 -e 's/YY_NULL/YY_NULLPTR/g' \ 2442 < $@.tmp > $@.new && \ 2443 rm -f $@.tmp && \ 2444 mv $@.new $@ 2445%.c: %.l 2446 $(ECHO_LEX) $(FLEX) -t $< \ 2447 | sed -e '/extern.*malloc/d' \ 2448 -e '/extern.*realloc/d' \ 2449 -e '/extern.*free/d' \ 2450 -e '/include.*malloc.h/d' \ 2451 -e 's/\([^x]\)malloc/\1xmalloc/g' \ 2452 -e 's/\([^x]\)realloc/\1xrealloc/g' \ 2453 -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ 2454 -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ 2455 -e 's/yy_flex_xrealloc/yyxrealloc/g' \ 2456 > $@.new && \ 2457 mv $@.new $@ 2458 2459.PRECIOUS: ada-lex.c 2460 2461# XML rules 2462 2463xml-builtin.c: stamp-xml; @true 2464stamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES) 2465 $(SILENCE) rm -f xml-builtin.tmp 2466 $(ECHO_GEN_XML_BUILTIN) AWK="$(AWK)" \ 2467 $(SHELL) $(srcdir)/features/feature_to_c.sh \ 2468 xml-builtin.tmp $(XMLFILES) 2469 $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin.c 2470 $(SILENCE) echo stamp > stamp-xml 2471 2472.PRECIOUS: xml-builtin.c 2473 2474# 2475# GDBTK sub-directory 2476# 2477 2478all-gdbtk: insight$(EXEEXT) 2479 2480install-gdbtk: 2481 transformed_name=`t='$(program_transform_name)'; \ 2482 echo insight | sed -e $$t` ; \ 2483 if test "x$$transformed_name" = x; then \ 2484 transformed_name=insight ; \ 2485 else \ 2486 true ; \ 2487 fi ; \ 2488 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ 2489 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) insight$(EXEEXT) \ 2490 $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ 2491 $(SHELL) $(srcdir)/../mkinstalldirs \ 2492 $(DESTDIR)$(GDBTK_LIBRARY) ; \ 2493 $(SHELL) $(srcdir)/../mkinstalldirs \ 2494 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \ 2495 $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \ 2496 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \ 2497 $(SHELL) $(srcdir)/../mkinstalldirs \ 2498 $(DESTDIR)$(GDBTK_LIBRARY)/images \ 2499 $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \ 2500 $(SHELL) $(srcdir)/../mkinstalldirs \ 2501 $(DESTDIR)$(GDBTK_LIBRARY)/help \ 2502 $(DESTDIR)$(GDBTK_LIBRARY)/help/images \ 2503 $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \ 2504 cd $(srcdir)/gdbtk/library ; \ 2505 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; \ 2506 do \ 2507 $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \ 2508 done ; 2509 2510uninstall-gdbtk: 2511 transformed_name=`t='$(program_transform_name)'; \ 2512 echo insight | sed -e $$t` ; \ 2513 if test "x$$transformed_name" = x; then \ 2514 transformed_name=insight ; \ 2515 else \ 2516 true ; \ 2517 fi ; \ 2518 rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ 2519 rm -rf $(DESTDIR)$(GDBTK_LIBRARY) 2520 2521clean-gdbtk: 2522 rm -f insight$(EXEEXT) 2523 2524# Removing the old gdb first works better if it is running, at least on SunOS. 2525insight$(EXEEXT): gdbtk-main.o libgdb.a $(CDEPS) $(TDEPLIBS) 2526 rm -f insight$(EXEEXT) 2527 $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ 2528 -o insight$(EXEEXT) gdbtk-main.o libgdb.a \ 2529 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) 2530 2531gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico 2532 $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o 2533 2534all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \ 2535 $(ITK_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ 2536 $(GDBTK_CFLAGS) \ 2537 -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \ 2538 -DSRC_DIR=\"$(GDBTK_SRC_DIR)\" 2539 2540# 2541# Dependency tracking. 2542# 2543 2544ifeq ($(DEPMODE),depmode=gcc3) 2545# Note that we put the dependencies into a .Tpo file, then move them 2546# into place if the compile succeeds. We need this because gcc does 2547# not atomically write the dependency output file. 2548override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \ 2549 -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo 2550override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \ 2551 $(@D)/$(DEPDIR)/$(basename $(@F)).Po 2552else 2553override COMPILE.pre = source='$<' object='$@' libtool=no \ 2554 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \ 2555 $(CXX) -x c++ $(CXX_DIALECT) 2556# depcomp handles atomicity for us, so we don't need a postcompile 2557# step. 2558override POSTCOMPILE = 2559endif 2560 2561# A list of all the objects we might care about in this build, for 2562# dependency tracking. 2563all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \ 2564 test-cp-name-parser.o 2565 2566# All the .deps files to include. 2567all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\ 2568 $(dir $(dep))/$(DEPDIR)/$(notdir $(dep))) 2569 2570# Ensure that generated files are created early. Use order-only 2571# dependencies if available. They require GNU make 3.80 or newer, 2572# and the .VARIABLES variable was introduced at the same time. 2573ifdef .VARIABLES 2574$(all_object_files): | $(generated_files) 2575else 2576$(all_object_files) : $(generated_files) 2577endif 2578 2579# Dependencies. 2580-include $(all_deps_files) 2581 2582# Disable implicit make rules. 2583include $(srcdir)/disable-implicit-rules.mk 2584 2585### end of the gdb Makefile.in. 2586