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