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