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