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