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