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