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