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