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