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