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