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