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