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