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