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