]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/Makefile.in
Makefile: fix typo
[thirdparty/binutils-gdb.git] / gdb / Makefile.in
1 # Copyright (C) 1989-2016 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 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 host_alias = @host_alias@
22 target_alias = @target_alias@
23 program_transform_name = @program_transform_name@
24 bindir = @bindir@
25 libdir = @libdir@
26 tooldir = $(libdir)/$(target_alias)
27
28 datadir = @datadir@
29 localedir = @localedir@
30 mandir = @mandir@
31 man1dir = $(mandir)/man1
32 man2dir = $(mandir)/man2
33 man3dir = $(mandir)/man3
34 man4dir = $(mandir)/man4
35 man5dir = $(mandir)/man5
36 man6dir = $(mandir)/man6
37 man7dir = $(mandir)/man7
38 man8dir = $(mandir)/man8
39 man9dir = $(mandir)/man9
40 infodir = @infodir@
41 datarootdir = @datarootdir@
42 docdir = @docdir@
43 htmldir = @htmldir@
44 pdfdir = @pdfdir@
45 includedir = @includedir@
46
47 install_sh = @install_sh@
48
49 # This can be referenced by `LIBINTL' as computed by
50 # ZW_GNU_GETTEXT_SISTER_DIR.
51 top_builddir = .
52
53 SHELL = @SHELL@
54 EXEEXT = @EXEEXT@
55
56 AWK = @AWK@
57 LN_S = @LN_S@
58
59 INSTALL = @INSTALL@
60 INSTALL_PROGRAM = @INSTALL_PROGRAM@
61 INSTALL_SCRIPT = @INSTALL_SCRIPT@
62 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
63 INSTALL_DATA = @INSTALL_DATA@
64
65 DESTDIR =
66
67 AR = @AR@
68 AR_FLAGS = qv
69 RANLIB = @RANLIB@
70 DLLTOOL = @DLLTOOL@
71 WINDRES = @WINDRES@
72 MIG = @MIG@
73 STRIP = @STRIP@
74
75 XGETTEXT = @XGETTEXT@
76 GMSGFMT = @GMSGFMT@
77 MSGMERGE = msgmerge
78
79 PACKAGE = @PACKAGE@
80 CATALOGS = @CATALOGS@
81
82 # If you are compiling with GCC, make sure that either 1) You have the
83 # fixed include files where GCC can reach them, or 2) You use the
84 # -traditional flag. Otherwise the ioctl calls in inflow.c
85 # will be incorrectly compiled. The "fixincludes" script in the gcc
86 # distribution will fix your include files up.
87 CC=@CC@
88 CXX=@CXX@
89 CXX_DIALECT= @CXX_DIALECT@
90
91 # Dependency tracking information.
92 DEPMODE = @CCDEPMODE@
93 DEPDIR = @DEPDIR@
94 depcomp = $(SHELL) $(srcdir)/../depcomp
95
96 # Note that these are overridden by GNU make-specific code below if
97 # GNU make is used. The overrides implement dependency tracking.
98 COMPILE.pre = $(CXX) $(CXX_DIALECT)
99 COMPILE.post = -c -o $@
100 COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
101 POSTCOMPILE = @true
102
103 # Directory containing source files.
104 srcdir = @srcdir@
105 VPATH = @srcdir@
106 top_srcdir = @top_srcdir@
107
108 YACC=@YACC@
109
110 # This is used to rebuild ada-lex.c from ada-lex.l. If the program is
111 # not defined, but ada-lex.c is present, compilation will continue,
112 # possibly with a warning.
113 FLEX = flex
114
115 YLWRAP = $(srcdir)/../ylwrap
116
117 # where to find makeinfo, preferably one designed for texinfo-2
118 MAKEINFO = @MAKEINFO@
119 MAKEINFOFLAGS = @MAKEINFOFLAGS@
120 MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
121 MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
122
123 MAKEHTML = $(MAKEINFO_CMD) --html
124 MAKEHTMLFLAGS =
125
126 # Set this up with gcc if you have gnu ld and the loader will print out
127 # line numbers for undefined references.
128 #CC_LD=g++ -static
129 CC_LD=$(CXX) $(CXX_DIALECT)
130
131 # Where is our "include" directory? Typically $(srcdir)/../include.
132 # This is essentially the header file directory for the library
133 # routines in libiberty.
134 INCLUDE_DIR = $(srcdir)/../include
135 INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
136
137 # Where is the "-liberty" library? Typically in ../libiberty.
138 LIBIBERTY = ../libiberty/libiberty.a
139
140 # Where is the BFD library? Typically in ../bfd.
141 BFD_DIR = ../bfd
142 BFD = $(BFD_DIR)/libbfd.a
143 BFD_SRC = $(srcdir)/$(BFD_DIR)
144 BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
145
146 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
147 # -I../zlib, unless we were configured with --with-system-zlib, in which
148 # case both are empty.
149 ZLIB = @zlibdir@ -lz
150 ZLIBINC = @zlibinc@
151
152 # Where is the decnumber library? Typically in ../libdecnumber.
153 LIBDECNUMBER_DIR = ../libdecnumber
154 LIBDECNUMBER = $(LIBDECNUMBER_DIR)/libdecnumber.a
155 LIBDECNUMBER_SRC = $(srcdir)/$(LIBDECNUMBER_DIR)
156 LIBDECNUMBER_CFLAGS = -I$(LIBDECNUMBER_DIR) -I$(LIBDECNUMBER_SRC)
157
158 # Where is the READLINE library? Typically in ../readline.
159 READLINE_DIR = ../readline
160 READLINE_SRC = $(srcdir)/$(READLINE_DIR)
161 READLINE = @READLINE@
162 READLINE_DEPS = @READLINE_DEPS@
163 READLINE_CFLAGS = @READLINE_CFLAGS@
164
165 # Where is expat? This will be empty if expat was not available.
166 LIBEXPAT = @LIBEXPAT@
167
168 # Where is lzma? This will be empty if lzma was not available.
169 LIBLZMA = @LIBLZMA@
170
171 # Where is libbabeltrace? This will be empty if lbabeltrace was not
172 # available.
173 LIBBABELTRACE = @LIBBABELTRACE@
174
175 # Where is libipt? This will be empty if libipt was not available.
176 LIBIPT = @LIBIPT@
177
178 WARN_CFLAGS = @WARN_CFLAGS@
179 WERROR_CFLAGS = @WERROR_CFLAGS@
180 GDB_WARN_CFLAGS = $(WARN_CFLAGS)
181 GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
182
183 GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \
184 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
185 GDB_WARN_CFLAGS_NO_DEFS = `echo " $(GDB_WARN_CFLAGS) " \
186 | sed "s/ -Wold-style-definition / -Wno-old-style-definition /g"`
187
188 RDYNAMIC = @RDYNAMIC@
189
190 # Where is the INTL library? Typically in ../intl.
191 INTL = @LIBINTL@
192 INTL_DEPS = @LIBINTL_DEP@
193 INTL_CFLAGS = @INCINTL@
194
195 # Where is the ICONV library? This will be empty if in libc or not available.
196 LIBICONV = @LIBICONV@
197
198 # Did the user give us a --with-gdb-datadir option?
199 GDB_DATADIR = @GDB_DATADIR@
200
201 # Flags to pass to gdb when invoked with "make run".
202 GDBFLAGS =
203
204 # Helper code from gnulib.
205 GNULIB_BUILDDIR = build-gnulib
206 LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
207 INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import
208
209 # Generated headers in the gnulib directory. These must be listed
210 # so that they are generated before other files are compiled.
211 GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
212
213 #
214 # CLI sub directory definitons
215 #
216 SUBDIR_CLI_OBS = \
217 cli-dump.o \
218 cli-decode.o cli-script.o cli-cmds.o cli-setshow.o \
219 cli-logging.o \
220 cli-interp.o cli-utils.o
221 SUBDIR_CLI_SRCS = \
222 cli/cli-dump.c \
223 cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
224 cli/cli-logging.c \
225 cli/cli-interp.c cli/cli-utils.c
226 SUBDIR_CLI_DEPS =
227 SUBDIR_CLI_LDFLAGS=
228 SUBDIR_CLI_CFLAGS=
229
230 #
231 # MI sub directory definitons
232 #
233 SUBDIR_MI_OBS = \
234 mi-out.o mi-console.o \
235 mi-cmds.o mi-cmd-catch.o mi-cmd-env.o \
236 mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
237 mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o \
238 mi-cmd-info.o mi-interp.o \
239 mi-main.o mi-parse.o mi-getopt.o
240 SUBDIR_MI_SRCS = \
241 mi/mi-out.c mi/mi-console.c \
242 mi/mi-cmds.c mi/mi-cmd-catch.c mi/mi-cmd-env.c \
243 mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
244 mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \
245 mi/mi-cmd-target.c mi/mi-cmd-info.c mi/mi-interp.c \
246 mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
247 SUBDIR_MI_DEPS =
248 SUBDIR_MI_LDFLAGS=
249 SUBDIR_MI_CFLAGS=
250
251 #
252 # TUI sub directory definitions
253 #
254
255 SUBDIR_TUI_OBS = \
256 tui-command.o \
257 tui-data.o \
258 tui-disasm.o \
259 tui-file.o \
260 tui-hooks.o \
261 tui-interp.o \
262 tui-io.o \
263 tui-layout.o \
264 tui-out.o \
265 tui-regs.o \
266 tui-source.o \
267 tui-stack.o \
268 tui-win.o \
269 tui-windata.o \
270 tui-wingeneral.o \
271 tui-winsource.o \
272 tui.o
273
274 SUBDIR_TUI_SRCS = \
275 tui/tui-command.c \
276 tui/tui-data.c \
277 tui/tui-disasm.c \
278 tui/tui-file.c \
279 tui/tui-hooks.c \
280 tui/tui-interp.c \
281 tui/tui-io.c \
282 tui/tui-layout.c \
283 tui/tui-out.c \
284 tui/tui-regs.c \
285 tui/tui-source.c \
286 tui/tui-stack.c \
287 tui/tui-win.c \
288 tui/tui-windata.c \
289 tui/tui-wingeneral.c \
290 tui/tui-winsource.c \
291 tui/tui.c
292
293 SUBDIR_TUI_DEPS =
294 SUBDIR_TUI_LDFLAGS=
295 SUBDIR_TUI_CFLAGS= \
296 -DTUI=1
297
298 #
299 # GCC Compile support sub-directory definitions
300 #
301 SUBDIR_GCC_COMPILE_OBS = \
302 compile.o compile-c-symbols.o compile-c-types.o \
303 compile-object-load.o compile-object-run.o \
304 compile-loc2c.o compile-c-support.o
305 SUBDIR_GCC_COMPILE_SRCS = \
306 compile/compile.c \
307 compile/compile-c-symbols.c \
308 compile/compile-c-types.c \
309 compile/compile-object-load.c \
310 compile/compile-object-load.h \
311 compile/compile-object-run.c \
312 compile/compile-object-run.h \
313 compile/compile-loc2c.c \
314 compile/compile-c-support.c
315
316 # Guile sub directory definitons for guile support.
317
318 SUBDIR_GUILE_OBS = \
319 guile.o \
320 scm-arch.o \
321 scm-auto-load.o \
322 scm-block.o \
323 scm-breakpoint.o \
324 scm-cmd.o \
325 scm-disasm.o \
326 scm-exception.o \
327 scm-frame.o \
328 scm-gsmob.o \
329 scm-iterator.o \
330 scm-lazy-string.o \
331 scm-objfile.o \
332 scm-math.o \
333 scm-param.o \
334 scm-ports.o \
335 scm-pretty-print.o \
336 scm-progspace.o \
337 scm-safe-call.o \
338 scm-string.o \
339 scm-symbol.o \
340 scm-symtab.o \
341 scm-type.o \
342 scm-utils.o \
343 scm-value.o
344 SUBDIR_GUILE_SRCS = \
345 guile/guile.c \
346 guile/scm-arch.c \
347 guile/scm-auto-load.c \
348 guile/scm-block.c \
349 guile/scm-breakpoint.c \
350 guile/scm-cmd.c \
351 guile/scm-disasm.c \
352 guile/scm-exception.c \
353 guile/scm-frame.c \
354 guile/scm-gsmob.c \
355 guile/scm-iterator.c \
356 guile/scm-lazy-string.c \
357 guile/scm-objfile.c \
358 guile/scm-math.c \
359 guile/scm-param.c \
360 guile/scm-ports.c \
361 guile/scm-pretty-print.c \
362 guile/scm-progspace.c \
363 guile/scm-safe-call.c \
364 guile/scm-string.c \
365 guile/scm-symbol.c \
366 guile/scm-symtab.c \
367 guile/scm-type.c \
368 guile/scm-utils.c \
369 guile/scm-value.c
370 SUBDIR_GUILE_DEPS =
371 SUBDIR_GUILE_LDFLAGS=
372 SUBDIR_GUILE_CFLAGS=
373
374 #
375 # python sub directory definitons
376 #
377 SUBDIR_PYTHON_OBS = \
378 python.o \
379 py-arch.o \
380 py-auto-load.o \
381 py-block.o \
382 py-bpevent.o \
383 py-breakpoint.o \
384 py-cmd.o \
385 py-continueevent.o \
386 py-xmethods.o \
387 py-event.o \
388 py-evtregistry.o \
389 py-evts.o \
390 py-exitedevent.o \
391 py-finishbreakpoint.o \
392 py-frame.o \
393 py-framefilter.o \
394 py-function.o \
395 py-gdb-readline.o \
396 py-inferior.o \
397 py-infevents.o \
398 py-infthread.o \
399 py-lazy-string.o \
400 py-linetable.o \
401 py-newobjfileevent.o \
402 py-objfile.o \
403 py-param.o \
404 py-prettyprint.o \
405 py-progspace.o \
406 py-signalevent.o \
407 py-stopevent.o \
408 py-symbol.o \
409 py-symtab.o \
410 py-threadevent.o \
411 py-type.o \
412 py-unwind.o \
413 py-utils.o \
414 py-value.o \
415 py-varobj.o
416
417 SUBDIR_PYTHON_SRCS = \
418 python/python.c \
419 python/py-arch.c \
420 python/py-auto-load.c \
421 python/py-block.c \
422 python/py-bpevent.c \
423 python/py-breakpoint.c \
424 python/py-cmd.c \
425 python/py-continueevent.c \
426 python/py-xmethods.c \
427 python/py-event.c \
428 python/py-evtregistry.c \
429 python/py-evts.c \
430 python/py-exitedevent.c \
431 python/py-finishbreakpoint.c \
432 python/py-frame.c \
433 python/py-framefilter.c \
434 python/py-function.c \
435 python/py-gdb-readline.c \
436 python/py-inferior.c \
437 python/py-infevents.c \
438 python/py-infthread.c \
439 python/py-lazy-string.c \
440 python/py-linetable.c \
441 python/py-newobjfileevent.c \
442 python/py-objfile.c \
443 python/py-param.c \
444 python/py-prettyprint.c \
445 python/py-progspace.c \
446 python/py-signalevent.c \
447 python/py-stopevent.c \
448 python/py-symbol.c \
449 python/py-symtab.c \
450 python/py-threadevent.c \
451 python/py-type.c \
452 python/py-unwind.c \
453 python/py-utils.c \
454 python/py-value.c \
455 python/py-varobj.c
456 SUBDIR_PYTHON_DEPS =
457 SUBDIR_PYTHON_LDFLAGS=
458 SUBDIR_PYTHON_CFLAGS=
459
460 # Opcodes currently live in one of two places. Either they are in the
461 # opcode library, typically ../opcodes, or they are in a header file
462 # in INCLUDE_DIR.
463 # Where is the "-lopcodes" library, with (some of) the opcode tables and
464 # disassemblers?
465 OPCODES_DIR = ../opcodes
466 OPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
467 OPCODES = $(OPCODES_DIR)/libopcodes.a
468 # Where are the other opcode tables which only have header file
469 # versions?
470 OP_INCLUDE = $(INCLUDE_DIR)/opcode
471 # Some source files like to use #include "opcodes/file.h"
472 OPCODES_CFLAGS = -I$(OP_INCLUDE) -I$(OPCODES_SRC)/..
473
474 # The simulator is usually nonexistent; targets that include one
475 # should set this to list all the .o or .a files to be linked in.
476 SIM = @SIM@
477
478 WIN32LIBS = @WIN32LIBS@
479
480 # Tcl et al cflags and libraries
481 TCL = @TCL_LIBRARY@
482 TCL_CFLAGS = @TCL_INCLUDE@
483 GDBTKLIBS = @GDBTKLIBS@
484 # Extra flags that the GDBTK files need:
485 GDBTK_CFLAGS = @GDBTK_CFLAGS@
486
487 TK = @TK_LIBRARY@
488 TK_CFLAGS = @TK_INCLUDE@
489
490 X11_CFLAGS = @TK_XINCLUDES@
491 X11_LDFLAGS =
492 X11_LIBS =
493
494 WIN32LDAPP = @WIN32LDAPP@
495
496 LIBGUI = @LIBGUI@
497 GUI_CFLAGS_X = @GUI_CFLAGS_X@
498 IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
499
500 ALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS)
501
502 # The version of gdbtk we're building. This should be kept
503 # in sync with GDBTK_VERSION and friends in gdbtk.h.
504 GDBTK_VERSION = 1.0
505 GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION)
506
507 # Gdbtk requires an absolute path to the source directory or
508 # the testsuite won't run properly.
509 GDBTK_SRC_DIR = @GDBTK_SRC_DIR@
510
511 SUBDIR_GDBTK_OBS = \
512 gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \
513 gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o
514 SUBDIR_GDBTK_SRCS = \
515 gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \
516 gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \
517 gdbtk/generic/gdbtk-interp.c \
518 gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \
519 gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \
520 gdbtk/generic/gdbtk-main.c
521 SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
522 SUBDIR_GDBTK_LDFLAGS=
523 SUBDIR_GDBTK_CFLAGS= -DGDBTK
524
525 CONFIG_OBS= @CONFIG_OBS@
526 CONFIG_SRCS= @CONFIG_SRCS@
527 CONFIG_DEPS= @CONFIG_DEPS@
528 CONFIG_LDFLAGS = @CONFIG_LDFLAGS@
529 ENABLE_CFLAGS= @ENABLE_CFLAGS@
530 CONFIG_ALL= @CONFIG_ALL@
531 CONFIG_CLEAN= @CONFIG_CLEAN@
532 CONFIG_INSTALL = @CONFIG_INSTALL@
533 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
534 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
535
536 # -I. for config files.
537 # -I$(srcdir) for gdb internal headers.
538 # -I$(srcdir)/config for more generic config files.
539
540 # It is also possible that you will need to add -I/usr/include/sys if
541 # your system doesn't have fcntl.h in /usr/include (which is where it
542 # should be according to Posix).
543 DEFS = @DEFS@
544 GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/common -I$(srcdir)/config \
545 -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
546
547 # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
548 GLOBAL_CFLAGS = $(MH_CFLAGS)
549
550 PROFILE_CFLAGS = @PROFILE_CFLAGS@
551
552 # These are specifically reserved for setting from the command line
553 # when running make. I.E.: "make CFLAGS=-Wmissing-prototypes".
554 CFLAGS = @CFLAGS@
555 CXXFLAGS = @CXXFLAGS@
556
557 # Set by configure, for e.g. expat. Python installations are such that
558 # C headers are included using their basename (for example, we #include
559 # <Python.h> rather than, say, <python/Python.h>). Since the file names
560 # are sometimes a little generic, we think that the risk of collision
561 # with other header files is high. If that happens, we try to mitigate
562 # a bit the consequences by putting the Python includes last in the list.
563 INTERNAL_CPPFLAGS = @CPPFLAGS@ @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@
564
565 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
566 INTERNAL_CFLAGS_BASE = \
567 $(CXXFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
568 $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
569 $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
570 $(INTL_CFLAGS) $(INCGNU) $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS)
571 INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
572 INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
573
574 # LDFLAGS is specifically reserved for setting from the command line
575 # when running make.
576 LDFLAGS = @LDFLAGS@
577
578 # Profiling options need to go here to work.
579 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
580 # and have it work; that's why CFLAGS is here.
581 # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
582 INTERNAL_LDFLAGS = \
583 $(CXXFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \
584 $(LDFLAGS) $(CONFIG_LDFLAGS)
585
586 # If your system is missing alloca(), or, more likely, it's there but
587 # it doesn't work, then refer to libiberty.
588
589 # Libraries and corresponding dependencies for compiling gdb.
590 # XM_CLIBS, defined in *config files, have host-dependent libs.
591 # LIBIBERTY appears twice on purpose.
592 CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(ZLIB) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
593 $(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) \
594 @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
595 $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
596 $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV)
597 CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
598 $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
599
600 ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
601 ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
602
603 DIST=gdb
604
605 LINT=/usr/5bin/lint
606 LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
607 $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
608 $(INTL_CFLAGS)
609
610 RUNTEST = runtest
611 RUNTESTFLAGS=
612
613 # XML files to build in to GDB.
614 XMLFILES = $(srcdir)/features/gdb-target.dtd $(srcdir)/features/xinclude.dtd \
615 $(srcdir)/features/library-list.dtd \
616 $(srcdir)/features/library-list-aix.dtd \
617 $(srcdir)/features/library-list-svr4.dtd $(srcdir)/features/osdata.dtd \
618 $(srcdir)/features/threads.dtd $(srcdir)/features/traceframe-info.dtd \
619 $(srcdir)/features/btrace.dtd $(srcdir)/features/btrace-conf.dtd
620
621 # This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX
622 # interface to the serial port. Hopefully if get ported to OS/2, VMS,
623 # etc., then there will be (as part of the C library or perhaps as
624 # part of libiberty) a POSIX interface. But at least for now the
625 # host-dependent makefile fragment might need to use something else
626 # besides ser-unix.o
627 SER_HARDWIRE = @SER_HARDWIRE@
628
629 # The `remote' debugging target is supported for most architectures,
630 # but not all (e.g. 960)
631 REMOTE_OBS = remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o \
632 remote-notif.o ctf.o tracefile.o tracefile-tfile.o
633
634 # This is remote-sim.o if a simulator is to be linked in.
635 SIM_OBS = @SIM_OBS@
636
637 # Target-dependent object files.
638 TARGET_OBS = @TARGET_OBS@
639
640 # All target-dependent objects files that require 64-bit CORE_ADDR
641 # (used with --enable-targets=all --enable-64-bit-bfd).
642 ALL_64_TARGET_OBS = \
643 aarch64-tdep.o aarch64-linux-tdep.o aarch64-newlib-tdep.o aarch64-insn.o \
644 alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
645 alphanbsd-tdep.o alphaobsd-tdep.o alpha-tdep.o \
646 amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
647 amd64-linux-tdep.o amd64nbsd-tdep.o \
648 amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
649 ia64-linux-tdep.o ia64-vms-tdep.o ia64-tdep.o \
650 mips64obsd-tdep.o \
651 sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o \
652 sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o
653
654 # All other target-dependent objects files (used with --enable-targets=all).
655 ALL_TARGET_OBS = \
656 arc-tdep.o \
657 armbsd-tdep.o arm.o arm-linux.o arm-linux-tdep.o \
658 arm-get-next-pcs.o arm-symbian-tdep.o \
659 armnbsd-tdep.o armobsd-tdep.o \
660 arm-tdep.o arm-wince-tdep.o \
661 avr-tdep.o \
662 bfin-linux-tdep.o bfin-tdep.o \
663 cris-linux-tdep.o cris-tdep.o \
664 dicos-tdep.o \
665 fbsd-tdep.o \
666 frv-linux-tdep.o frv-tdep.o \
667 ft32-tdep.o \
668 h8300-tdep.o \
669 hppabsd-tdep.o hppanbsd-tdep.o hppaobsd-tdep.o \
670 hppa-linux-tdep.o hppa-tdep.o \
671 i386bsd-tdep.o i386-cygwin-tdep.o i386fbsd-tdep.o i386gnu-tdep.o \
672 i386-linux-tdep.o i386nbsd-tdep.o i386-nto-tdep.o i386obsd-tdep.o \
673 i386-sol2-tdep.o i386-tdep.o i387-tdep.o \
674 i386-dicos-tdep.o i386-darwin-tdep.o \
675 iq2000-tdep.o \
676 linux-tdep.o \
677 lm32-tdep.o \
678 m32c-tdep.o \
679 m32r-linux-tdep.o m32r-tdep.o \
680 m68hc11-tdep.o \
681 m68kbsd-tdep.o m68klinux-tdep.o m68k-tdep.o \
682 m88k-tdep.o \
683 mep-tdep.o \
684 microblaze-tdep.o microblaze-linux-tdep.o \
685 mips-linux-tdep.o mips-sde-tdep.o \
686 mipsnbsd-tdep.o mips-tdep.o \
687 mn10300-linux-tdep.o mn10300-tdep.o \
688 moxie-tdep.o \
689 msp430-tdep.o \
690 mt-tdep.o \
691 nds32-tdep.o \
692 nios2-tdep.o nios2-linux-tdep.o \
693 nto-tdep.o \
694 ppc-linux-tdep.o ppcfbsd-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o \
695 ppc-sysv-tdep.o ppc64-tdep.o rl78-tdep.o \
696 rs6000-aix-tdep.o rs6000-tdep.o solib-aix.o ppc-ravenscar-thread.o \
697 rs6000-lynx178-tdep.o \
698 rx-tdep.o \
699 s390-linux-tdep.o \
700 score-tdep.o \
701 sh64-tdep.o sh-linux-tdep.o shnbsd-tdep.o sh-tdep.o \
702 sparc-linux-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
703 sparc-sol2-tdep.o sparc-tdep.o sparc-ravenscar-thread.o \
704 spu-tdep.o spu-multiarch.o solib-spu.o \
705 tic6x-tdep.o tic6x-linux-tdep.o \
706 tilegx-tdep.o tilegx-linux-tdep.o \
707 v850-tdep.o \
708 vaxnbsd-tdep.o vaxobsd-tdep.o vax-tdep.o \
709 xstormy16-tdep.o \
710 xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
711 glibc-tdep.o \
712 bsd-uthread.o \
713 nbsd-tdep.o obsd-tdep.o \
714 sol2-tdep.o \
715 solib-frv.o solib-svr4.o \
716 solib-darwin.o solib-dsbt.o \
717 xcoffread.o \
718 symfile-mem.o \
719 windows-tdep.o \
720 linux-record.o \
721 ravenscar-thread.o
722
723 # Host-dependent makefile fragment comes in here.
724 @host_makefile_frag@
725 # End of host-dependent makefile fragment
726
727 FLAGS_TO_PASS = \
728 "prefix=$(prefix)" \
729 "exec_prefix=$(exec_prefix)" \
730 "infodir=$(infodir)" \
731 "datarootdir=$(datarootdir)" \
732 "docdir=$(docdir)" \
733 "htmldir=$(htmldir)" \
734 "pdfdir=$(pdfdir)" \
735 "libdir=$(libdir)" \
736 "mandir=$(mandir)" \
737 "datadir=$(datadir)" \
738 "includedir=$(includedir)" \
739 "against=$(against)" \
740 "DESTDIR=$(DESTDIR)" \
741 "AR=$(AR)" \
742 "AR_FLAGS=$(AR_FLAGS)" \
743 "CC=$(CC)" \
744 "CFLAGS=$(CFLAGS)" \
745 "CXX=$(CXX)" \
746 "CXX_DIALECT=$(CXX_DIALECT)" \
747 "CXXFLAGS=$(CXXFLAGS)" \
748 "DLLTOOL=$(DLLTOOL)" \
749 "LDFLAGS=$(LDFLAGS)" \
750 "RANLIB=$(RANLIB)" \
751 "MAKEINFO=$(MAKEINFO)" \
752 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
753 "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
754 "MAKEHTML=$(MAKEHTML)" \
755 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
756 "INSTALL=$(INSTALL)" \
757 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
758 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
759 "INSTALL_DATA=$(INSTALL_DATA)" \
760 "RUNTEST=$(RUNTEST)" \
761 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
762
763 # Flags that we pass when building the testsuite.
764
765 # empty for native, $(target_alias)/ for cross
766 target_subdir = @target_subdir@
767
768 CC_FOR_TARGET = ` \
769 if [ -f $${rootme}/../gcc/xgcc ] ; then \
770 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
771 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/; \
772 else \
773 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
774 fi; \
775 else \
776 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
777 echo $(CC); \
778 else \
779 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
780 fi; \
781 fi`
782
783 CXX_FOR_TARGET = ` \
784 if [ -f $${rootme}/../gcc/xg++ ] ; then \
785 if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
786 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/; \
787 else \
788 echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
789 fi; \
790 else \
791 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
792 echo $(CXX); \
793 else \
794 t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
795 fi; \
796 fi`
797
798 # The use of $$(x_FOR_TARGET) reduces the command line length by not
799 # duplicating the lengthy definition.
800 TARGET_FLAGS_TO_PASS = \
801 "prefix=$(prefix)" \
802 "exec_prefix=$(exec_prefix)" \
803 "against=$(against)" \
804 'CC=$$(CC_FOR_TARGET)' \
805 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
806 "CFLAGS=$(CFLAGS)" \
807 'CXX=$$(CXX_FOR_TARGET)' \
808 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
809 "CXXFLAGS=$(CXXFLAGS)" \
810 "INSTALL=$(INSTALL)" \
811 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
812 "INSTALL_DATA=$(INSTALL_DATA)" \
813 "MAKEINFO=$(MAKEINFO)" \
814 "MAKEHTML=$(MAKEHTML)" \
815 "RUNTEST=$(RUNTEST)" \
816 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
817 "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
818 "TESTS=$(TESTS)"
819
820 # All source files that go into linking GDB.
821 # Links made at configuration time should not be specified here, since
822 # SFILES is used in building the distribution archive.
823
824 SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
825 ada-varobj.c \
826 addrmap.c auto-load.c \
827 auxv.c ax-general.c ax-gdb.c \
828 agent.c \
829 bcache.c \
830 bfd-target.c \
831 block.c blockframe.c \
832 breakpoint.c break-catch-sig.c break-catch-throw.c \
833 break-catch-syscall.c \
834 build-id.c buildsym.c \
835 c-exp.y c-lang.c c-typeprint.c c-valprint.c c-varobj.c \
836 charset.c common/cleanups.c cli-out.c coffread.c coff-pe-read.c \
837 complaints.c completer.c continuations.c corefile.c corelow.c \
838 cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
839 d-exp.y d-lang.c d-namespace.c d-valprint.c \
840 cp-name-parser.y \
841 dbxread.c demangle.c dictionary.c disasm.c doublest.c \
842 dtrace-probe.c dummy-frame.c \
843 dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \
844 dwarf2-frame-tailcall.c \
845 elfread.c environ.c eval.c event-loop.c event-top.c \
846 exceptions.c expprint.c extension.c \
847 f-exp.y f-lang.c f-typeprint.c f-valprint.c filesystem.c \
848 findcmd.c findvar.c frame.c frame-base.c frame-unwind.c \
849 gdbarch.c arch-utils.c gdb_bfd.c gdb_obstack.c \
850 gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
851 go-exp.y go-lang.c go-typeprint.c go-valprint.c \
852 inf-loop.c \
853 infcall.c \
854 infcmd.c inflow.c infrun.c \
855 inline-frame.c \
856 interps.c \
857 language.c linespec.c location.c minidebug.c \
858 m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \
859 macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \
860 mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c memory-map.c \
861 memrange.c mi/mi-common.c \
862 namespace.c \
863 objc-lang.c \
864 objfiles.c osabi.c observer.c osdata.c \
865 opencl-lang.c \
866 p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
867 proc-service.list progspace.c \
868 prologue-value.c psymtab.c \
869 regcache.c reggroups.c remote.c remote-fileio.c remote-notif.c reverse.c \
870 rust-exp.y rust-lang.c \
871 selftest.c sentinel-frame.c \
872 serial.c ser-base.c ser-unix.c ser-event.c skip.c \
873 solib.c solib-target.c source.c \
874 stabsread.c stack.c probe.c stap-probe.c std-regs.c \
875 symfile.c symfile-debug.c symfile-mem.c symmisc.c symtab.c \
876 target.c target-dcache.c target-descriptions.c target-memory.c \
877 tid-parse.c thread.c top.c tracepoint.c \
878 trad-frame.c \
879 tramp-frame.c \
880 typeprint.c \
881 ui-out.c utils.c ui-file.h ui-file.c \
882 user-regs.c \
883 valarith.c valops.c valprint.c value.c varobj.c common/vec.c \
884 xml-tdesc.c xml-support.c \
885 inferior.c gdb_usleep.c \
886 record.c record-full.c gcore.c \
887 jit.c \
888 xml-syscall.c \
889 annotate.c common/signals.c copying.c dfp.c gdb.c inf-child.c \
890 sol-thread.c stub-termcap.c \
891 common/gdb_vecs.c common/common-utils.c common/xml-utils.c \
892 common/ptid.c common/buffer.c gdb-dlfcn.c common/agent.c \
893 common/format.c common/filestuff.c btrace.c record-btrace.c ctf.c \
894 target/waitstatus.c common/print-utils.c common/rsp-low.c \
895 common/errors.c common/common-debug.c common/common-exceptions.c \
896 common/btrace-common.c common/fileio.c common/common-regcache.c \
897 common/signals-state-save-restore.c common/new-op.c \
898 $(SUBDIR_GCC_COMPILE_SRCS)
899
900 LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
901
902 # Header files that need to have srcdir added. Note that in the cases
903 # where we use a macro like $(gdbcmd_h), things are carefully arranged
904 # so that each .h file is listed exactly once (M-x tags-search works
905 # wrong if TAGS has files twice). Because this is tricky to get
906 # right, it is probably easiest just to list .h files here directly.
907
908 HFILES_NO_SRCDIR = \
909 common/gdb_signals.h nat/gdb_thread_db.h common/gdb_vecs.h \
910 common/x86-xstate.h nat/linux-ptrace.h nat/mips-linux-watch.h \
911 proc-utils.h aarch64-tdep.h arc-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \
912 ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \
913 exec.h m32r-tdep.h osabi.h gdbcore.h x86bsd-nat.h \
914 i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
915 ia64-tdep.h ada-lang.h varobj.h varobj-iter.h frv-tdep.h \
916 nto-tdep.h serial.h \
917 c-lang.h d-lang.h go-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \
918 cli/cli-decode.h cli/cli-cmds.h cli/cli-utils.h \
919 cli/cli-script.h macrotab.h symtab.h common/version.h \
920 compile/compile.h gnulib/import/string.in.h gnulib/import/str-two-way.h \
921 gnulib/import/stdint.in.h remote.h remote-notif.h gdb.h sparc-nat.h \
922 gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
923 amd64-nat.h s390-linux-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
924 gdbarch.h bsd-uthread.h memory-map.h memrange.h obsd-nat.h \
925 mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
926 ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
927 f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
928 objfiles.h common/vec.h disasm.h mips-tdep.h ser-base.h \
929 gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \
930 inflow.h fbsd-nat.h ia64-libunwind-tdep.h completer.h \
931 solib-target.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \
932 m2-lang.h stack.h charset.h addrmap.h command.h solist.h source.h \
933 target.h target-dcache.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \
934 tui/tui-file.h tui/tui-command.h tui/tui-disasm.h tui/tui-wingeneral.h \
935 tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \
936 tui/tui-winsource.h tui/tui-regs.h tui/tui-io.h tui/tui-layout.h \
937 tui/tui-source.h sol2-tdep.h gregset.h sh-tdep.h sh64-tdep.h \
938 expression.h score-tdep.h gdb_select.h ser-tcp.h \
939 extension.h extension-priv.h nat/aarch64-linux-hw-point.h \
940 build-id.h buildsym.h valprint.h nat/aarch64-linux.h \
941 typeprint.h mi/mi-getopt.h mi/mi-parse.h mi/mi-console.h \
942 mi/mi-out.h mi/mi-main.h mi/mi-common.h mi/mi-cmds.h linux-nat.h \
943 complaints.h gdb_proc_service.h gdb_regex.h xtensa-tdep.h inf-loop.h \
944 common/gdb_wait.h common/gdb_assert.h solib.h ppc-tdep.h cp-support.h glibc-tdep.h \
945 interps.h auxv.h gdbcmd.h tramp-frame.h mipsnbsd-tdep.h \
946 amd64-linux-tdep.h linespec.h location.h i387-tdep.h mn10300-tdep.h \
947 sparc64-tdep.h ppcobsd-tdep.h \
948 coff-pe-read.h parser-defs.h gdb_ptrace.h mips-linux-tdep.h \
949 m68k-tdep.h spu-tdep.h environ.h amd64-tdep.h \
950 doublest.h regset.h hppa-tdep.h ppc-linux-tdep.h ppc64-tdep.h \
951 rs6000-tdep.h rs6000-aix-tdep.h \
952 common/gdb_locale.h arch-utils.h trad-frame.h gnu-nat.h \
953 language.h nbsd-tdep.h solib-svr4.h \
954 macroexp.h ui-file.h regcache.h tracepoint.h tracefile.h i386-tdep.h \
955 inf-child.h p-lang.h event-top.h gdbtypes.h user-regs.h \
956 regformats/regdef.h config/i386/nm-i386gnu.h \
957 config/i386/nm-fbsd.h \
958 config/nm-nto.h config/sparc/nm-sol2.h config/nm-linux.h \
959 top.h bsd-kvm.h gdb-stabs.h reggroups.h \
960 annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h \
961 remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
962 sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
963 gdb_usleep.h jit.h xml-syscall.h microblaze-tdep.h \
964 psymtab.h psympriv.h progspace.h bfin-tdep.h \
965 amd64-darwin-tdep.h charset-list.h \
966 config/djgpp/langinfo.h config/djgpp/nl_types.h darwin-nat.h \
967 dicos-tdep.h filesystem.h gcore.h gdb_wchar.h hppabsd-tdep.h \
968 i386-darwin-tdep.h x86-nat.h linux-record.h moxie-tdep.h nios2-tdep.h \
969 ft32-tdep.h nds32-tdep.h \
970 osdata.h procfs.h python/py-event.h python/py-events.h python/py-stopevent.h \
971 python/python-internal.h python/python.h ravenscar-thread.h record.h \
972 record-full.h solib-aix.h \
973 solib-darwin.h solib-spu.h windows-nat.h xcoffread.h \
974 gnulib/import/extra/snippet/arg-nonnull.h gnulib/import/extra/snippet/c++defs.h \
975 gnulib/import/extra/snippet/warn-on-use.h \
976 gnulib/import/stddef.in.h gnulib/import/inttypes.in.h inline-frame.h skip.h \
977 common/common-utils.h common/xml-utils.h common/buffer.h common/ptid.h \
978 common/format.h common/host-defs.h utils.h common/queue.h \
979 nat/linux-osdata.h gdb-dlfcn.h auto-load.h probe.h stap-probe.h \
980 gdb_bfd.h sparc-ravenscar-thread.h ppc-ravenscar-thread.h nat/linux-btrace.h \
981 nat/ppc-linux.h ctf.h nat/x86-cpuid.h nat/x86-gcc-cpuid.h target/resume.h \
982 target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \
983 common/print-utils.h common/rsp-low.h nat/x86-dregs.h x86-linux-nat.h \
984 i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h \
985 common/common-debug.h common/cleanups.h common/gdb_setjmp.h \
986 common/common-exceptions.h target/target.h common/symbol.h \
987 common/common-regcache.h fbsd-tdep.h nat/linux-personality.h \
988 common/fileio.h nat/x86-linux.h nat/x86-linux-dregs.h nat/amd64-linux-siginfo.h\
989 nat/linux-namespaces.h arch/arm.h common/gdb_sys_time.h arch/aarch64-insn.h \
990 tid-parse.h ser-event.h \
991 common/signals-state-save-restore.h
992
993 # Header files that already have srcdir in them, or which are in objdir.
994
995 HFILES_WITH_SRCDIR = ../bfd/bfd.h jit-reader.h
996
997
998 # GDB "info" files, which should be included in their entirety
999 INFOFILES = gdb.info*
1000
1001 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1002 # default their values the way we do for SER_HARDWIRE; in the future
1003 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1004 # variables analogous to SER_HARDWIRE which get defaulted in this
1005 # Makefile.in
1006
1007 DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) \
1008 $(REMOTE_OBS) $(SIM_OBS)
1009
1010 SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS)
1011 # Don't include YYFILES (*.c) because we already include *.y in SFILES,
1012 # and it's more useful to see it in the .y file.
1013 TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
1014 $(CONFIG_SRCS)
1015 TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
1016
1017 COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
1018 version.o \
1019 annotate.o \
1020 addrmap.o \
1021 auto-load.o auxv.o \
1022 agent.o \
1023 bfd-target.o \
1024 blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o \
1025 break-catch-syscall.o \
1026 findvar.o regcache.o cleanups.o \
1027 charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o \
1028 source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o \
1029 block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o \
1030 linespec.o dictionary.o namespace.o \
1031 location.o infcall.o \
1032 infcmd.o infrun.o \
1033 expprint.o environ.o stack.o tid-parse.o thread.o thread-fsm.o \
1034 exceptions.o \
1035 extension.o \
1036 filesystem.o \
1037 filestuff.o \
1038 inf-child.o \
1039 interps.o \
1040 minidebug.o \
1041 main.o \
1042 macrotab.o macrocmd.o macroexp.o macroscope.o \
1043 mi-common.o \
1044 event-loop.o event-top.o inf-loop.o completer.o \
1045 gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o \
1046 osabi.o copying.o \
1047 memattr.o mem-break.o target.o target-dcache.o parse.o language.o \
1048 build-id.o buildsym.o \
1049 findcmd.o \
1050 std-regs.o \
1051 signals-state-save-restore.o \
1052 signals.o \
1053 exec.o reverse.o \
1054 bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \
1055 dbxread.o coffread.o coff-pe-read.o \
1056 dwarf2read.o mipsread.o stabsread.o corefile.o \
1057 dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o \
1058 ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o \
1059 ada-tasks.o ada-varobj.o c-varobj.o \
1060 ui-out.o cli-out.o \
1061 varobj.o vec.o \
1062 go-lang.o go-valprint.o go-typeprint.o \
1063 m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o \
1064 selftest.o sentinel-frame.o \
1065 complaints.o typeprint.o \
1066 ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o \
1067 ada-valprint.o c-valprint.o cp-valprint.o d-valprint.o f-valprint.o \
1068 m2-valprint.o \
1069 ser-event.o serial.o mdebugread.o top.o utils.o utils-selftests.o \
1070 ui-file.o \
1071 user-regs.o \
1072 frame.o frame-unwind.o doublest.o \
1073 frame-base.o \
1074 inline-frame.o \
1075 gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
1076 cp-namespace.o d-namespace.o \
1077 reggroups.o \
1078 rust-lang.o \
1079 trad-frame.o \
1080 tramp-frame.o \
1081 solib.o solib-target.o \
1082 prologue-value.o memory-map.o memrange.o \
1083 xml-support.o xml-syscall.o xml-utils.o \
1084 target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
1085 inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o \
1086 gdb_vecs.o jit.o progspace.o skip.o probe.o \
1087 common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o \
1088 format.o registry.o btrace.o record-btrace.o waitstatus.o \
1089 print-utils.o rsp-low.o errors.o common-debug.o debug.o \
1090 common-exceptions.o btrace-common.o fileio.o \
1091 common-regcache.o new-op.o \
1092 $(SUBDIR_GCC_COMPILE_OBS)
1093
1094 TSOBS = inflow.o
1095
1096 SUBDIRS = doc @subdirs@ data-directory $(GNULIB_BUILDDIR)
1097 CLEANDIRS = $(SUBDIRS)
1098
1099 # List of subdirectories in the build tree that must exist.
1100 # This is used to force build failures in existing trees when
1101 # a new directory is added.
1102 # The format here is for the `case' shell command.
1103 REQUIRED_SUBDIRS = doc | testsuite | $(GNULIB_BUILDDIR) | data-directory
1104
1105 # For now, shortcut the "configure GDB for fewer languages" stuff.
1106 YYFILES = c-exp.c \
1107 cp-name-parser.c \
1108 ada-lex.c \
1109 ada-exp.c \
1110 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
1111 YYOBJ = c-exp.o \
1112 cp-name-parser.o \
1113 ada-exp.o \
1114 d-exp.o f-exp.o go-exp.o m2-exp.o p-exp.o rust-exp.o
1115
1116 # Things which need to be built when making a distribution.
1117
1118 DISTSTUFF = $(YYFILES)
1119
1120
1121 # All generated files which can be included by another file.
1122 generated_files = config.h observer.h observer.inc ada-lex.c jit-reader.h \
1123 $(GNULIB_H) $(NAT_GENERATED_FILES) gcore
1124
1125 # Flags needed to compile Python code
1126 PYTHON_CFLAGS=@PYTHON_CFLAGS@
1127
1128 all: gdb$(EXEEXT) $(CONFIG_ALL)
1129 @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
1130
1131 # Rule for compiling .c files in the top-level gdb directory.
1132 %.o: %.c
1133 $(COMPILE) $<
1134 $(POSTCOMPILE)
1135
1136 # Rules for compiling .c files in the various source subdirectories.
1137 %.o: ${srcdir}/arch/%.c
1138 $(COMPILE) $<
1139 $(POSTCOMPILE)
1140
1141 %.o: $(srcdir)/cli/%.c
1142 $(COMPILE) $<
1143 $(POSTCOMPILE)
1144
1145 %.o: ${srcdir}/common/%.c
1146 $(COMPILE) $<
1147 $(POSTCOMPILE)
1148
1149 %.o: $(srcdir)/compile/%.c
1150 $(COMPILE) $<
1151 $(POSTCOMPILE)
1152
1153 %.o: $(srcdir)/gdbtk/generic/%.c
1154 $(COMPILE) $(all_gdbtk_cflags) $<
1155 $(POSTCOMPILE)
1156
1157 %.o: $(srcdir)/guile/%.c
1158 $(COMPILE) $<
1159 $(POSTCOMPILE)
1160
1161 %.o: $(srcdir)/mi/%.c
1162 $(COMPILE) $<
1163
1164 %.o: ${srcdir}/nat/%.c
1165 $(COMPILE) $<
1166 $(POSTCOMPILE)
1167
1168 %.o: $(srcdir)/python/%.c
1169 $(COMPILE) $(PYTHON_CFLAGS) $<
1170 $(POSTCOMPILE)
1171
1172 %.o: ${srcdir}/target/%.c
1173 $(COMPILE) $<
1174 $(POSTCOMPILE)
1175
1176 %.o: $(srcdir)/tui/%.c
1177 $(COMPILE) $<
1178 $(POSTCOMPILE)
1179
1180 # Specify an explicit rule for gdb/common/agent.c, to avoid a clash with the
1181 # object file generate by gdb/agent.c.
1182 common-agent.o: $(srcdir)/common/agent.c
1183 $(COMPILE) $(srcdir)/common/agent.c
1184 $(POSTCOMPILE)
1185
1186 installcheck:
1187
1188 # The check target can not use subdir_do, because subdir_do does not
1189 # use TARGET_FLAGS_TO_PASS.
1190 check: force
1191 @if [ -f testsuite/Makefile ]; then \
1192 rootme=`pwd`; export rootme; \
1193 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1194 cd testsuite; \
1195 $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
1196 else true; fi
1197
1198 check-perf: force
1199 @if [ -f testsuite/Makefile ]; then \
1200 rootme=`pwd`; export rootme; \
1201 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1202 cd testsuite; \
1203 $(MAKE) $(TARGET_FLAGS_TO_PASS) check-perf; \
1204 else true; fi
1205
1206 check-read1: force
1207 @if [ -f testsuite/Makefile ]; then \
1208 rootme=`pwd`; export rootme; \
1209 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1210 cd testsuite; \
1211 $(MAKE) $(TARGET_FLAGS_TO_PASS) check-read1; \
1212 else true; fi
1213
1214 check-parallel: force
1215 @if [ -f testsuite/Makefile ]; then \
1216 rootme=`pwd`; export rootme; \
1217 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1218 cd testsuite; \
1219 $(MAKE) $(TARGET_FLAGS_TO_PASS) check-parallel; \
1220 else true; fi
1221
1222 # The idea is to parallelize testing of multilibs, for example:
1223 # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1224 # will run 3 concurrent sessions of check, eventually testing all 10
1225 # combinations. GNU make is required for the % pattern to work, as is
1226 # a shell that expands alternations within braces. If GNU make is not
1227 # used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to
1228 # prevent serialized checking due to the passed RUNTESTFLAGS.
1229 # FIXME: use config.status --config not --version, when available.
1230 check//%: force
1231 @if [ -f testsuite/config.status ]; then \
1232 rootme=`pwd`; export rootme; \
1233 rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1234 target=`echo "$@" | sed 's,//.*,,'`; \
1235 variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
1236 vardots=`echo "$$variant" | sed 's,/,.,g'`; \
1237 testdir=testsuite.$$vardots; \
1238 if [ ! -f $$testdir/Makefile ] && [ -f testsuite/config.status ]; then \
1239 configargs=`cd testsuite && ./config.status --version | \
1240 sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
1241 $(SHELL) $(srcdir)/../mkinstalldirs $$testdir && \
1242 (cd $$testdir && \
1243 eval $(SHELL) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
1244 "\"--srcdir=\$$rootsrc/testsuite\"" \
1245 ); \
1246 else :; fi && cd $$testdir && \
1247 $(MAKE) $(TARGET_FLAGS_TO_PASS) \
1248 RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
1249 FORCE_PARALLEL=$(if $(FORCE_PARALLEL),1,$(if $(RUNTESTFLAGS),,1)) \
1250 "$$target"; \
1251 else true; fi
1252
1253 # The set of headers checked by 'check-headers' by default.
1254 CHECK_HEADERS = $(HFILES_NO_SRCDIR)
1255
1256 # Try to compile each header in isolation, thus ensuring headers are
1257 # self-contained.
1258 #
1259 # Defaults to checking all $HFILES_NO_SRCDIR headers.
1260 #
1261 # Do:
1262 #
1263 # make check-headers CHECK_HEADERS="header.h list.h"
1264 #
1265 # to check specific headers.
1266 #
1267 check-headers:
1268 @echo Checking headers.
1269 for i in $(CHECK_HEADERS) ; do \
1270 $(CC) -x c -c -fsyntax-only $(INTERNAL_CFLAGS) \
1271 -include defs.h $(srcdir)/$$i ; \
1272 done
1273 .PHONY: check-headers
1274
1275 info install-info clean-info dvi pdf install-pdf html install-html: force
1276 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
1277
1278 # Traditionally "install" depends on "all". But it may be useful
1279 # not to; for example, if the user has made some trivial change to a
1280 # source file and doesn't care about rebuilding or just wants to save the
1281 # time it takes for make to check that all is up to date.
1282 # install-only is intended to address that need.
1283 install: all
1284 @$(MAKE) $(FLAGS_TO_PASS) install-only
1285
1286 install-only: $(CONFIG_INSTALL)
1287 transformed_name=`t='$(program_transform_name)'; \
1288 echo gdb | sed -e "$$t"` ; \
1289 if test "x$$transformed_name" = x; then \
1290 transformed_name=gdb ; \
1291 else \
1292 true ; \
1293 fi ; \
1294 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
1295 $(INSTALL_PROGRAM) gdb$(EXEEXT) \
1296 $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
1297 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
1298 $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
1299 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
1300 then \
1301 transformed_name=`t='$(program_transform_name)'; \
1302 echo gcore | sed -e "$$t"` ; \
1303 if test "x$$transformed_name" = x; then \
1304 transformed_name=gcore ; \
1305 else \
1306 true ; \
1307 fi ; \
1308 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
1309 $(INSTALL_SCRIPT) gcore \
1310 $(DESTDIR)$(bindir)/$$transformed_name; \
1311 fi
1312 @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
1313
1314 install-strip:
1315 $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1316 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1317 `test -z '$(STRIP)' || \
1318 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
1319
1320 install-guile:
1321 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/guile/gdb
1322
1323 install-python:
1324 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
1325
1326 uninstall: force $(CONFIG_UNINSTALL)
1327 transformed_name=`t='$(program_transform_name)'; \
1328 echo gdb | sed -e $$t` ; \
1329 if test "x$$transformed_name" = x; then \
1330 transformed_name=gdb ; \
1331 else \
1332 true ; \
1333 fi ; \
1334 rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
1335 $(DESTDIR)$(man1dir)/$$transformed_name.1
1336 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
1337 then \
1338 transformed_name=`t='$(program_transform_name)'; \
1339 echo gcore | sed -e "$$t"` ; \
1340 if test "x$$transformed_name" = x; then \
1341 transformed_name=gcore ; \
1342 else \
1343 true ; \
1344 fi ; \
1345 rm -f $(DESTDIR)$(bindir)/$$transformed_name; \
1346 fi
1347 @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
1348
1349 # The C++ name parser can be built standalone for testing.
1350 test-cp-name-parser.o: cp-name-parser.c
1351 $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
1352 $(POSTCOMPILE)
1353
1354 test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
1355 $(CC_LD) $(INTERNAL_LDFLAGS) -o test-cp-name-parser$(EXEEXT) \
1356 test-cp-name-parser.o $(LIBIBERTY)
1357
1358 # We do this by grepping through sources. If that turns out to be too slow,
1359 # maybe we could just require every .o file to have an initialization routine
1360 # of a given name (top.o -> _initialize_top, etc.).
1361 #
1362 # Formatting conventions: The name of the _initialize_* routines must start
1363 # in column zero, and must not be inside #if.
1364 #
1365 # Note that the set of files with init functions might change, or the names
1366 # of the functions might change, so this files needs to depend on all the
1367 # object files that will be linked into gdb.
1368
1369 # FIXME: There is a problem with this approach - init.c may force
1370 # unnecessary files to be linked in.
1371
1372 # FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that
1373 # the first call is to _initialize_gdbtypes (implemented by explicitly
1374 # putting that function's name first in the init.l-tmp file). This is
1375 # a hack to ensure that all the architecture dependant global
1376 # builtin_type_* variables are initialized before anything else
1377 # (per-architecture code is called in the same order that it is
1378 # registered). The ``correct fix'' is to have all the builtin types
1379 # made part of the architecture and initialize them on-demand (using
1380 # gdbarch_data) just like everything else. The catch is that other
1381 # modules still take the address of these builtin types forcing them
1382 # to be variables, sigh!
1383
1384 # NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is
1385 # anchored on the first column and excludes the ``/'' character so
1386 # that it doesn't add the $(srcdir) prefix to any file that already
1387 # has an absolute path. It turns out that $(DEC)'s True64 make
1388 # automatically adds the $(srcdir) prefixes when it encounters files
1389 # in sub-directories such as cli/ and mi/.
1390
1391 # NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates
1392 # duplicates. Files in the gdb/ directory can end up appearing in
1393 # COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file).
1394
1395 INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS) $(SUBDIR_GCC_COMPILE_SRCS)
1396 init.c: $(INIT_FILES)
1397 @echo Making init.c
1398 @rm -f init.c-tmp init.l-tmp
1399 @touch init.c-tmp
1400 @echo gdbtypes > init.l-tmp
1401 @-LANG=C ; export LANG ; \
1402 LC_ALL=C ; export LC_ALL ; \
1403 echo $(INIT_FILES) | \
1404 tr ' ' '\012' | \
1405 sed \
1406 -e '/^gdbtypes.[co]$$/d' \
1407 -e '/^init.[co]$$/d' \
1408 -e '/xdr_ld.[co]$$/d' \
1409 -e '/xdr_ptrace.[co]$$/d' \
1410 -e '/xdr_rdb.[co]$$/d' \
1411 -e '/udr.[co]$$/d' \
1412 -e '/udip2soc.[co]$$/d' \
1413 -e '/udi2go32.[co]$$/d' \
1414 -e '/version.[co]$$/d' \
1415 -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
1416 -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \
1417 -e 's/-exp\.o$$/-exp.y/' \
1418 -e 's/\.[co]$$/.c/' \
1419 -e 's,signals\.c,common/signals\.c,' \
1420 -e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \
1421 while read f; do \
1422 sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \
1423 done | \
1424 while read f; do \
1425 case " $$fs " in \
1426 *" $$f "* ) ;; \
1427 * ) echo $$f ; fs="$$fs $$f";; \
1428 esac; \
1429 done >> init.l-tmp
1430 @echo '/* Do not modify this file. */' >>init.c-tmp
1431 @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
1432 @echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp
1433 @echo 'extern void initialize_all_files(void);' >>init.c-tmp
1434 @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp >>init.c-tmp
1435 @echo 'void' >>init.c-tmp
1436 @echo 'initialize_all_files (void)' >>init.c-tmp
1437 @echo '{' >>init.c-tmp
1438 @sed -e 's/\(.*\)/ _initialize_\1 ();/' <init.l-tmp >>init.c-tmp
1439 @echo '}' >>init.c-tmp
1440 @rm init.l-tmp
1441 @mv init.c-tmp init.c
1442
1443 .PRECIOUS: init.c
1444
1445 # Create a library of the gdb object files and build GDB by linking
1446 # against that.
1447 #
1448 # init.o is very important. It pulls in the rest of GDB.
1449 LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o
1450 libgdb.a: $(LIBGDB_OBS)
1451 -rm -f libgdb.a
1452 $(AR) q libgdb.a $(LIBGDB_OBS)
1453 $(RANLIB) libgdb.a
1454
1455 # Removing the old gdb first works better if it is running, at least on SunOS.
1456 gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
1457 rm -f gdb$(EXEEXT)
1458 $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
1459 -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
1460 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
1461
1462 # Convenience rule to handle recursion.
1463 $(LIBGNU) $(GNULIB_H): all-lib
1464 all-lib: $(GNULIB_BUILDDIR)/Makefile
1465 @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=$(GNULIB_BUILDDIR) subdir_do
1466 .PHONY: all-lib
1467
1468 # Convenience rule to handle recursion.
1469 .PHONY: all-data-directory
1470 all-data-directory: data-directory/Makefile
1471 @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=data-directory subdir_do
1472
1473 # This is useful when debugging GDB, because some Unix's don't let you run GDB
1474 # on itself without copying the executable. So "make gdb1" will make
1475 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
1476 # Removing gdb1 before the copy is the right thing if gdb1 is open
1477 # in another process.
1478 gdb1$(EXEEXT): gdb$(EXEEXT)
1479 rm -f gdb1$(EXEEXT)
1480 cp gdb$(EXEEXT) gdb1$(EXEEXT)
1481
1482 # Put the proper machine-specific files first, so M-. on a machine
1483 # specific routine gets the one for the correct machine. (FIXME: those
1484 # files go in twice; we should be removing them from the main list).
1485
1486 # TAGS depends on all the files that go into it so you can rebuild TAGS
1487 # with `make TAGS' and not have to say `rm TAGS' first.
1488
1489 GDB_NM_FILE = @GDB_NM_FILE@
1490 TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
1491 @echo Making TAGS
1492 etags `(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
1493 `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
1494 echo $(srcdir)/$$i ; \
1495 done ; for i in $(TAGFILES_WITH_SRCDIR); do \
1496 echo $$i ; \
1497 done) | sed -e 's/\.o$$/\.c/'` \
1498 `find $(srcdir)/config -name '*.h' -print`
1499
1500 tags: TAGS
1501
1502 clean mostlyclean: $(CONFIG_CLEAN)
1503 @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
1504 rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp
1505 rm -f init.c version.c observer.h observer.inc
1506 rm -f gdb$(EXEEXT) core make.log
1507 rm -f gdb[0-9]$(EXEEXT)
1508 rm -f test-cp-name-parser$(EXEEXT)
1509 rm -f xml-builtin.c stamp-xml
1510 rm -f $(DEPDIR)/*
1511
1512 # This used to depend on c-exp.c m2-exp.c TAGS
1513 # I believe this is wrong; the makefile standards for distclean just
1514 # describe removing files; the only sort of "re-create a distribution"
1515 # functionality described is if the distributed files are unmodified.
1516 # NB: While GDBSERVER might be configured on native systems, it isn't
1517 # always included in SUBDIRS. Remove the gdbserver files explicitly.
1518 distclean: clean
1519 @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
1520 rm -rf $(GNULIB_BUILDDIR)
1521 rm -f gdbserver/config.status gdbserver/config.log
1522 rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h
1523 rm -f gdbserver/Makefile gdbserver/config.cache
1524 rm -f nm.h config.status config.h stamp-h gdb-gdb.gdb jit-reader.h
1525 rm -f y.output yacc.acts yacc.tmp y.tab.h
1526 rm -f config.log config.cache
1527 rm -f Makefile
1528 rm -rf $(DEPDIR)
1529
1530 maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
1531 realclean: maintainer-clean
1532
1533 local-maintainer-clean:
1534 @echo "This command is intended for maintainers to use;"
1535 @echo "it deletes files that may require special tools to rebuild."
1536 rm -f c-exp.c \
1537 cp-name-parser.c \
1538 ada-lex.c ada-exp.c \
1539 d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
1540 rm -f TAGS $(INFOFILES)
1541 rm -f $(YYFILES)
1542 rm -f nm.h config.status
1543
1544 do-maintainer-clean:
1545 @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(CLEANDIRS)" \
1546 subdir_do
1547
1548 diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
1549 cd doc; $(MAKE) $(MFLAGS) diststuff
1550
1551 subdir_do: force
1552 @for i in $(DODIRS); do \
1553 case $$i in \
1554 $(REQUIRED_SUBDIRS)) \
1555 if [ ! -f ./$$i/Makefile ] ; then \
1556 echo "Missing $$i/Makefile" >&2 ; \
1557 exit 1 ; \
1558 fi ;; \
1559 esac ; \
1560 if [ -f ./$$i/Makefile ] ; then \
1561 if (cd ./$$i; \
1562 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1563 else exit 1 ; fi ; \
1564 else true ; fi ; \
1565 done
1566
1567 Makefile: Makefile.in config.status @frags@
1568 # Regenerate the Makefile and the tm.h / nm.h links.
1569 CONFIG_FILES="Makefile" \
1570 CONFIG_COMMANDS= \
1571 CONFIG_HEADERS= \
1572 $(SHELL) config.status
1573
1574 $(GNULIB_BUILDDIR)/Makefile: gnulib/Makefile.in config.status @frags@
1575 @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
1576 CONFIG_COMMANDS="depfiles" \
1577 CONFIG_HEADERS= \
1578 CONFIG_LINKS= \
1579 $(SHELL) config.status
1580
1581 data-directory/Makefile: data-directory/Makefile.in config.status @frags@
1582 CONFIG_FILES="data-directory/Makefile" \
1583 CONFIG_COMMANDS="depfiles" \
1584 CONFIG_HEADERS= \
1585 CONFIG_LINKS= \
1586 $(SHELL) config.status
1587
1588 .PHONY: run
1589 run: Makefile
1590 ./gdb$(EXEEXT) --data-directory=`pwd`/data-directory $(GDBFLAGS)
1591
1592 jit-reader.h: $(srcdir)/jit-reader.in
1593 $(SHELL) config.status $@
1594
1595 gcore: $(srcdir)/gcore.in
1596 $(SHELL) config.status $@
1597
1598 config.h: stamp-h ; @true
1599 stamp-h: $(srcdir)/config.in config.status
1600 CONFIG_HEADERS=config.h:config.in \
1601 CONFIG_COMMANDS="default depdir" \
1602 CONFIG_FILES= \
1603 CONFIG_LINKS= \
1604 $(SHELL) config.status
1605
1606 config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh
1607 $(SHELL) config.status --recheck
1608
1609 ACLOCAL = aclocal
1610 ACLOCAL_AMFLAGS = -I ../config
1611
1612 # Keep these in sync with the includes in acinclude.m4.
1613 aclocal_m4_deps = \
1614 configure.ac \
1615 acx_configure_dir.m4 \
1616 libmcheck.m4 \
1617 transform.m4 \
1618 ../bfd/bfd.m4 \
1619 ../config/acinclude.m4 \
1620 ../config/plugins.m4 \
1621 ../config/lead-dot.m4 \
1622 ../config/override.m4 \
1623 ../config/largefile.m4 \
1624 ../config/gettext-sister.m4 \
1625 ../config/lib-ld.m4 \
1626 ../config/lib-prefix.m4 \
1627 ../config/lib-link.m4 \
1628 ../config/acx.m4 \
1629 ../config/tcl.m4 \
1630 ../config/depstand.m4 \
1631 ../config/lcmessage.m4 \
1632 ../config/codeset.m4 \
1633 ../config/zlib.m4
1634
1635 $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
1636 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
1637
1638 AUTOCONF = autoconf
1639 configure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
1640 $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(configure_deps)
1641 cd $(srcdir) && $(AUTOCONF)
1642
1643 AUTOHEADER = autoheader
1644 $(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(configure_deps)
1645 cd $(srcdir) && $(AUTOHEADER)
1646 rm -f stamp-h
1647 touch $@
1648
1649 # automatic rebuilding in automake-generated Makefiles requires
1650 # this rule in the toplevel Makefile, which, with GNU make, causes
1651 # the desired updates through the implicit regeneration of the Makefile
1652 # and all of its prerequisites.
1653 am--refresh:
1654 @:
1655
1656 force:
1657
1658 # Documentation!
1659 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
1660 doc/refcard.dvi:
1661 cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS)
1662
1663 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
1664 doc/refcard.ps:
1665 cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS)
1666
1667 # GDB MANUAL: TeX dvi file
1668 doc/gdb.dvi:
1669 cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS)
1670
1671 # GDB MANUAL: info file
1672 doc/gdb.info:
1673 cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)
1674
1675 # Make copying.c from COPYING
1676 $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copying.awk
1677 awk -f $(srcdir)/copying.awk \
1678 < $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
1679 mv $(srcdir)/copying.tmp $(srcdir)/copying.c
1680
1681 version.c: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
1682 $(SHELL) $(srcdir)/common/create-version.sh $(srcdir) \
1683 $(host_alias) $(target_alias) version.c
1684
1685 observer.h: observer.sh doc/observer.texi
1686 ${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
1687
1688 observer.inc: observer.sh doc/observer.texi
1689 ${srcdir}/observer.sh inc ${srcdir}/doc/observer.texi observer.inc
1690
1691 lint: $(LINTFILES)
1692 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
1693 `echo $(DEPFILES) $(CONFIG_OBS) | sed 's/\.o /\.c /g'`
1694
1695 gdb.cxref: $(SFILES)
1696 cxref -I. $(SFILES) >gdb.cxref
1697
1698 force_update:
1699
1700 # GNU Make has an annoying habit of putting *all* the Makefile variables
1701 # into the environment, unless you include this target as a circumvention.
1702 # Rumor is that this will be fixed (and this target can be removed)
1703 # in GNU Make 4.0.
1704 .NOEXPORT:
1705
1706 # GNU Make 3.63 has a different problem: it keeps tacking command line
1707 # overrides onto the definition of $(MAKE). This variable setting
1708 # will remove them.
1709 MAKEOVERRIDES=
1710
1711 ALLDEPFILES = \
1712 aarch64-tdep.c aarch64-linux-tdep.c aarch64-newlib-tdep.c \
1713 aarch64-linux-nat.c \
1714 aix-thread.c \
1715 alphabsd-nat.c alpha-linux-nat.c \
1716 alpha-tdep.c alpha-mdebug-tdep.c \
1717 alpha-linux-tdep.c \
1718 alphabsd-tdep.c alphafbsd-tdep.c alphanbsd-tdep.c alphaobsd-tdep.c \
1719 arc-tdep.c \
1720 amd64-nat.c amd64-tdep.c \
1721 amd64bsd-nat.c amd64fbsd-nat.c amd64fbsd-tdep.c \
1722 amd64nbsd-nat.c amd64nbsd-tdep.c \
1723 amd64obsd-nat.c amd64obsd-tdep.c \
1724 amd64-darwin-tdep.c \
1725 amd64-dicos-tdep.c \
1726 amd64-linux-nat.c amd64-linux-tdep.c \
1727 amd64-sol2-tdep.c \
1728 arm.c arm-get-next-pcs.c \
1729 arm-linux.c arm-linux-nat.c arm-linux-tdep.c \
1730 arm-symbian-tdep.c arm-tdep.c \
1731 armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
1732 avr-tdep.c \
1733 bfin-linux-tdep.c bfin-tdep.c \
1734 bsd-uthread.c bsd-kvm.c \
1735 core-regset.c \
1736 dcache.c dicos-tdep.c darwin-nat.c \
1737 exec.c \
1738 fbsd-nat.c \
1739 fbsd-tdep.c \
1740 fork-child.c \
1741 ft32-tdep.c \
1742 glibc-tdep.c \
1743 go32-nat.c h8300-tdep.c \
1744 hppa-tdep.c \
1745 hppa-linux-tdep.c hppa-linux-nat.c \
1746 hppabsd-tdep.c \
1747 hppanbsd-nat.c hppanbsd-tdep.c \
1748 hppaobsd-nat.c hppaobsd-tdep.c \
1749 i386-tdep.c i386-linux-nat.c \
1750 i386v4-nat.c i386-cygwin-tdep.c \
1751 i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
1752 i386nbsd-nat.c i386nbsd-tdep.c i386obsd-nat.c i386obsd-tdep.c \
1753 i387-tdep.c \
1754 i386-darwin-tdep.c i386-darwin-nat.c \
1755 i386-dicos-tdep.c \
1756 i386-linux-tdep.c x86-nat.c \
1757 i386-sol2-nat.c i386-sol2-tdep.c \
1758 i386gnu-nat.c i386gnu-tdep.c \
1759 ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c ia64-vms-tdep.c \
1760 inf-ptrace.c \
1761 ia64-libunwind-tdep.c \
1762 linux-fork.c \
1763 linux-tdep.c \
1764 linux-record.c \
1765 lm32-tdep.c \
1766 m68hc11-tdep.c \
1767 m32r-tdep.c \
1768 m32r-linux-nat.c m32r-linux-tdep.c \
1769 m68k-tdep.c \
1770 m68kbsd-nat.c m68kbsd-tdep.c \
1771 m68klinux-nat.c m68klinux-tdep.c \
1772 m88k-tdep.c m88kbsd-nat.c \
1773 microblaze-tdep.c microblaze-linux-tdep.c \
1774 mingw-hdep.c common/mingw-strerror.c \
1775 mips-linux-nat.c mips-linux-tdep.c \
1776 mips-sde-tdep.c \
1777 mips-tdep.c \
1778 mipsnbsd-nat.c mipsnbsd-tdep.c \
1779 mips64obsd-nat.c mips64obsd-tdep.c \
1780 msp430-tdep.c \
1781 nds32-tdep.c \
1782 nios2-tdep.c nios2-linux-tdep.c \
1783 nbsd-nat.c nbsd-tdep.c obsd-nat.c obsd-tdep.c \
1784 posix-hdep.c common/posix-strerror.c \
1785 ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c ppc64-tdep.c \
1786 ppcfbsd-nat.c ppcfbsd-tdep.c \
1787 ppcnbsd-nat.c ppcnbsd-tdep.c \
1788 ppcobsd-nat.c ppcobsd-tdep.c \
1789 procfs.c \
1790 ravenscar-thread.c \
1791 remote-sim.c \
1792 dcache.c \
1793 rl78-tdep.c \
1794 rs6000-nat.c rs6000-tdep.c solib-aix.c ppc-ravenscar-thread.c \
1795 rs6000-lynx178-tdep.c \
1796 rx-tdep.c \
1797 s390-linux-tdep.c s390-linux-nat.c \
1798 score-tdep.c \
1799 ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
1800 sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
1801 sol2-tdep.c \
1802 solib-svr4.c \
1803 sparc-linux-nat.c sparc-linux-tdep.c \
1804 sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-sol2-tdep.c \
1805 sparc-nat.c sparc-tdep.c sparc64-linux-nat.c sparc64-linux-tdep.c \
1806 sparc64-nat.c sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \
1807 sparc64nbsd-nat.c sparc64nbsd-tdep.c \
1808 sparc64obsd-nat.c sparc64obsd-tdep.c \
1809 sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \
1810 sparc-ravenscar-thread.c \
1811 spu-linux-nat.c spu-tdep.c spu-multiarch.c solib-spu.c \
1812 tilegx-linux-nat.c tilegx-tdep.c tilegx-linux-tdep.c \
1813 v850-tdep.c \
1814 vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
1815 windows-nat.c windows-tdep.c \
1816 xcoffread.c \
1817 xstormy16-tdep.c \
1818 xtensa-tdep.c xtensa-config.c \
1819 xtensa-linux-tdep.c xtensa-linux-nat.c xtensa-xtregs.c
1820
1821 # Some files need explicit build rules (due to -Werror problems) or due
1822 # to sub-directory fun 'n' games.
1823
1824 # FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral
1825 # errors. It turns out that that is the least of monitor.c's
1826 # problems. The function print_vsprintf appears to be using
1827 # va_arg(long) to extract CORE_ADDR parameters - something that
1828 # definitly will not work. "monitor.c" needs to be rewritten so that
1829 # it doesn't use format strings and instead uses callbacks.
1830 monitor.o: $(srcdir)/monitor.c
1831 $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
1832 $(COMPILE.post) $(srcdir)/monitor.c
1833 $(POSTCOMPILE)
1834
1835 # Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually
1836 # checks format strings.
1837 printcmd.o: $(srcdir)/printcmd.c
1838 $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
1839 $(COMPILE.post) $(srcdir)/printcmd.c
1840 $(POSTCOMPILE)
1841
1842 # ada-exp.c can appear in srcdir, for releases; or in ., for
1843 # development builds.
1844 ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
1845
1846 # Some versions of flex give output that triggers
1847 # -Wold-style-definition.
1848 ada-exp.o: ada-exp.c
1849 $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_DEFS) \
1850 $(COMPILE.post) $(ADA_EXP_C)
1851 $(POSTCOMPILE)
1852
1853 # Message files. Based on code in gcc/Makefile.in.
1854
1855 # Rules for generating translated message descriptions. Disabled by
1856 # autoconf if the tools are not available.
1857
1858 .PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
1859
1860 all-po: $(CATALOGS)
1861
1862 # This notation should be acceptable to all Make implementations used
1863 # by people who are interested in updating .po files.
1864 update-po: $(CATALOGS:.gmo=.pox)
1865
1866 # N.B. We do not attempt to copy these into $(srcdir). The snapshot
1867 # script does that.
1868 %.gmo: %.po
1869 -test -d po || mkdir po
1870 $(GMSGFMT) --statistics -o $@ $<
1871
1872 # The new .po has to be gone over by hand, so we deposit it into
1873 # build/po with a different extension. If build/po/$(PACKAGE).pot
1874 # exists, use it (it was just created), else use the one in srcdir.
1875 %.pox: %.po
1876 -test -d po || mkdir po
1877 $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
1878 then echo po/$(PACKAGE).pot; \
1879 else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
1880
1881 # This rule has to look for .gmo modules in both srcdir and the cwd,
1882 # and has to check that we actually have a catalog for each language,
1883 # in case they weren't built or included with the distribution.
1884 install-po:
1885 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
1886 cats="$(CATALOGS)"; for cat in $$cats; do \
1887 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
1888 if [ -f $$cat ]; then :; \
1889 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
1890 else continue; \
1891 fi; \
1892 dir=$(localedir)/$$lang/LC_MESSAGES; \
1893 echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
1894 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
1895 echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
1896 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
1897 done
1898 uninstall-po:
1899 cats="$(CATALOGS)"; for cat in $$cats; do \
1900 lang=`basename $$cat | sed 's/\.gmo$$//'`; \
1901 if [ -f $$cat ]; then :; \
1902 elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
1903 else continue; \
1904 fi; \
1905 dir=$(localedir)/$$lang/LC_MESSAGES; \
1906 rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
1907 done
1908 # Delete po/*.gmo only if we are not building in the source directory.
1909 clean-po:
1910 -if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi
1911
1912 # Rule for regenerating the message template (gdb.pot). Instead of
1913 # forcing everyone to edit POTFILES.in, which proved impractical, this
1914 # rule has no dependencies and always regenerates gdb.pot. This is
1915 # relatively harmless since the .po files do not directly depend on
1916 # it. The .pot file is left in the build directory. Since GDB's
1917 # Makefile lacks a cannonical list of sources (missing xm, tm and nm
1918 # files) force this rule.
1919 $(PACKAGE).pot: po/$(PACKAGE).pot
1920 po/$(PACKAGE).pot: force
1921 -test -d po || mkdir po
1922 sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)
1923
1924
1925 #
1926 # YACC/LEX dependencies
1927 #
1928 # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
1929 # exist in srcdir, then compiled in objdir to LANG-exp.o. If we
1930 # said LANG-exp.c rather than ./c-exp.c some makes would
1931 # sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus
1932 # decls for malloc/realloc/free which conflict with everything else.
1933 # Strictly speaking c-exp.c should therefore depend on
1934 # Makefile.in, but that was a pretty big annoyance.
1935
1936 %.c: %.y
1937 rm -f $@ $@.tmp
1938 $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
1939 || (rm -f $@; false)
1940 sed -e '/extern.*malloc/d' \
1941 -e '/extern.*realloc/d' \
1942 -e '/extern.*free/d' \
1943 -e '/include.*malloc.h/d' \
1944 -e 's/\([^x]\)malloc/\1xmalloc/g' \
1945 -e 's/\([^x]\)realloc/\1xrealloc/g' \
1946 -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
1947 -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
1948 -e '/^#line.*y.tab.c/d' \
1949 -e 's/YY_NULL/YY_NULLPTR/g' \
1950 < $@.tmp > $@
1951 rm -f $@.tmp
1952 %.c: %.l
1953 if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
1954 $(FLEX) -o$@ $< && \
1955 rm -f $@.new && \
1956 sed -e '/extern.*malloc/d' \
1957 -e '/extern.*realloc/d' \
1958 -e '/extern.*free/d' \
1959 -e '/include.*malloc.h/d' \
1960 -e 's/\([^x]\)malloc/\1xmalloc/g' \
1961 -e 's/\([^x]\)realloc/\1xrealloc/g' \
1962 -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
1963 -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
1964 -e 's/yy_flex_xrealloc/yyxrealloc/g' \
1965 < $@ > $@.new && \
1966 rm -f $@ && \
1967 mv $@.new $@; \
1968 elif [ -f $@ ]; then \
1969 echo "Warning: $*.c older than $*.l and flex not available."; \
1970 else \
1971 echo "$@ missing and flex not available."; \
1972 false; \
1973 fi
1974
1975 .PRECIOUS: ada-lex.c
1976
1977 # XML rules
1978
1979 xml-builtin.c: stamp-xml; @true
1980 stamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES)
1981 rm -f xml-builtin.tmp
1982 AWK="$(AWK)" \
1983 $(SHELL) $(srcdir)/features/feature_to_c.sh \
1984 xml-builtin.tmp $(XMLFILES)
1985 $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin.c
1986 echo stamp > stamp-xml
1987
1988 .PRECIOUS: xml-builtin.c
1989
1990 #
1991 # GDBTK sub-directory
1992 #
1993
1994 all-gdbtk: insight$(EXEEXT)
1995
1996 install-gdbtk:
1997 transformed_name=`t='$(program_transform_name)'; \
1998 echo insight | sed -e $$t` ; \
1999 if test "x$$transformed_name" = x; then \
2000 transformed_name=insight ; \
2001 else \
2002 true ; \
2003 fi ; \
2004 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
2005 $(INSTALL_PROGRAM) insight$(EXEEXT) \
2006 $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
2007 $(SHELL) $(srcdir)/../mkinstalldirs \
2008 $(DESTDIR)$(GDBTK_LIBRARY) ; \
2009 $(SHELL) $(srcdir)/../mkinstalldirs \
2010 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \
2011 $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \
2012 $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
2013 $(SHELL) $(srcdir)/../mkinstalldirs \
2014 $(DESTDIR)$(GDBTK_LIBRARY)/images \
2015 $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \
2016 $(SHELL) $(srcdir)/../mkinstalldirs \
2017 $(DESTDIR)$(GDBTK_LIBRARY)/help \
2018 $(DESTDIR)$(GDBTK_LIBRARY)/help/images \
2019 $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
2020 cd $(srcdir)/gdbtk/library ; \
2021 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; \
2022 do \
2023 $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
2024 done ;
2025
2026 uninstall-gdbtk:
2027 transformed_name=`t='$(program_transform_name)'; \
2028 echo insight | sed -e $$t` ; \
2029 if test "x$$transformed_name" = x; then \
2030 transformed_name=insight ; \
2031 else \
2032 true ; \
2033 fi ; \
2034 rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
2035 rm -rf $(DESTDIR)$(GDBTK_LIBRARY)
2036
2037 clean-gdbtk:
2038 rm -f insight$(EXEEXT)
2039
2040 # Removing the old gdb first works better if it is running, at least on SunOS.
2041 insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \
2042 $(CDEPS) $(TDEPLIBS)
2043 rm -f insight$(EXEEXT)
2044 $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
2045 -o insight$(EXEEXT) gdbtk-main.o libgdb.a \
2046 $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
2047
2048 gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
2049 $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
2050
2051 all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \
2052 $(ITK_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
2053 $(GDBTK_CFLAGS) \
2054 -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
2055 -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
2056
2057 #
2058 # Dependency tracking.
2059 #
2060
2061 ifeq ($(DEPMODE),depmode=gcc3)
2062 # Note that we put the dependencies into a .Tpo file, then move them
2063 # into place if the compile succeeds. We need this because gcc does
2064 # not atomically write the dependency output file.
2065 override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
2066 -MF $(DEPDIR)/$(basename $(@F)).Tpo
2067 override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
2068 $(DEPDIR)/$(basename $(@F)).Po
2069 else
2070 override COMPILE.pre = source='$<' object='$@' libtool=no \
2071 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
2072 # depcomp handles atomicity for us, so we don't need a postcompile
2073 # step.
2074 override POSTCOMPILE =
2075 endif
2076
2077 # A list of all the objects we might care about in this build, for
2078 # dependency tracking.
2079 all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \
2080 test-cp-name-parser.o
2081
2082 # Ensure that generated files are created early. Use order-only
2083 # dependencies if available. They require GNU make 3.80 or newer,
2084 # and the .VARIABLES variable was introduced at the same time.
2085 ifdef .VARIABLES
2086 $(all_object_files): | $(generated_files)
2087 else
2088 $(all_object_files) : $(generated_files)
2089 endif
2090
2091 # Dependencies.
2092 -include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
2093
2094 ### end of the gdb Makefile.in.