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