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