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