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