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