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