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