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