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