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