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