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