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