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