1*184b2d41Schristos# Copyright (C) 1989-2020 Free Software Foundation, Inc.
2a1ba9ba4Schristos
3a1ba9ba4Schristos# This file is part of GDB.
4a1ba9ba4Schristos
5a1ba9ba4Schristos# This program is free software; you can redistribute it and/or modify
6a1ba9ba4Schristos# it under the terms of the GNU General Public License as published by
7a1ba9ba4Schristos# the Free Software Foundation; either version 3 of the License, or
8a1ba9ba4Schristos# (at your option) any later version.
9a1ba9ba4Schristos#
10a1ba9ba4Schristos# This program is distributed in the hope that it will be useful,
11a1ba9ba4Schristos# but WITHOUT ANY WARRANTY; without even the implied warranty of
12a1ba9ba4Schristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13a1ba9ba4Schristos# GNU General Public License for more details.
14a1ba9ba4Schristos#
15a1ba9ba4Schristos# You should have received a copy of the GNU General Public License
16a1ba9ba4Schristos# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17a1ba9ba4Schristos
1815d8e94aSchristos# Please keep lists in this file sorted alphabetically, with one item per line.
1915d8e94aSchristos# Here are the general guidelines for ordering files and directories:
2015d8e94aSchristos#
2115d8e94aSchristos#   - Files come before directories.
2215d8e94aSchristos#   - The extensions are not taken into account when comparing filenames, except
2315d8e94aSchristos#     if the filenames are otherwise equal.
2415d8e94aSchristos#   - A filename that is a prefix of another one comes before.
2515d8e94aSchristos#   - Underscores and dashes are treated equally, and come before alphanumeric
2615d8e94aSchristos#     characters.
2715d8e94aSchristos#
2815d8e94aSchristos# For example:
2915d8e94aSchristos#
3015d8e94aSchristos# SOME_FILES = \
3115d8e94aSchristos# 	foo.c \
3215d8e94aSchristos# 	foo.h \
3315d8e94aSchristos# 	foo-bar.c \
3415d8e94aSchristos# 	foobar.c \
3515d8e94aSchristos# 	foo/bar.c
3615d8e94aSchristos
37a1ba9ba4Schristosprefix = @prefix@
38a1ba9ba4Schristosexec_prefix = @exec_prefix@
39a1ba9ba4Schristos
40a1ba9ba4Schristoshost_alias = @host_alias@
41a1ba9ba4Schristostarget_alias = @target_alias@
42a1ba9ba4Schristosprogram_transform_name = @program_transform_name@
43a1ba9ba4Schristosbindir = @bindir@
44a1ba9ba4Schristoslibdir = @libdir@
45a1ba9ba4Schristostooldir = $(libdir)/$(target_alias)
46a1ba9ba4Schristos
47a1ba9ba4Schristosdatadir = @datadir@
48a1ba9ba4Schristoslocaledir = @localedir@
49a1ba9ba4Schristosmandir = @mandir@
50a1ba9ba4Schristosman1dir = $(mandir)/man1
51a1ba9ba4Schristosman2dir = $(mandir)/man2
52a1ba9ba4Schristosman3dir = $(mandir)/man3
53a1ba9ba4Schristosman4dir = $(mandir)/man4
54a1ba9ba4Schristosman5dir = $(mandir)/man5
55a1ba9ba4Schristosman6dir = $(mandir)/man6
56a1ba9ba4Schristosman7dir = $(mandir)/man7
57a1ba9ba4Schristosman8dir = $(mandir)/man8
58a1ba9ba4Schristosman9dir = $(mandir)/man9
59a1ba9ba4Schristosinfodir = @infodir@
60a1ba9ba4Schristosdatarootdir = @datarootdir@
61a1ba9ba4Schristosdocdir = @docdir@
62a1ba9ba4Schristoshtmldir = @htmldir@
63a1ba9ba4Schristospdfdir = @pdfdir@
64a1ba9ba4Schristosincludedir = @includedir@
65a1ba9ba4Schristos
66a1ba9ba4Schristosinstall_sh = @install_sh@
67a1ba9ba4Schristos
68a1ba9ba4Schristos# This can be referenced by `LIBINTL' as computed by
69a1ba9ba4Schristos# ZW_GNU_GETTEXT_SISTER_DIR.
70a1ba9ba4Schristostop_builddir = .
71a1ba9ba4Schristos
72a1ba9ba4SchristosSHELL = @SHELL@
73a1ba9ba4SchristosEXEEXT = @EXEEXT@
74a1ba9ba4Schristos
75a1ba9ba4SchristosAWK = @AWK@
76a1ba9ba4SchristosLN_S = @LN_S@
77a1ba9ba4Schristos
78a1ba9ba4SchristosINSTALL = @INSTALL@
79a1ba9ba4SchristosINSTALL_PROGRAM = @INSTALL_PROGRAM@
80a1ba9ba4SchristosINSTALL_SCRIPT = @INSTALL_SCRIPT@
81a1ba9ba4SchristosINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
82a1ba9ba4SchristosINSTALL_DATA = @INSTALL_DATA@
83a1ba9ba4Schristos
84a1ba9ba4SchristosDESTDIR =
85a1ba9ba4Schristos
86a1ba9ba4SchristosAR = @AR@
87a1ba9ba4SchristosAR_FLAGS = qv
88a1ba9ba4SchristosRANLIB = @RANLIB@
89a1ba9ba4SchristosDLLTOOL = @DLLTOOL@
90a1ba9ba4SchristosWINDRES = @WINDRES@
91a1ba9ba4SchristosMIG = @MIG@
92a1ba9ba4SchristosSTRIP = @STRIP@
93a1ba9ba4Schristos
94a1ba9ba4SchristosXGETTEXT = @XGETTEXT@
95a1ba9ba4SchristosGMSGFMT = @GMSGFMT@
96a1ba9ba4SchristosMSGMERGE = msgmerge
97a1ba9ba4Schristos
98a1ba9ba4SchristosPACKAGE = @PACKAGE@
99a1ba9ba4SchristosCATALOGS = @CATALOGS@
100a1ba9ba4Schristos
101a1ba9ba4SchristosCC = @CC@
102a1ba9ba4SchristosCXX = @CXX@
10315d8e94aSchristosCXX_DIALECT = @CXX_DIALECT@
104a1ba9ba4Schristos
105a1ba9ba4Schristos# Dependency tracking information.
106a1ba9ba4SchristosDEPMODE = @CCDEPMODE@
107a1ba9ba4SchristosDEPDIR = @DEPDIR@
108a1ba9ba4Schristosdepcomp = $(SHELL) $(srcdir)/../depcomp
109a1ba9ba4Schristos
110a1ba9ba4Schristos# Directory containing source files.
111a1ba9ba4Schristossrcdir = @srcdir@
112a1ba9ba4SchristosVPATH = @srcdir@
113a1ba9ba4Schristostop_srcdir = @top_srcdir@
114a1ba9ba4Schristos
115051580eeSchristosinclude $(srcdir)/silent-rules.mk
116051580eeSchristos
117051580eeSchristos# Note that these are overridden by GNU make-specific code below if
118051580eeSchristos# GNU make is used.  The overrides implement dependency tracking.
119051580eeSchristosCOMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
120051580eeSchristosCOMPILE.post = -c -o $@
121051580eeSchristosCOMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
122051580eeSchristosPOSTCOMPILE = @true
123051580eeSchristos
124a1ba9ba4SchristosYACC = @YACC@
125a1ba9ba4Schristos
126a1ba9ba4Schristos# This is used to rebuild ada-lex.c from ada-lex.l.  If the program is
127a1ba9ba4Schristos# not defined, but ada-lex.c is present, compilation will continue,
128a1ba9ba4Schristos# possibly with a warning.
129a1ba9ba4SchristosFLEX = flex
130a1ba9ba4Schristos
131a1ba9ba4SchristosYLWRAP = $(srcdir)/../ylwrap
132a1ba9ba4Schristos
133a1ba9ba4Schristos# where to find makeinfo, preferably one designed for texinfo-2
134a1ba9ba4SchristosMAKEINFO = @MAKEINFO@
135a1ba9ba4SchristosMAKEINFOFLAGS = @MAKEINFOFLAGS@
136a1ba9ba4SchristosMAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
137a1ba9ba4SchristosMAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
138a1ba9ba4Schristos
139a1ba9ba4SchristosMAKEHTML = $(MAKEINFO_CMD) --html
140a1ba9ba4SchristosMAKEHTMLFLAGS =
141a1ba9ba4Schristos
142a1ba9ba4Schristos# Set this up with gcc if you have gnu ld and the loader will print out
143a1ba9ba4Schristos# line numbers for undefined references.
14415d8e94aSchristos#CC_LD = g++ -static
14515d8e94aSchristosCC_LD = $(CXX) $(CXX_DIALECT)
146a1ba9ba4Schristos
147a1ba9ba4Schristos# Where is our "include" directory?  Typically $(srcdir)/../include.
148a1ba9ba4Schristos# This is essentially the header file directory for the library
149a1ba9ba4Schristos# routines in libiberty.
150a1ba9ba4SchristosINCLUDE_DIR = $(srcdir)/../include
151a1ba9ba4SchristosINCLUDE_CFLAGS = -I$(INCLUDE_DIR)
152a1ba9ba4Schristos
153a1ba9ba4Schristos# Where is the "-liberty" library?  Typically in ../libiberty.
154a1ba9ba4SchristosLIBIBERTY = ../libiberty/libiberty.a
155a1ba9ba4Schristos
156*184b2d41Schristos# Where is the CTF library?  Typically in ../libctf.
157*184b2d41SchristosLIBCTF = @LIBCTF@
158*184b2d41SchristosCTF_DEPS = @CTF_DEPS@
159*184b2d41Schristos
160a1ba9ba4Schristos# Where is the BFD library?  Typically in ../bfd.
161a1ba9ba4SchristosBFD_DIR = ../bfd
162a1ba9ba4SchristosBFD = $(BFD_DIR)/libbfd.a
163a1ba9ba4SchristosBFD_SRC = $(srcdir)/$(BFD_DIR)
164a1ba9ba4SchristosBFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
165a1ba9ba4Schristos
166a1ba9ba4Schristos# This is where we get zlib from.  zlibdir is -L../zlib and zlibinc is
167a1ba9ba4Schristos# -I../zlib, unless we were configured with --with-system-zlib, in which
168a1ba9ba4Schristos# case both are empty.
169a1ba9ba4SchristosZLIB = @zlibdir@ -lz
170a1ba9ba4SchristosZLIBINC = @zlibinc@
171a1ba9ba4Schristos
172a1ba9ba4Schristos# Where is the decnumber library?  Typically in ../libdecnumber.
173a1ba9ba4SchristosLIBDECNUMBER_DIR = ../libdecnumber
174a1ba9ba4SchristosLIBDECNUMBER = $(LIBDECNUMBER_DIR)/libdecnumber.a
175a1ba9ba4SchristosLIBDECNUMBER_SRC = $(srcdir)/$(LIBDECNUMBER_DIR)
176a1ba9ba4SchristosLIBDECNUMBER_CFLAGS = -I$(LIBDECNUMBER_DIR) -I$(LIBDECNUMBER_SRC)
177a1ba9ba4Schristos
178*184b2d41Schristos# Where is the READLINE library?  Typically in ../readline/readline.
179*184b2d41SchristosREADLINE_DIR = ../readline/readline
180a1ba9ba4SchristosREADLINE_SRC = $(srcdir)/$(READLINE_DIR)
181a1ba9ba4SchristosREADLINE = @READLINE@
182a1ba9ba4SchristosREADLINE_DEPS = @READLINE_DEPS@
183a1ba9ba4SchristosREADLINE_CFLAGS = @READLINE_CFLAGS@
184a1ba9ba4Schristos
185a1ba9ba4Schristos# Where is expat?  This will be empty if expat was not available.
186a1ba9ba4SchristosLIBEXPAT = @LIBEXPAT@
187a1ba9ba4Schristos
188a1ba9ba4Schristos# Where is lzma?  This will be empty if lzma was not available.
189a1ba9ba4SchristosLIBLZMA = @LIBLZMA@
190a1ba9ba4Schristos
191*184b2d41Schristos# Where is libbabeltrace? This will be empty if libbabeltrace was not
192a1ba9ba4Schristos# available.
193a1ba9ba4SchristosLIBBABELTRACE = @LIBBABELTRACE@
194a1ba9ba4Schristos
195*184b2d41Schristos# Where is libxxhash? This will be empty if libxxhash was not
196*184b2d41Schristos# available.
197*184b2d41SchristosLIBXXHASH = @LIBXXHASH@
198*184b2d41Schristos
199a1ba9ba4Schristos# Where is libipt?  This will be empty if libipt was not available.
200a1ba9ba4SchristosLIBIPT = @LIBIPT@
201a1ba9ba4Schristos
202051580eeSchristos# Where is libmpfr?  This will be empty if libmpfr was not available.
203051580eeSchristosLIBMPFR = @LIBMPFR@
204051580eeSchristos
205051580eeSchristos# GNU source highlight library.
206051580eeSchristosSRCHIGH_LIBS = @SRCHIGH_LIBS@
207051580eeSchristosSRCHIGH_CFLAGS = @SRCHIGH_CFLAGS@
208051580eeSchristos
209a1ba9ba4SchristosWARN_CFLAGS = @WARN_CFLAGS@
210a1ba9ba4SchristosWERROR_CFLAGS = @WERROR_CFLAGS@
211a1ba9ba4SchristosGDB_WARN_CFLAGS = $(WARN_CFLAGS)
212a1ba9ba4SchristosGDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
213a1ba9ba4Schristos
214*184b2d41SchristosPTHREAD_CFLAGS = @PTHREAD_CFLAGS@
215*184b2d41SchristosPTHREAD_LIBS = @PTHREAD_LIBS@
216*184b2d41Schristos
217*184b2d41SchristosDEBUGINFOD_CFLAGS = @DEBUGINFOD_CFLAGS@
218*184b2d41SchristosDEBUGINFOD_LIBS = @DEBUGINFOD_LIBS@
219*184b2d41Schristos
220a1ba9ba4SchristosRDYNAMIC = @RDYNAMIC@
221a1ba9ba4Schristos
222a1ba9ba4Schristos# Where is the INTL library?  Typically in ../intl.
223a1ba9ba4SchristosINTL = @LIBINTL@
224a1ba9ba4SchristosINTL_DEPS = @LIBINTL_DEP@
225a1ba9ba4SchristosINTL_CFLAGS = @INCINTL@
226a1ba9ba4Schristos
227b2396a7bSchristos# Where is the ICONV library?  This will be empty if in libc or not available.
228b2396a7bSchristosLIBICONV = @LIBICONV@
229b2396a7bSchristos
230a1ba9ba4Schristos# Did the user give us a --with-gdb-datadir option?
231a1ba9ba4SchristosGDB_DATADIR = @GDB_DATADIR@
232a1ba9ba4Schristos
233051580eeSchristos# Code signing.
234051580eeSchristosCODESIGN = codesign
235051580eeSchristosCODESIGN_CERT = @CODESIGN_CERT@
236051580eeSchristos
237a1ba9ba4Schristos# Flags to pass to gdb when invoked with "make run".
238a1ba9ba4SchristosGDBFLAGS =
239a1ba9ba4Schristos
240a1ba9ba4Schristos# Helper code from gnulib.
241*184b2d41SchristosGNULIB_BUILDDIR = ../gnulib
242a1ba9ba4SchristosLIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
243*184b2d41SchristosINCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
244a1ba9ba4Schristos
245*184b2d41SchristosSUPPORT = ../gdbsupport
246*184b2d41SchristosLIBSUPPORT = $(SUPPORT)/libgdbsupport.a
247*184b2d41SchristosINCSUPPORT = -I$(srcdir)/.. -I..
248a1ba9ba4Schristos
249a1ba9ba4Schristos#
250a1ba9ba4Schristos# CLI sub directory definitons
251a1ba9ba4Schristos#
252a1ba9ba4SchristosSUBDIR_CLI_SRCS = \
25315d8e94aSchristos	cli/cli-cmds.c \
25415d8e94aSchristos	cli/cli-decode.c \
255a1ba9ba4Schristos	cli/cli-dump.c \
25615d8e94aSchristos	cli/cli-interp.c \
257a1ba9ba4Schristos	cli/cli-logging.c \
258*184b2d41Schristos	cli/cli-option.c \
25915d8e94aSchristos	cli/cli-script.c \
26015d8e94aSchristos	cli/cli-setshow.c \
261051580eeSchristos	cli/cli-style.c \
26215d8e94aSchristos	cli/cli-utils.c
26315d8e94aSchristos
264051580eeSchristosSUBDIR_CLI_OBS = $(patsubst %.c,%.o,$(SUBDIR_CLI_SRCS))
265a1ba9ba4Schristos
266a1ba9ba4Schristos#
267a1ba9ba4Schristos# MI sub directory definitons
268a1ba9ba4Schristos#
269a1ba9ba4SchristosSUBDIR_MI_SRCS = \
27015d8e94aSchristos	mi/mi-cmd-break.c \
27115d8e94aSchristos	mi/mi-cmd-catch.c \
27215d8e94aSchristos	mi/mi-cmd-disas.c \
27315d8e94aSchristos	mi/mi-cmd-env.c \
27415d8e94aSchristos	mi/mi-cmd-file.c \
27515d8e94aSchristos	mi/mi-cmd-info.c \
27615d8e94aSchristos	mi/mi-cmd-stack.c \
27715d8e94aSchristos	mi/mi-cmd-target.c \
27815d8e94aSchristos	mi/mi-cmd-var.c \
27915d8e94aSchristos	mi/mi-cmds.c \
28015d8e94aSchristos	mi/mi-console.c \
28115d8e94aSchristos	mi/mi-getopt.c \
28215d8e94aSchristos	mi/mi-interp.c \
28315d8e94aSchristos	mi/mi-main.c \
28415d8e94aSchristos	mi/mi-out.c \
28515d8e94aSchristos	mi/mi-parse.c \
28615d8e94aSchristos	mi/mi-symbol-cmds.c
28715d8e94aSchristos
288051580eeSchristosSUBDIR_MI_OBS = $(patsubst %.c,%.o,$(SUBDIR_MI_SRCS))
289051580eeSchristos
290a1ba9ba4SchristosSUBDIR_MI_DEPS =
291a1ba9ba4SchristosSUBDIR_MI_LDFLAGS =
292a1ba9ba4SchristosSUBDIR_MI_CFLAGS =
293a1ba9ba4Schristos
294a1ba9ba4Schristos#
295a1ba9ba4Schristos# TUI sub directory definitions
296a1ba9ba4Schristos#
297a1ba9ba4SchristosSUBDIR_TUI_SRCS = \
29815d8e94aSchristos	tui/tui.c \
299a1ba9ba4Schristos	tui/tui-command.c \
300a1ba9ba4Schristos	tui/tui-data.c \
301a1ba9ba4Schristos	tui/tui-disasm.c \
302a1ba9ba4Schristos	tui/tui-file.c \
303a1ba9ba4Schristos	tui/tui-hooks.c \
304a1ba9ba4Schristos	tui/tui-interp.c \
305a1ba9ba4Schristos	tui/tui-io.c \
306a1ba9ba4Schristos	tui/tui-layout.c \
307a1ba9ba4Schristos	tui/tui-out.c \
308a1ba9ba4Schristos	tui/tui-regs.c \
309a1ba9ba4Schristos	tui/tui-source.c \
310a1ba9ba4Schristos	tui/tui-stack.c \
311a1ba9ba4Schristos	tui/tui-win.c \
312a1ba9ba4Schristos	tui/tui-wingeneral.c \
31315d8e94aSchristos	tui/tui-winsource.c
314a1ba9ba4Schristos
315051580eeSchristosSUBDIR_TUI_OBS = $(patsubst %.c,%.o,$(SUBDIR_TUI_SRCS))
316051580eeSchristos
317a1ba9ba4SchristosSUBDIR_TUI_DEPS =
318a1ba9ba4SchristosSUBDIR_TUI_LDFLAGS =
31915d8e94aSchristosSUBDIR_TUI_CFLAGS = -DTUI=1
320a1ba9ba4Schristos
321a1ba9ba4Schristos#
322a1ba9ba4Schristos# GCC Compile support sub-directory definitions
323a1ba9ba4Schristos#
324a1ba9ba4SchristosSUBDIR_GCC_COMPILE_SRCS = \
325a1ba9ba4Schristos	compile/compile.c \
32615d8e94aSchristos	compile/compile-c-support.c \
327a1ba9ba4Schristos	compile/compile-c-symbols.c \
328a1ba9ba4Schristos	compile/compile-c-types.c \
329051580eeSchristos	compile/compile-cplus-symbols.c \
330051580eeSchristos	compile/compile-cplus-types.c \
33115d8e94aSchristos	compile/compile-loc2c.c \
332a1ba9ba4Schristos	compile/compile-object-load.c \
333051580eeSchristos	compile/compile-object-run.c
334051580eeSchristos
335051580eeSchristosSUBDIR_GCC_COMPILE_OBS = $(patsubst %.c,%.o,$(filter %.c,$(SUBDIR_GCC_COMPILE_SRCS)))
336a1ba9ba4Schristos
33715d8e94aSchristos#
338a1ba9ba4Schristos# Guile sub directory definitons for guile support.
33915d8e94aSchristos#
340a1ba9ba4SchristosSUBDIR_GUILE_SRCS = \
341a1ba9ba4Schristos	guile/guile.c \
342a1ba9ba4Schristos	guile/scm-arch.c \
343a1ba9ba4Schristos	guile/scm-auto-load.c \
344a1ba9ba4Schristos	guile/scm-block.c \
345a1ba9ba4Schristos	guile/scm-breakpoint.c \
346a1ba9ba4Schristos	guile/scm-cmd.c \
347a1ba9ba4Schristos	guile/scm-disasm.c \
348a1ba9ba4Schristos	guile/scm-exception.c \
349a1ba9ba4Schristos	guile/scm-frame.c \
350a1ba9ba4Schristos	guile/scm-gsmob.c \
351a1ba9ba4Schristos	guile/scm-iterator.c \
352a1ba9ba4Schristos	guile/scm-lazy-string.c \
353a1ba9ba4Schristos	guile/scm-math.c \
35415d8e94aSchristos	guile/scm-objfile.c \
355a1ba9ba4Schristos	guile/scm-param.c \
356a1ba9ba4Schristos	guile/scm-ports.c \
357a1ba9ba4Schristos	guile/scm-pretty-print.c \
358a1ba9ba4Schristos	guile/scm-progspace.c \
359a1ba9ba4Schristos	guile/scm-safe-call.c \
360a1ba9ba4Schristos	guile/scm-string.c \
361a1ba9ba4Schristos	guile/scm-symbol.c \
362a1ba9ba4Schristos	guile/scm-symtab.c \
363a1ba9ba4Schristos	guile/scm-type.c \
364a1ba9ba4Schristos	guile/scm-utils.c \
365a1ba9ba4Schristos	guile/scm-value.c
36615d8e94aSchristos
367051580eeSchristosSUBDIR_GUILE_OBS = $(patsubst %.c,%.o,$(SUBDIR_GUILE_SRCS))
368051580eeSchristos
369a1ba9ba4SchristosSUBDIR_GUILE_DEPS =
370a1ba9ba4SchristosSUBDIR_GUILE_LDFLAGS =
371a1ba9ba4SchristosSUBDIR_GUILE_CFLAGS =
372a1ba9ba4Schristos
373a1ba9ba4Schristos#
374a1ba9ba4Schristos# python sub directory definitons
375a1ba9ba4Schristos#
376a1ba9ba4SchristosSUBDIR_PYTHON_SRCS = \
377a1ba9ba4Schristos	python/py-arch.c \
378a1ba9ba4Schristos	python/py-auto-load.c \
379a1ba9ba4Schristos	python/py-block.c \
380a1ba9ba4Schristos	python/py-bpevent.c \
381a1ba9ba4Schristos	python/py-breakpoint.c \
382a1ba9ba4Schristos	python/py-cmd.c \
383a1ba9ba4Schristos	python/py-continueevent.c \
384a1ba9ba4Schristos	python/py-event.c \
385a1ba9ba4Schristos	python/py-evtregistry.c \
386a1ba9ba4Schristos	python/py-evts.c \
387a1ba9ba4Schristos	python/py-exitedevent.c \
388a1ba9ba4Schristos	python/py-finishbreakpoint.c \
389a1ba9ba4Schristos	python/py-frame.c \
390a1ba9ba4Schristos	python/py-framefilter.c \
391a1ba9ba4Schristos	python/py-function.c \
392a1ba9ba4Schristos	python/py-gdb-readline.c \
393a1ba9ba4Schristos	python/py-inferior.c \
394a1ba9ba4Schristos	python/py-infevents.c \
395a1ba9ba4Schristos	python/py-infthread.c \
39615d8e94aSchristos	python/py-instruction.c \
397a1ba9ba4Schristos	python/py-lazy-string.c \
398a1ba9ba4Schristos	python/py-linetable.c \
399a1ba9ba4Schristos	python/py-newobjfileevent.c \
400a1ba9ba4Schristos	python/py-objfile.c \
401a1ba9ba4Schristos	python/py-param.c \
402a1ba9ba4Schristos	python/py-prettyprint.c \
403a1ba9ba4Schristos	python/py-progspace.c \
40415d8e94aSchristos	python/py-record.c \
40515d8e94aSchristos	python/py-record-btrace.c \
40615d8e94aSchristos	python/py-record-full.c \
407*184b2d41Schristos	python/py-registers.c \
408a1ba9ba4Schristos	python/py-signalevent.c \
409a1ba9ba4Schristos	python/py-stopevent.c \
410a1ba9ba4Schristos	python/py-symbol.c \
411a1ba9ba4Schristos	python/py-symtab.c \
412a1ba9ba4Schristos	python/py-threadevent.c \
413*184b2d41Schristos	python/py-tui.c \
414a1ba9ba4Schristos	python/py-type.c \
415a1ba9ba4Schristos	python/py-unwind.c \
416a1ba9ba4Schristos	python/py-utils.c \
417a1ba9ba4Schristos	python/py-value.c \
41815d8e94aSchristos	python/py-varobj.c \
41915d8e94aSchristos	python/py-xmethods.c \
42015d8e94aSchristos	python/python.c
42115d8e94aSchristos
422051580eeSchristosSUBDIR_PYTHON_OBS = $(patsubst %.c,%.o,$(SUBDIR_PYTHON_SRCS))
423051580eeSchristos
424a1ba9ba4SchristosSUBDIR_PYTHON_DEPS =
425a1ba9ba4SchristosSUBDIR_PYTHON_LDFLAGS =
426a1ba9ba4SchristosSUBDIR_PYTHON_CFLAGS =
427a1ba9ba4Schristos
428*184b2d41SchristosSELFTESTS_SRCS = \
429*184b2d41Schristos	disasm-selftests.c \
430*184b2d41Schristos	gdbarch-selftests.c \
431*184b2d41Schristos	selftest-arch.c \
432051580eeSchristos	unittests/array-view-selftests.c \
433051580eeSchristos	unittests/child-path-selftests.c \
434051580eeSchristos	unittests/cli-utils-selftests.c \
435*184b2d41Schristos	unittests/command-def-selftests.c \
436051580eeSchristos	unittests/common-utils-selftests.c \
437051580eeSchristos	unittests/copy_bitwise-selftests.c \
438051580eeSchristos	unittests/environ-selftests.c \
439*184b2d41Schristos	unittests/filtered_iterator-selftests.c \
440051580eeSchristos	unittests/format_pieces-selftests.c \
44115d8e94aSchristos	unittests/function-view-selftests.c \
442051580eeSchristos	unittests/lookup_name_info-selftests.c \
443051580eeSchristos	unittests/memory-map-selftests.c \
444051580eeSchristos	unittests/memrange-selftests.c \
44515d8e94aSchristos	unittests/offset-type-selftests.c \
446051580eeSchristos	unittests/observable-selftests.c \
447051580eeSchristos	unittests/optional-selftests.c \
448051580eeSchristos	unittests/parse-connection-spec-selftests.c \
449051580eeSchristos	unittests/ptid-selftests.c \
450*184b2d41Schristos	unittests/main-thread-selftests.c \
451051580eeSchristos	unittests/mkdir-recursive-selftests.c \
452051580eeSchristos	unittests/rsp-low-selftests.c \
453051580eeSchristos	unittests/scoped_fd-selftests.c \
454051580eeSchristos	unittests/scoped_mmap-selftests.c \
455051580eeSchristos	unittests/scoped_restore-selftests.c \
456051580eeSchristos	unittests/string_view-selftests.c \
457051580eeSchristos	unittests/style-selftests.c \
458051580eeSchristos	unittests/tracepoint-selftests.c \
459*184b2d41Schristos	unittests/tui-selftests.c \
460051580eeSchristos	unittests/unpack-selftests.c \
461051580eeSchristos	unittests/utils-selftests.c \
462*184b2d41Schristos	unittests/vec-utils-selftests.c \
463051580eeSchristos	unittests/xml-utils-selftests.c
46415d8e94aSchristos
465*184b2d41SchristosSELFTESTS_OBS = $(patsubst %.c,%.o,$(SELFTESTS_SRCS))
466051580eeSchristos
467051580eeSchristosSUBDIR_TARGET_SRCS = target/waitstatus.c
468051580eeSchristosSUBDIR_TARGET_OBS = $(patsubst %.c,%.o,$(SUBDIR_TARGET_SRCS))
469051580eeSchristos
47015d8e94aSchristos
471a1ba9ba4Schristos# Opcodes currently live in one of two places.  Either they are in the
472a1ba9ba4Schristos# opcode library, typically ../opcodes, or they are in a header file
473a1ba9ba4Schristos# in INCLUDE_DIR.
474a1ba9ba4Schristos# Where is the "-lopcodes" library, with (some of) the opcode tables and
475a1ba9ba4Schristos# disassemblers?
476a1ba9ba4SchristosOPCODES_DIR = ../opcodes
477a1ba9ba4SchristosOPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
478a1ba9ba4SchristosOPCODES = $(OPCODES_DIR)/libopcodes.a
479a1ba9ba4Schristos# Where are the other opcode tables which only have header file
480a1ba9ba4Schristos# versions?
481a1ba9ba4SchristosOP_INCLUDE = $(INCLUDE_DIR)/opcode
482*184b2d41Schristos# See TOP_CFLAGS as well.
483051580eeSchristosOPCODES_CFLAGS = -I$(OP_INCLUDE)
484a1ba9ba4Schristos
485*184b2d41Schristos# Allow includes like "opcodes/mumble.h".
486*184b2d41SchristosTOP_CFLAGS = -I$(top_srcdir)/..
487*184b2d41Schristos
488a1ba9ba4Schristos# The simulator is usually nonexistent; targets that include one
489a1ba9ba4Schristos# should set this to list all the .o or .a files to be linked in.
490a1ba9ba4SchristosSIM = @SIM@
491a1ba9ba4Schristos
492a1ba9ba4SchristosWIN32LIBS = @WIN32LIBS@
493a1ba9ba4Schristos
494a1ba9ba4Schristos# Tcl et al cflags and libraries
495a1ba9ba4SchristosTCL = @TCL_LIBRARY@
496a1ba9ba4SchristosTCL_CFLAGS = @TCL_INCLUDE@
497a1ba9ba4SchristosGDBTKLIBS = @GDBTKLIBS@
498a1ba9ba4Schristos# Extra flags that the GDBTK files need:
499a1ba9ba4SchristosGDBTK_CFLAGS = @GDBTK_CFLAGS@
500a1ba9ba4Schristos
501a1ba9ba4SchristosTK = @TK_LIBRARY@
502a1ba9ba4SchristosTK_CFLAGS = @TK_INCLUDE@
503a1ba9ba4Schristos
504a1ba9ba4SchristosX11_CFLAGS = @TK_XINCLUDES@
505a1ba9ba4SchristosX11_LDFLAGS =
506a1ba9ba4SchristosX11_LIBS =
507a1ba9ba4Schristos
508a1ba9ba4SchristosWIN32LDAPP = @WIN32LDAPP@
509a1ba9ba4Schristos
510a1ba9ba4SchristosLIBGUI = @LIBGUI@
511a1ba9ba4SchristosGUI_CFLAGS_X = @GUI_CFLAGS_X@
512a1ba9ba4SchristosIDE_CFLAGS = $(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
513a1ba9ba4Schristos
514a1ba9ba4SchristosALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS)
515a1ba9ba4Schristos
516a1ba9ba4Schristos# The version of gdbtk we're building. This should be kept
517a1ba9ba4Schristos# in sync with GDBTK_VERSION and friends in gdbtk.h.
518a1ba9ba4SchristosGDBTK_VERSION = 1.0
519a1ba9ba4SchristosGDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION)
520a1ba9ba4Schristos
521a1ba9ba4Schristos# Gdbtk requires an absolute path to the source directory or
522a1ba9ba4Schristos# the testsuite won't run properly.
523a1ba9ba4SchristosGDBTK_SRC_DIR = @GDBTK_SRC_DIR@
524a1ba9ba4Schristos
525a1ba9ba4SchristosSUBDIR_GDBTK_OBS = \
52615d8e94aSchristos	gdbtk.o \
52715d8e94aSchristos	gdbtk-bp.o \
52815d8e94aSchristos	gdbtk-cmds.o \
52915d8e94aSchristos	gdbtk-hooks.o \
53015d8e94aSchristos	gdbtk-interp.o \
53115d8e94aSchristos	gdbtk-register.o \
53215d8e94aSchristos	gdbtk-stack.o \
53315d8e94aSchristos	gdbtk-varobj.o \
53415d8e94aSchristos	gdbtk-wrapper.o
53515d8e94aSchristos
536a1ba9ba4SchristosSUBDIR_GDBTK_SRCS = \
53715d8e94aSchristos	gdbtk/generic/gdbtk.c \
53815d8e94aSchristos	gdbtk/generic/gdbtk-bp.c \
53915d8e94aSchristos	gdbtk/generic/gdbtk-cmds.c \
54015d8e94aSchristos	gdbtk/generic/gdbtk-hooks.c \
541a1ba9ba4Schristos	gdbtk/generic/gdbtk-interp.c \
54215d8e94aSchristos	gdbtk/generic/gdbtk-main.c \
54315d8e94aSchristos	gdbtk/generic/gdbtk-register.c \
54415d8e94aSchristos	gdbtk/generic/gdbtk-stack.c \
54515d8e94aSchristos	gdbtk/generic/gdbtk-varobj.c \
54615d8e94aSchristos	gdbtk/generic/gdbtk-wrapper.c
54715d8e94aSchristos
548a1ba9ba4SchristosSUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
549a1ba9ba4SchristosSUBDIR_GDBTK_LDFLAGS =
550a1ba9ba4SchristosSUBDIR_GDBTK_CFLAGS = -DGDBTK
551a1ba9ba4Schristos
552a1ba9ba4SchristosCONFIG_OBS = @CONFIG_OBS@
553a1ba9ba4SchristosCONFIG_SRCS = @CONFIG_SRCS@
554a1ba9ba4SchristosCONFIG_DEPS = @CONFIG_DEPS@
555a1ba9ba4SchristosCONFIG_LDFLAGS = @CONFIG_LDFLAGS@
556a1ba9ba4SchristosENABLE_CFLAGS = @ENABLE_CFLAGS@
557a1ba9ba4SchristosCONFIG_ALL = @CONFIG_ALL@
558a1ba9ba4SchristosCONFIG_CLEAN = @CONFIG_CLEAN@
559a1ba9ba4SchristosCONFIG_INSTALL = @CONFIG_INSTALL@
560a1ba9ba4SchristosCONFIG_UNINSTALL = @CONFIG_UNINSTALL@
561a1ba9ba4SchristosHAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
562a1ba9ba4Schristos
563*184b2d41SchristosCONFIG_SRC_SUBDIR = arch cli dwarf2 mi compile tui unittests guile python \
564051580eeSchristos	target nat
565051580eeSchristosCONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
566051580eeSchristos
567a1ba9ba4Schristos# -I. for config files.
568a1ba9ba4Schristos# -I$(srcdir) for gdb internal headers.
569a1ba9ba4Schristos# -I$(srcdir)/config for more generic config files.
570a1ba9ba4Schristos
571a1ba9ba4Schristos# It is also possible that you will need to add -I/usr/include/sys if
572a1ba9ba4Schristos# your system doesn't have fcntl.h in /usr/include (which is where it
573a1ba9ba4Schristos# should be according to Posix).
574a1ba9ba4SchristosDEFS = @DEFS@
575051580eeSchristosGDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \
576a1ba9ba4Schristos	-DLOCALEDIR="\"$(localedir)\"" $(DEFS)
577a1ba9ba4Schristos
578a1ba9ba4Schristos# MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
579a1ba9ba4SchristosGLOBAL_CFLAGS = $(MH_CFLAGS)
580a1ba9ba4Schristos
581a1ba9ba4SchristosPROFILE_CFLAGS = @PROFILE_CFLAGS@
582a1ba9ba4Schristos
583b2396a7bSchristos# These are specifically reserved for setting from the command line
584b2396a7bSchristos# when running make.  I.E.: "make CFLAGS=-Wmissing-prototypes".
585a1ba9ba4SchristosCFLAGS = @CFLAGS@
586b2396a7bSchristosCXXFLAGS = @CXXFLAGS@
587051580eeSchristosCPPFLAGS = @CPPFLAGS@
588a1ba9ba4Schristos
589a1ba9ba4Schristos# Set by configure, for e.g. expat.  Python installations are such that
590a1ba9ba4Schristos# C headers are included using their basename (for example, we #include
591a1ba9ba4Schristos# <Python.h> rather than, say, <python/Python.h>).  Since the file names
592a1ba9ba4Schristos# are sometimes a little generic, we think that the risk of collision
593a1ba9ba4Schristos# with other header files is high.  If that happens, we try to mitigate
594a1ba9ba4Schristos# a bit the consequences by putting the Python includes last in the list.
595*184b2d41SchristosINTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ \
596*184b2d41Schristos	@LARGEFILE_CPPFLAGS@
597a1ba9ba4Schristos
598a1ba9ba4Schristos# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
599a1ba9ba4SchristosINTERNAL_CFLAGS_BASE = \
60015d8e94aSchristos	$(CXXFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
601a1ba9ba4Schristos	$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
602a1ba9ba4Schristos	$(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
603*184b2d41Schristos	$(INTL_CFLAGS) $(INCGNU) $(INCSUPPORT) $(ENABLE_CFLAGS) \
604*184b2d41Schristos	$(INTERNAL_CPPFLAGS) $(SRCHIGH_CFLAGS) $(TOP_CFLAGS) $(PTHREAD_CFLAGS) \
605*184b2d41Schristos	$(DEBUGINFOD_CFLAGS)
606a1ba9ba4SchristosINTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
607a1ba9ba4SchristosINTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
608a1ba9ba4Schristos
609a1ba9ba4Schristos# LDFLAGS is specifically reserved for setting from the command line
610a1ba9ba4Schristos# when running make.
611a1ba9ba4SchristosLDFLAGS = @LDFLAGS@
612a1ba9ba4Schristos
613a1ba9ba4Schristos# Profiling options need to go here to work.
614a1ba9ba4Schristos# I think it's perfectly reasonable for a user to set -pg in CFLAGS
615a1ba9ba4Schristos# and have it work; that's why CFLAGS is here.
616a1ba9ba4Schristos# PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
617b2396a7bSchristosINTERNAL_LDFLAGS = \
61815d8e94aSchristos	$(CXXFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \
619*184b2d41Schristos	$(LDFLAGS) $(CONFIG_LDFLAGS) $(PTHREAD_CFLAGS)
620a1ba9ba4Schristos
621a1ba9ba4Schristos# Libraries and corresponding dependencies for compiling gdb.
622a1ba9ba4Schristos# XM_CLIBS, defined in *config files, have host-dependent libs.
623a1ba9ba4Schristos# LIBIBERTY appears twice on purpose.
624*184b2d41SchristosCLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD) $(ZLIB) \
625*184b2d41Schristos        $(LIBSUPPORT) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
626051580eeSchristos	$(XM_CLIBS) $(GDBTKLIBS) \
627a1ba9ba4Schristos	@LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
628a1ba9ba4Schristos	$(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
629*184b2d41Schristos	$(WIN32LIBS) $(LIBGNU) $(LIBICONV) \
630*184b2d41Schristos	$(LIBMPFR) $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) \
631*184b2d41Schristos	$(DEBUGINFOD_LIBS)
632*184b2d41SchristosCDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) $(CTF_DEPS) \
633*184b2d41Schristos	$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \
634*184b2d41Schristos	$(LIBSUPPORT)
635a1ba9ba4Schristos
636a1ba9ba4SchristosDIST = gdb
637a1ba9ba4Schristos
638a1ba9ba4SchristosRUNTEST = runtest
639a1ba9ba4SchristosRUNTESTFLAGS =
640a1ba9ba4Schristos
641a1ba9ba4Schristos# XML files to build in to GDB.
64215d8e94aSchristosXMLFILES = \
64315d8e94aSchristos	$(srcdir)/features/btrace.dtd \
64415d8e94aSchristos	$(srcdir)/features/btrace-conf.dtd \
64515d8e94aSchristos	$(srcdir)/features/gdb-target.dtd \
646a1ba9ba4Schristos	$(srcdir)/features/library-list.dtd \
647a1ba9ba4Schristos	$(srcdir)/features/library-list-aix.dtd \
64815d8e94aSchristos	$(srcdir)/features/library-list-svr4.dtd \
64915d8e94aSchristos	$(srcdir)/features/osdata.dtd \
65015d8e94aSchristos	$(srcdir)/features/threads.dtd \
65115d8e94aSchristos	$(srcdir)/features/traceframe-info.dtd \
65215d8e94aSchristos	$(srcdir)/features/xinclude.dtd
653a1ba9ba4Schristos
654051580eeSchristos# Build the ser-*.o files the host supports.  This includes ser-unix.o
655051580eeSchristos# for any system that supports a POSIX interface to the serial port.
656051580eeSchristos# See configure.ac.
657a1ba9ba4SchristosSER_HARDWIRE = @SER_HARDWIRE@
658a1ba9ba4Schristos
659a1ba9ba4Schristos# This is remote-sim.o if a simulator is to be linked in.
660a1ba9ba4SchristosSIM_OBS = @SIM_OBS@
661a1ba9ba4Schristos
662a1ba9ba4Schristos# Target-dependent object files.
663a1ba9ba4SchristosTARGET_OBS = @TARGET_OBS@
664a1ba9ba4Schristos
665a1ba9ba4Schristos# All target-dependent objects files that require 64-bit CORE_ADDR
666a1ba9ba4Schristos# (used with --enable-targets=all --enable-64-bit-bfd).
667a1ba9ba4SchristosALL_64_TARGET_OBS = \
668051580eeSchristos	aarch64-fbsd-tdep.o \
66915d8e94aSchristos	aarch64-linux-tdep.o \
670*184b2d41Schristos	aarch64-nbsd-tdep.o \
67115d8e94aSchristos	aarch64-newlib-tdep.o \
672051580eeSchristos	aarch64-ravenscar-thread.o \
67315d8e94aSchristos	aarch64-tdep.o \
67415d8e94aSchristos	alpha-bsd-tdep.o \
67515d8e94aSchristos	alpha-linux-tdep.o \
67615d8e94aSchristos	alpha-mdebug-tdep.o \
67715d8e94aSchristos	alpha-nbsd-tdep.o \
67815d8e94aSchristos	alpha-obsd-tdep.o \
67915d8e94aSchristos	alpha-tdep.o \
68015d8e94aSchristos	amd64-darwin-tdep.o \
68115d8e94aSchristos	amd64-dicos-tdep.o \
68215d8e94aSchristos	amd64-fbsd-tdep.o \
68315d8e94aSchristos	amd64-linux-tdep.o \
68415d8e94aSchristos	amd64-nbsd-tdep.o \
68515d8e94aSchristos	amd64-obsd-tdep.o \
68615d8e94aSchristos	amd64-sol2-tdep.o \
68715d8e94aSchristos	amd64-tdep.o \
68815d8e94aSchristos	amd64-windows-tdep.o \
689051580eeSchristos	arch/aarch64.o \
690051580eeSchristos	arch/aarch64-insn.o \
691051580eeSchristos	arch/amd64.o \
69215d8e94aSchristos	ia64-linux-tdep.o \
69315d8e94aSchristos	ia64-tdep.o \
69415d8e94aSchristos	ia64-vms-tdep.o \
69515d8e94aSchristos	mips64-obsd-tdep.o \
69615d8e94aSchristos	sparc64-fbsd-tdep.o \
69715d8e94aSchristos	sparc64-linux-tdep.o \
69815d8e94aSchristos	sparc64-nbsd-tdep.o \
69915d8e94aSchristos	sparc64-obsd-tdep.o \
70015d8e94aSchristos	sparc64-sol2-tdep.o \
70115d8e94aSchristos	sparc64-tdep.o
702a1ba9ba4Schristos
703a1ba9ba4Schristos# All other target-dependent objects files (used with --enable-targets=all).
704a1ba9ba4SchristosALL_TARGET_OBS = \
705*184b2d41Schristos	aarch32-tdep.o \
706*184b2d41Schristos	arc-linux-tdep.o \
70715d8e94aSchristos	arc-tdep.o \
708*184b2d41Schristos	arch/aarch32.o \
709*184b2d41Schristos	arch/arc.o \
710051580eeSchristos	arch/arm.o \
711051580eeSchristos	arch/arm-get-next-pcs.o \
712051580eeSchristos	arch/arm-linux.o \
713051580eeSchristos	arch/i386.o \
714051580eeSchristos	arch/ppc-linux-common.o \
715051580eeSchristos	arch/riscv.o \
71615d8e94aSchristos	arm-bsd-tdep.o \
717051580eeSchristos	arm-fbsd-tdep.o \
71815d8e94aSchristos	arm-linux-tdep.o \
71915d8e94aSchristos	arm-nbsd-tdep.o \
72015d8e94aSchristos	arm-obsd-tdep.o \
721051580eeSchristos	arm-pikeos-tdep.o \
72215d8e94aSchristos	arm-symbian-tdep.o \
72315d8e94aSchristos	arm-tdep.o \
72415d8e94aSchristos	arm-wince-tdep.o \
725a1ba9ba4Schristos	avr-tdep.o \
72615d8e94aSchristos	bfin-linux-tdep.o \
72715d8e94aSchristos	bfin-tdep.o \
728*184b2d41Schristos	bpf-tdep.o \
72915d8e94aSchristos	bsd-uthread.o \
73015d8e94aSchristos	cris-linux-tdep.o \
73115d8e94aSchristos	cris-tdep.o \
732051580eeSchristos	csky-linux-tdep.o \
733051580eeSchristos	csky-tdep.o \
734a1ba9ba4Schristos	dicos-tdep.o \
735a1ba9ba4Schristos	fbsd-tdep.o \
73615d8e94aSchristos	frv-linux-tdep.o \
73715d8e94aSchristos	frv-tdep.o \
738a1ba9ba4Schristos	ft32-tdep.o \
73915d8e94aSchristos	glibc-tdep.o \
740a1ba9ba4Schristos	h8300-tdep.o \
74115d8e94aSchristos	hppa-bsd-tdep.o \
74215d8e94aSchristos	hppa-linux-tdep.o \
74315d8e94aSchristos	hppa-nbsd-tdep.o \
74415d8e94aSchristos	hppa-obsd-tdep.o \
74515d8e94aSchristos	hppa-tdep.o \
74615d8e94aSchristos	i386-bsd-tdep.o \
74715d8e94aSchristos	i386-darwin-tdep.o \
74815d8e94aSchristos	i386-dicos-tdep.o \
74915d8e94aSchristos	i386-fbsd-tdep.o \
75015d8e94aSchristos	i386-gnu-tdep.o \
75115d8e94aSchristos	i386-go32-tdep.o \
75215d8e94aSchristos	i386-linux-tdep.o \
75315d8e94aSchristos	i386-nbsd-tdep.o \
75415d8e94aSchristos	i386-nto-tdep.o \
75515d8e94aSchristos	i386-obsd-tdep.o \
75615d8e94aSchristos	i386-sol2-tdep.o \
75715d8e94aSchristos	i386-tdep.o \
758*184b2d41Schristos	i386-windows-tdep.o \
75915d8e94aSchristos	i387-tdep.o \
760a1ba9ba4Schristos	iq2000-tdep.o \
76115d8e94aSchristos	linux-record.o \
762a1ba9ba4Schristos	linux-tdep.o \
763a1ba9ba4Schristos	lm32-tdep.o \
764a1ba9ba4Schristos	m32c-tdep.o \
76515d8e94aSchristos	m32r-linux-tdep.o \
76615d8e94aSchristos	m32r-tdep.o \
767a1ba9ba4Schristos	m68hc11-tdep.o \
76815d8e94aSchristos	m68k-bsd-tdep.o \
76915d8e94aSchristos	m68k-linux-tdep.o \
77015d8e94aSchristos	m68k-tdep.o \
771a1ba9ba4Schristos	mep-tdep.o \
77215d8e94aSchristos	microblaze-linux-tdep.o \
77315d8e94aSchristos	microblaze-tdep.o \
77415d8e94aSchristos	mips-fbsd-tdep.o \
77515d8e94aSchristos	mips-linux-tdep.o \
77615d8e94aSchristos	mips-nbsd-tdep.o \
77715d8e94aSchristos	mips-sde-tdep.o \
77815d8e94aSchristos	mips-tdep.o \
77915d8e94aSchristos	mn10300-linux-tdep.o \
78015d8e94aSchristos	mn10300-tdep.o \
781a1ba9ba4Schristos	moxie-tdep.o \
782a1ba9ba4Schristos	msp430-tdep.o \
78315d8e94aSchristos	nbsd-tdep.o \
784b2396a7bSchristos	nds32-tdep.o \
78515d8e94aSchristos	nios2-linux-tdep.o \
78615d8e94aSchristos	nios2-tdep.o \
787a1ba9ba4Schristos	nto-tdep.o \
78815d8e94aSchristos	obsd-tdep.o \
789051580eeSchristos	or1k-linux-tdep.o \
790051580eeSchristos	or1k-tdep.o \
79115d8e94aSchristos	ppc-fbsd-tdep.o \
79215d8e94aSchristos	ppc-linux-tdep.o \
79315d8e94aSchristos	ppc-nbsd-tdep.o \
79415d8e94aSchristos	ppc-obsd-tdep.o \
79515d8e94aSchristos	ppc-ravenscar-thread.o \
79615d8e94aSchristos	ppc-sysv-tdep.o \
79715d8e94aSchristos	ppc64-tdep.o \
79815d8e94aSchristos	ravenscar-thread.o \
799051580eeSchristos	riscv-fbsd-tdep.o \
800051580eeSchristos	riscv-linux-tdep.o \
801*184b2d41Schristos	riscv-ravenscar-thread.o \
802051580eeSchristos	riscv-tdep.o \
80315d8e94aSchristos	rl78-tdep.o \
80415d8e94aSchristos	rs6000-aix-tdep.o \
805a1ba9ba4Schristos	rs6000-lynx178-tdep.o \
80615d8e94aSchristos	rs6000-tdep.o \
807a1ba9ba4Schristos	rx-tdep.o \
808051580eeSchristos	s12z-tdep.o \
809a1ba9ba4Schristos	s390-linux-tdep.o \
810051580eeSchristos	s390-tdep.o \
811a1ba9ba4Schristos	score-tdep.o \
81215d8e94aSchristos	sh-linux-tdep.o \
81315d8e94aSchristos	sh-nbsd-tdep.o \
81415d8e94aSchristos	sh-tdep.o \
815a1ba9ba4Schristos	sol2-tdep.o \
81615d8e94aSchristos	solib-aix.o \
81715d8e94aSchristos	solib-darwin.o \
81815d8e94aSchristos	solib-dsbt.o \
81915d8e94aSchristos	solib-frv.o \
82015d8e94aSchristos	solib-svr4.o \
82115d8e94aSchristos	sparc-linux-tdep.o \
82215d8e94aSchristos	sparc-nbsd-tdep.o \
82315d8e94aSchristos	sparc-obsd-tdep.o \
82415d8e94aSchristos	sparc-ravenscar-thread.o \
82515d8e94aSchristos	sparc-sol2-tdep.o \
82615d8e94aSchristos	sparc-tdep.o \
827a1ba9ba4Schristos	symfile-mem.o \
82815d8e94aSchristos	tic6x-linux-tdep.o \
82915d8e94aSchristos	tic6x-tdep.o \
83015d8e94aSchristos	tilegx-linux-tdep.o \
83115d8e94aSchristos	tilegx-tdep.o \
83215d8e94aSchristos	v850-tdep.o \
83315d8e94aSchristos	vax-nbsd-tdep.o \
83415d8e94aSchristos	vax-tdep.o \
835a1ba9ba4Schristos	windows-tdep.o \
836051580eeSchristos	x86-tdep.o \
83715d8e94aSchristos	xcoffread.o \
83815d8e94aSchristos	xstormy16-tdep.o \
83915d8e94aSchristos	xtensa-config.o \
84015d8e94aSchristos	xtensa-linux-tdep.o \
84115d8e94aSchristos	xtensa-tdep.o
842a1ba9ba4Schristos
843051580eeSchristos# The following native-target dependent variables are defined on
844051580eeSchristos# configure.nat.
845051580eeSchristosNAT_FILE = @NAT_FILE@
846051580eeSchristosNATDEPFILES = @NATDEPFILES@
847051580eeSchristosNAT_CDEPS = @NAT_CDEPS@
848051580eeSchristosLOADLIBES = @LOADLIBES@
849051580eeSchristosMH_CFLAGS = @MH_CFLAGS@
850051580eeSchristosXM_CLIBS = @XM_CLIBS@
851051580eeSchristosNAT_GENERATED_FILES = @NAT_GENERATED_FILES@
852*184b2d41SchristosNM_H = @NM_H@
853051580eeSchristosHAVE_NATIVE_GCORE_HOST = @HAVE_NATIVE_GCORE_HOST@
854051580eeSchristos
855051580eeSchristos# Native-target dependent makefile fragment comes in here.
856051580eeSchristos@nat_makefile_frag@
857051580eeSchristos
858051580eeSchristos# End of native-target dependent variables.
859a1ba9ba4Schristos
860a1ba9ba4SchristosFLAGS_TO_PASS = \
861a1ba9ba4Schristos	"prefix=$(prefix)" \
862a1ba9ba4Schristos	"exec_prefix=$(exec_prefix)" \
863a1ba9ba4Schristos	"infodir=$(infodir)" \
864a1ba9ba4Schristos	"datarootdir=$(datarootdir)" \
865a1ba9ba4Schristos	"docdir=$(docdir)" \
866a1ba9ba4Schristos	"htmldir=$(htmldir)" \
867a1ba9ba4Schristos	"pdfdir=$(pdfdir)" \
868a1ba9ba4Schristos	"libdir=$(libdir)" \
869a1ba9ba4Schristos	"mandir=$(mandir)" \
870a1ba9ba4Schristos	"datadir=$(datadir)" \
871a1ba9ba4Schristos	"includedir=$(includedir)" \
872a1ba9ba4Schristos	"against=$(against)" \
873a1ba9ba4Schristos	"DESTDIR=$(DESTDIR)" \
874a1ba9ba4Schristos	"AR=$(AR)" \
875a1ba9ba4Schristos	"AR_FLAGS=$(AR_FLAGS)" \
876a1ba9ba4Schristos	"CC=$(CC)" \
877a1ba9ba4Schristos	"CFLAGS=$(CFLAGS)" \
878a1ba9ba4Schristos	"CXX=$(CXX)" \
87915d8e94aSchristos	"CXX_DIALECT=$(CXX_DIALECT)" \
880a1ba9ba4Schristos	"CXXFLAGS=$(CXXFLAGS)" \
881a1ba9ba4Schristos	"DLLTOOL=$(DLLTOOL)" \
882a1ba9ba4Schristos	"LDFLAGS=$(LDFLAGS)" \
883a1ba9ba4Schristos	"RANLIB=$(RANLIB)" \
884a1ba9ba4Schristos	"MAKEINFO=$(MAKEINFO)" \
885a1ba9ba4Schristos	"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
886a1ba9ba4Schristos	"MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
887a1ba9ba4Schristos	"MAKEHTML=$(MAKEHTML)" \
888a1ba9ba4Schristos	"MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
889a1ba9ba4Schristos	"INSTALL=$(INSTALL)" \
890a1ba9ba4Schristos	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
891a1ba9ba4Schristos	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
892a1ba9ba4Schristos	"INSTALL_DATA=$(INSTALL_DATA)" \
893a1ba9ba4Schristos	"RUNTEST=$(RUNTEST)" \
894a1ba9ba4Schristos	"RUNTESTFLAGS=$(RUNTESTFLAGS)"
895a1ba9ba4Schristos
896a1ba9ba4Schristos# Flags that we pass when building the testsuite.
897a1ba9ba4Schristos
898a1ba9ba4Schristos# empty for native, $(target_alias)/ for cross
899a1ba9ba4Schristostarget_subdir = @target_subdir@
900a1ba9ba4Schristos
901a1ba9ba4SchristosCC_FOR_TARGET = ` \
902a1ba9ba4Schristos  if [ -f $${rootme}/../gcc/xgcc ] ; then \
903a1ba9ba4Schristos    if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
904a1ba9ba4Schristos      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/; \
905a1ba9ba4Schristos    else \
906a1ba9ba4Schristos      echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
907a1ba9ba4Schristos    fi; \
908a1ba9ba4Schristos  else \
909a1ba9ba4Schristos    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
910a1ba9ba4Schristos      echo $(CC); \
911a1ba9ba4Schristos    else \
912a1ba9ba4Schristos      t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
913a1ba9ba4Schristos    fi; \
914a1ba9ba4Schristos  fi`
915a1ba9ba4Schristos
916a1ba9ba4SchristosCXX_FOR_TARGET = ` \
917a1ba9ba4Schristos  if [ -f $${rootme}/../gcc/xg++ ] ; then \
918a1ba9ba4Schristos    if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
919a1ba9ba4Schristos      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/; \
920a1ba9ba4Schristos    else \
921a1ba9ba4Schristos      echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
922a1ba9ba4Schristos    fi; \
923a1ba9ba4Schristos  else \
924a1ba9ba4Schristos    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
925a1ba9ba4Schristos      echo $(CXX); \
926a1ba9ba4Schristos    else \
927a1ba9ba4Schristos      t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
928a1ba9ba4Schristos    fi; \
929a1ba9ba4Schristos  fi`
930a1ba9ba4Schristos
931a1ba9ba4Schristos# The use of $$(x_FOR_TARGET) reduces the command line length by not
932a1ba9ba4Schristos# duplicating the lengthy definition.
933a1ba9ba4SchristosTARGET_FLAGS_TO_PASS = \
934a1ba9ba4Schristos	"prefix=$(prefix)" \
935a1ba9ba4Schristos	"exec_prefix=$(exec_prefix)" \
936a1ba9ba4Schristos	"against=$(against)" \
937a1ba9ba4Schristos	'CC=$$(CC_FOR_TARGET)' \
938a1ba9ba4Schristos	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
939a1ba9ba4Schristos	"CFLAGS=$(CFLAGS)" \
940a1ba9ba4Schristos	'CXX=$$(CXX_FOR_TARGET)' \
941a1ba9ba4Schristos	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
942a1ba9ba4Schristos	"CXXFLAGS=$(CXXFLAGS)" \
943a1ba9ba4Schristos	"INSTALL=$(INSTALL)" \
944a1ba9ba4Schristos	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
945a1ba9ba4Schristos	"INSTALL_DATA=$(INSTALL_DATA)" \
946a1ba9ba4Schristos	"MAKEINFO=$(MAKEINFO)" \
947a1ba9ba4Schristos	"MAKEHTML=$(MAKEHTML)" \
948a1ba9ba4Schristos	"RUNTEST=$(RUNTEST)" \
949a1ba9ba4Schristos	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
950a1ba9ba4Schristos	"FORCE_PARALLEL=$(FORCE_PARALLEL)" \
951a1ba9ba4Schristos	"TESTS=$(TESTS)"
952a1ba9ba4Schristos
953a1ba9ba4Schristos# All source files that go into linking GDB.
954a1ba9ba4Schristos
955051580eeSchristos# Files that should wind up in SFILES and whose corresponding .o
956051580eeSchristos# should be in COMMON_OBS.
957051580eeSchristosCOMMON_SFILES = \
95815d8e94aSchristos	ada-lang.c \
95915d8e94aSchristos	ada-tasks.c \
96015d8e94aSchristos	ada-typeprint.c \
96115d8e94aSchristos	ada-valprint.c \
962a1ba9ba4Schristos	ada-varobj.c \
96315d8e94aSchristos	addrmap.c \
964a1ba9ba4Schristos	agent.c \
965*184b2d41Schristos	alloc.c \
96615d8e94aSchristos	annotate.c \
96715d8e94aSchristos	arch-utils.c \
968*184b2d41Schristos	async-event.c \
96915d8e94aSchristos	auto-load.c \
97015d8e94aSchristos	auxv.c \
97115d8e94aSchristos	ax-gdb.c \
97215d8e94aSchristos	ax-general.c \
973a1ba9ba4Schristos	bcache.c \
974a1ba9ba4Schristos	bfd-target.c \
97515d8e94aSchristos	block.c \
97615d8e94aSchristos	blockframe.c \
97715d8e94aSchristos	break-catch-sig.c \
978a1ba9ba4Schristos	break-catch-syscall.c \
97915d8e94aSchristos	break-catch-throw.c \
98015d8e94aSchristos	breakpoint.c \
98115d8e94aSchristos	btrace.c \
98215d8e94aSchristos	build-id.c \
983051580eeSchristos	buildsym-legacy.c \
98415d8e94aSchristos	buildsym.c \
98515d8e94aSchristos	c-lang.c \
98615d8e94aSchristos	c-typeprint.c \
98715d8e94aSchristos	c-valprint.c \
98815d8e94aSchristos	c-varobj.c \
98915d8e94aSchristos	charset.c \
99015d8e94aSchristos	cli-out.c \
99115d8e94aSchristos	coff-pe-read.c \
99215d8e94aSchristos	coffread.c \
99315d8e94aSchristos	complaints.c \
99415d8e94aSchristos	completer.c \
99515d8e94aSchristos	continuations.c \
99615d8e94aSchristos	copying.c \
99715d8e94aSchristos	corefile.c \
99815d8e94aSchristos	corelow.c \
99915d8e94aSchristos	cp-abi.c \
100015d8e94aSchristos	cp-namespace.c \
100115d8e94aSchristos	cp-support.c \
100215d8e94aSchristos	cp-valprint.c \
1003*184b2d41Schristos	ctfread.c \
100415d8e94aSchristos	d-lang.c \
100515d8e94aSchristos	d-namespace.c \
100615d8e94aSchristos	d-valprint.c \
100715d8e94aSchristos	dbxread.c \
1008051580eeSchristos	dcache.c \
1009051580eeSchristos	debug.c \
1010*184b2d41Schristos	debuginfod-support.c \
101115d8e94aSchristos	dictionary.c \
101215d8e94aSchristos	disasm.c \
101315d8e94aSchristos	dummy-frame.c \
1014*184b2d41Schristos	dwarf2/abbrev.c \
1015*184b2d41Schristos	dwarf2/attribute.c \
1016*184b2d41Schristos	dwarf2/comp-unit.c \
1017*184b2d41Schristos	dwarf2/dwz.c \
1018*184b2d41Schristos	dwarf2/expr.c \
1019*184b2d41Schristos	dwarf2/frame-tailcall.c \
1020*184b2d41Schristos	dwarf2/frame.c \
1021*184b2d41Schristos	dwarf2/index-cache.c \
1022*184b2d41Schristos	dwarf2/index-common.c \
1023*184b2d41Schristos	dwarf2/index-write.c \
1024*184b2d41Schristos	dwarf2/leb.c \
1025*184b2d41Schristos	dwarf2/line-header.c \
1026*184b2d41Schristos	dwarf2/loc.c \
1027*184b2d41Schristos	dwarf2/macro.c \
1028*184b2d41Schristos	dwarf2/read.c \
1029*184b2d41Schristos	dwarf2/section.c \
1030*184b2d41Schristos	dwarf2/stringify.c \
103115d8e94aSchristos	eval.c \
103215d8e94aSchristos	event-top.c \
103315d8e94aSchristos	exceptions.c \
1034051580eeSchristos	exec.c \
103515d8e94aSchristos	expprint.c \
103615d8e94aSchristos	extension.c \
103715d8e94aSchristos	f-lang.c \
103815d8e94aSchristos	f-typeprint.c \
103915d8e94aSchristos	f-valprint.c \
1040051580eeSchristos	filename-seen-cache.c \
104115d8e94aSchristos	filesystem.c \
104215d8e94aSchristos	findcmd.c \
104315d8e94aSchristos	findvar.c \
104415d8e94aSchristos	frame.c \
104515d8e94aSchristos	frame-base.c \
104615d8e94aSchristos	frame-unwind.c \
104715d8e94aSchristos	gcore.c \
1048*184b2d41Schristos	gdb-demangle.c \
104915d8e94aSchristos	gdb_bfd.c \
105015d8e94aSchristos	gdb_obstack.c \
1051051580eeSchristos	gdb_regex.c \
105215d8e94aSchristos	gdbarch.c \
105315d8e94aSchristos	gdbtypes.c \
105415d8e94aSchristos	gnu-v2-abi.c \
105515d8e94aSchristos	gnu-v3-abi.c \
105615d8e94aSchristos	go-lang.c \
105715d8e94aSchristos	go-typeprint.c \
105815d8e94aSchristos	go-valprint.c \
105915d8e94aSchristos	inf-child.c \
1060a1ba9ba4Schristos	inf-loop.c \
1061a1ba9ba4Schristos	infcall.c \
106215d8e94aSchristos	infcmd.c \
106315d8e94aSchristos	inferior.c \
106415d8e94aSchristos	inflow.c \
106515d8e94aSchristos	infrun.c \
1066a1ba9ba4Schristos	inline-frame.c \
1067a1ba9ba4Schristos	interps.c \
106815d8e94aSchristos	jit.c \
106915d8e94aSchristos	language.c \
107015d8e94aSchristos	linespec.c \
107115d8e94aSchristos	location.c \
107215d8e94aSchristos	m2-lang.c \
107315d8e94aSchristos	m2-typeprint.c \
107415d8e94aSchristos	m2-valprint.c \
107515d8e94aSchristos	macrocmd.c \
107615d8e94aSchristos	macroexp.c \
107715d8e94aSchristos	macroscope.c \
107815d8e94aSchristos	macrotab.c \
107915d8e94aSchristos	main.c \
108015d8e94aSchristos	maint.c \
1081*184b2d41Schristos	maint-test-options.c \
1082*184b2d41Schristos	maint-test-settings.c \
108315d8e94aSchristos	mdebugread.c \
108415d8e94aSchristos	mem-break.c \
108515d8e94aSchristos	memattr.c \
108615d8e94aSchristos	memory-map.c \
108715d8e94aSchristos	memrange.c \
108815d8e94aSchristos	minidebug.c \
108915d8e94aSchristos	minsyms.c \
109015d8e94aSchristos	mipsread.c \
1091b2396a7bSchristos	namespace.c \
1092a1ba9ba4Schristos	objc-lang.c \
109315d8e94aSchristos	objfiles.c \
1094051580eeSchristos	observable.c \
1095a1ba9ba4Schristos	opencl-lang.c \
109615d8e94aSchristos	osabi.c \
109715d8e94aSchristos	osdata.c \
109815d8e94aSchristos	p-lang.c \
109915d8e94aSchristos	p-typeprint.c \
110015d8e94aSchristos	p-valprint.c \
110115d8e94aSchristos	parse.c \
110215d8e94aSchristos	printcmd.c \
110315d8e94aSchristos	probe.c \
1104051580eeSchristos	process-stratum-target.c \
1105051580eeSchristos	producer.c \
110615d8e94aSchristos	progspace.c \
1107051580eeSchristos	progspace-and-thread.c \
110815d8e94aSchristos	prologue-value.c \
110915d8e94aSchristos	psymtab.c \
111015d8e94aSchristos	record.c \
111115d8e94aSchristos	record-btrace.c \
111215d8e94aSchristos	record-full.c \
111315d8e94aSchristos	regcache.c \
1114051580eeSchristos	regcache-dump.c \
111515d8e94aSchristos	reggroups.c \
1116051580eeSchristos	registry.c \
111715d8e94aSchristos	remote.c \
111815d8e94aSchristos	remote-fileio.c \
111915d8e94aSchristos	remote-notif.c \
112015d8e94aSchristos	reverse.c \
1121*184b2d41Schristos	run-on-main-thread.c \
112215d8e94aSchristos	rust-lang.c \
112315d8e94aSchristos	sentinel-frame.c \
112415d8e94aSchristos	ser-event.c \
112515d8e94aSchristos	serial.c \
112615d8e94aSchristos	skip.c \
112715d8e94aSchristos	solib.c \
112815d8e94aSchristos	solib-target.c \
112915d8e94aSchristos	source.c \
1130051580eeSchristos	source-cache.c \
113115d8e94aSchristos	stabsread.c \
113215d8e94aSchristos	stack.c \
113315d8e94aSchristos	std-regs.c \
113415d8e94aSchristos	symfile.c \
113515d8e94aSchristos	symfile-debug.c \
113615d8e94aSchristos	symmisc.c \
113715d8e94aSchristos	symtab.c \
113815d8e94aSchristos	target.c \
1139*184b2d41Schristos	target-connection.c \
114015d8e94aSchristos	target-dcache.c \
114115d8e94aSchristos	target-descriptions.c \
114215d8e94aSchristos	target-memory.c \
1143051580eeSchristos	test-target.c \
114415d8e94aSchristos	thread.c \
1145051580eeSchristos	thread-iter.c \
114615d8e94aSchristos	tid-parse.c \
114715d8e94aSchristos	top.c \
1148*184b2d41Schristos	tracectf.c \
1149051580eeSchristos	tracefile.c \
1150051580eeSchristos	tracefile-tfile.c \
115115d8e94aSchristos	tracepoint.c \
1152a1ba9ba4Schristos	trad-frame.c \
1153a1ba9ba4Schristos	tramp-frame.c \
1154051580eeSchristos	target-float.c \
1155*184b2d41Schristos	type-stack.c \
1156a1ba9ba4Schristos	typeprint.c \
115715d8e94aSchristos	ui-file.c \
115815d8e94aSchristos	ui-out.c \
1159051580eeSchristos	ui-style.c \
1160a1ba9ba4Schristos	user-regs.c \
116115d8e94aSchristos	utils.c \
116215d8e94aSchristos	valarith.c \
116315d8e94aSchristos	valops.c \
116415d8e94aSchristos	valprint.c \
116515d8e94aSchristos	value.c \
116615d8e94aSchristos	varobj.c \
116715d8e94aSchristos	xml-support.c \
1168a1ba9ba4Schristos	xml-syscall.c \
1169051580eeSchristos	xml-tdesc.c
1170a1ba9ba4Schristos
1171051580eeSchristos# Links made at configuration time should not be specified here, since
1172051580eeSchristos# SFILES is used in building the distribution archive.
1173051580eeSchristosSFILES = \
1174051580eeSchristos	ada-exp.y \
1175051580eeSchristos	arch/i386.c \
1176051580eeSchristos	c-exp.y \
1177051580eeSchristos	cp-name-parser.y \
1178051580eeSchristos	d-exp.y \
1179051580eeSchristos	dtrace-probe.c \
1180051580eeSchristos	elfread.c \
1181051580eeSchristos	f-exp.y \
1182051580eeSchristos	gdb.c \
1183051580eeSchristos	go-exp.y \
1184051580eeSchristos	m2-exp.y \
1185051580eeSchristos	p-exp.y \
1186051580eeSchristos	proc-service.list \
1187051580eeSchristos	rust-exp.y \
1188051580eeSchristos	ser-base.c \
1189051580eeSchristos	ser-unix.c \
1190051580eeSchristos	sol-thread.c \
1191051580eeSchristos	stap-probe.c \
1192051580eeSchristos	stub-termcap.c \
1193051580eeSchristos	symfile-mem.c \
1194051580eeSchristos	ui-file.h \
1195051580eeSchristos	mi/mi-common.c \
1196051580eeSchristos	$(SUBDIR_CLI_SRCS) \
1197051580eeSchristos	$(SUBDIR_TARGET_SRCS) \
1198051580eeSchristos	$(COMMON_SFILES) \
1199051580eeSchristos	$(SUBDIR_GCC_COMPILE_SRCS)
1200a1ba9ba4Schristos
1201a1ba9ba4Schristos# Header files that need to have srcdir added.  Note that in the cases
1202a1ba9ba4Schristos# where we use a macro like $(gdbcmd_h), things are carefully arranged
1203a1ba9ba4Schristos# so that each .h file is listed exactly once (M-x tags-search works
1204a1ba9ba4Schristos# wrong if TAGS has files twice).  Because this is tricky to get
1205a1ba9ba4Schristos# right, it is probably easiest just to list .h files here directly.
1206a1ba9ba4Schristos
1207a1ba9ba4SchristosHFILES_NO_SRCDIR = \
1208*184b2d41Schristos	aarch32-tdep.h \
1209051580eeSchristos	aarch64-ravenscar-thread.h \
121015d8e94aSchristos	aarch64-tdep.h \
121115d8e94aSchristos	ada-lang.h \
121215d8e94aSchristos	addrmap.h \
121315d8e94aSchristos	alpha-bsd-tdep.h \
121415d8e94aSchristos	alpha-tdep.h \
121515d8e94aSchristos	amd64-darwin-tdep.h \
121615d8e94aSchristos	amd64-linux-tdep.h \
121715d8e94aSchristos	amd64-nat.h \
121815d8e94aSchristos	amd64-tdep.h \
121915d8e94aSchristos	annotate.h \
122015d8e94aSchristos	arc-tdep.h \
122115d8e94aSchristos	arch-utils.h \
122215d8e94aSchristos	arm-linux-tdep.h \
1223*184b2d41Schristos	arm-nbsd-tdep.h \
122415d8e94aSchristos	arm-tdep.h \
1225*184b2d41Schristos	async-event.h \
122615d8e94aSchristos	auto-load.h \
122715d8e94aSchristos	auxv.h \
122815d8e94aSchristos	ax.h \
122915d8e94aSchristos	ax-gdb.h \
123015d8e94aSchristos	bcache.h \
123115d8e94aSchristos	bfd-target.h \
123215d8e94aSchristos	bfin-tdep.h \
123315d8e94aSchristos	block.h \
123415d8e94aSchristos	breakpoint.h \
123515d8e94aSchristos	bsd-kvm.h \
123615d8e94aSchristos	bsd-uthread.h \
123715d8e94aSchristos	build-id.h \
1238051580eeSchristos	buildsym-legacy.h \
123915d8e94aSchristos	buildsym.h \
124015d8e94aSchristos	c-lang.h \
124115d8e94aSchristos	charset.h \
124215d8e94aSchristos	charset-list.h \
124315d8e94aSchristos	cli-out.h \
124415d8e94aSchristos	coff-pe-read.h \
124515d8e94aSchristos	command.h \
124615d8e94aSchristos	complaints.h \
124715d8e94aSchristos	completer.h \
124815d8e94aSchristos	cp-abi.h \
124915d8e94aSchristos	cp-support.h \
1250051580eeSchristos	csky-tdep.h \
125115d8e94aSchristos	d-lang.h \
125215d8e94aSchristos	darwin-nat.h \
125315d8e94aSchristos	dcache.h \
125415d8e94aSchristos	defs.h \
125515d8e94aSchristos	dicos-tdep.h \
125615d8e94aSchristos	dictionary.h \
125715d8e94aSchristos	disasm.h \
125815d8e94aSchristos	dummy-frame.h \
1259*184b2d41Schristos	dwarf2/frame-tailcall.h \
1260*184b2d41Schristos	dwarf2/frame.h \
1261*184b2d41Schristos	dwarf2/expr.h \
1262*184b2d41Schristos	dwarf2/index-cache.h \
1263*184b2d41Schristos	dwarf2/index-common.h \
1264*184b2d41Schristos	dwarf2/loc.h \
1265*184b2d41Schristos	dwarf2/read.h \
126615d8e94aSchristos	event-top.h \
126715d8e94aSchristos	exceptions.h \
126815d8e94aSchristos	exec.h \
126915d8e94aSchristos	expression.h \
127015d8e94aSchristos	extension.h \
127115d8e94aSchristos	extension-priv.h \
127215d8e94aSchristos	f-lang.h \
127315d8e94aSchristos	fbsd-nat.h \
127415d8e94aSchristos	fbsd-tdep.h \
127515d8e94aSchristos	filesystem.h \
127615d8e94aSchristos	frame.h \
127715d8e94aSchristos	frame-base.h \
127815d8e94aSchristos	frame-unwind.h \
127915d8e94aSchristos	frv-tdep.h \
128015d8e94aSchristos	ft32-tdep.h \
128115d8e94aSchristos	gcore.h \
128215d8e94aSchristos	gdb_bfd.h \
128315d8e94aSchristos	gdb_curses.h \
128415d8e94aSchristos	gdb_expat.h \
128515d8e94aSchristos	gdb_obstack.h \
128615d8e94aSchristos	gdb_proc_service.h \
128715d8e94aSchristos	gdb_regex.h \
128815d8e94aSchristos	gdb_select.h \
128915d8e94aSchristos	gdb-stabs.h \
129015d8e94aSchristos	gdb_vfork.h \
129115d8e94aSchristos	gdb_wchar.h \
129215d8e94aSchristos	gdbarch.h \
129315d8e94aSchristos	gdbcmd.h \
129415d8e94aSchristos	gdbcore.h \
129515d8e94aSchristos	gdbthread.h \
129615d8e94aSchristos	gdbtypes.h \
129715d8e94aSchristos	glibc-tdep.h \
129815d8e94aSchristos	gnu-nat.h \
129915d8e94aSchristos	go-lang.h \
130015d8e94aSchristos	gregset.h \
130115d8e94aSchristos	hppa-bsd-tdep.h \
130215d8e94aSchristos	hppa-linux-offsets.h \
130315d8e94aSchristos	hppa-tdep.h \
130415d8e94aSchristos	i386-bsd-nat.h \
130515d8e94aSchristos	i386-darwin-tdep.h \
130615d8e94aSchristos	i386-linux-nat.h \
130715d8e94aSchristos	i386-linux-tdep.h \
130815d8e94aSchristos	i386-tdep.h \
130915d8e94aSchristos	i387-tdep.h \
131015d8e94aSchristos	ia64-libunwind-tdep.h \
131115d8e94aSchristos	ia64-tdep.h \
131215d8e94aSchristos	inf-child.h \
131315d8e94aSchristos	inf-loop.h \
131415d8e94aSchristos	inf-ptrace.h \
131515d8e94aSchristos	infcall.h \
131615d8e94aSchristos	inferior.h \
131715d8e94aSchristos	inflow.h \
131815d8e94aSchristos	inline-frame.h \
131915d8e94aSchristos	interps.h \
132015d8e94aSchristos	jit.h \
132115d8e94aSchristos	language.h \
132215d8e94aSchristos	linespec.h \
132315d8e94aSchristos	linux-fork.h \
132415d8e94aSchristos	linux-nat.h \
132515d8e94aSchristos	linux-record.h \
132615d8e94aSchristos	linux-tdep.h \
132715d8e94aSchristos	location.h \
132815d8e94aSchristos	m2-lang.h \
132915d8e94aSchristos	m32r-tdep.h \
133015d8e94aSchristos	m68k-tdep.h \
133115d8e94aSchristos	macroexp.h \
133215d8e94aSchristos	macroscope.h \
133315d8e94aSchristos	macrotab.h \
133415d8e94aSchristos	main.h \
133515d8e94aSchristos	mdebugread.h \
133615d8e94aSchristos	memattr.h \
133715d8e94aSchristos	memory-map.h \
133815d8e94aSchristos	memrange.h \
133915d8e94aSchristos	microblaze-tdep.h \
134015d8e94aSchristos	mips-linux-tdep.h \
134115d8e94aSchristos	mips-nbsd-tdep.h \
134215d8e94aSchristos	mips-tdep.h \
134315d8e94aSchristos	mn10300-tdep.h \
134415d8e94aSchristos	moxie-tdep.h \
134515d8e94aSchristos	nbsd-nat.h \
134615d8e94aSchristos	nbsd-tdep.h \
134715d8e94aSchristos	nds32-tdep.h \
134815d8e94aSchristos	nios2-tdep.h \
134915d8e94aSchristos	nto-tdep.h \
135015d8e94aSchristos	objc-lang.h \
135115d8e94aSchristos	objfiles.h \
135215d8e94aSchristos	obsd-nat.h \
135315d8e94aSchristos	obsd-tdep.h \
135415d8e94aSchristos	osabi.h \
135515d8e94aSchristos	osdata.h \
135615d8e94aSchristos	p-lang.h \
135715d8e94aSchristos	parser-defs.h \
135815d8e94aSchristos	ppc-fbsd-tdep.h \
135915d8e94aSchristos	ppc-linux-tdep.h \
136015d8e94aSchristos	ppc-nbsd-tdep.h \
136115d8e94aSchristos	ppc-obsd-tdep.h \
136215d8e94aSchristos	ppc-ravenscar-thread.h \
136315d8e94aSchristos	ppc-tdep.h \
136415d8e94aSchristos	ppc64-tdep.h \
136515d8e94aSchristos	probe.h \
136615d8e94aSchristos	proc-utils.h \
136715d8e94aSchristos	procfs.h \
136815d8e94aSchristos	progspace.h \
1369051580eeSchristos	progspace-and-thread.h \
137015d8e94aSchristos	prologue-value.h \
137115d8e94aSchristos	psympriv.h \
137215d8e94aSchristos	psymtab.h \
137315d8e94aSchristos	ravenscar-thread.h \
137415d8e94aSchristos	record.h \
137515d8e94aSchristos	record-full.h \
137615d8e94aSchristos	regcache.h \
137715d8e94aSchristos	reggroups.h \
137815d8e94aSchristos	regset.h \
137915d8e94aSchristos	remote.h \
138015d8e94aSchristos	remote-fileio.h \
138115d8e94aSchristos	remote-notif.h \
1382051580eeSchristos	riscv-fbsd-tdep.h \
1383*184b2d41Schristos	riscv-ravenscar-thread.h \
1384051580eeSchristos	riscv-tdep.h \
138515d8e94aSchristos	rs6000-aix-tdep.h \
138615d8e94aSchristos	rs6000-tdep.h \
1387*184b2d41Schristos	run-on-main-thread.h \
138815d8e94aSchristos	s390-linux-tdep.h \
1389051580eeSchristos	s390-tdep.h \
139015d8e94aSchristos	score-tdep.h \
139115d8e94aSchristos	selftest-arch.h \
139215d8e94aSchristos	sentinel-frame.h \
139315d8e94aSchristos	ser-base.h \
139415d8e94aSchristos	ser-event.h \
139515d8e94aSchristos	ser-tcp.h \
139615d8e94aSchristos	ser-unix.h \
139715d8e94aSchristos	serial.h \
139815d8e94aSchristos	sh-tdep.h \
139915d8e94aSchristos	sim-regno.h \
140015d8e94aSchristos	skip.h \
140115d8e94aSchristos	sol2-tdep.h \
140215d8e94aSchristos	solib.h \
140315d8e94aSchristos	solib-aix.h \
140415d8e94aSchristos	solib-darwin.h \
140515d8e94aSchristos	solib-svr4.h \
140615d8e94aSchristos	solib-target.h \
140715d8e94aSchristos	solist.h \
140815d8e94aSchristos	source.h \
1409051580eeSchristos	source-cache.h \
141015d8e94aSchristos	sparc-nat.h \
141115d8e94aSchristos	sparc-ravenscar-thread.h \
141215d8e94aSchristos	sparc-tdep.h \
141315d8e94aSchristos	sparc64-tdep.h \
141415d8e94aSchristos	stabsread.h \
141515d8e94aSchristos	stack.h \
141615d8e94aSchristos	stap-probe.h \
141715d8e94aSchristos	symfile.h \
141815d8e94aSchristos	symtab.h \
141915d8e94aSchristos	target.h \
142015d8e94aSchristos	target-dcache.h \
142115d8e94aSchristos	target-descriptions.h \
142215d8e94aSchristos	terminal.h \
142315d8e94aSchristos	tid-parse.h \
142415d8e94aSchristos	top.h \
1425*184b2d41Schristos	tracectf.h \
142615d8e94aSchristos	tracefile.h \
142715d8e94aSchristos	tracepoint.h \
142815d8e94aSchristos	trad-frame.h \
1429051580eeSchristos	target-float.h \
143015d8e94aSchristos	tramp-frame.h \
1431*184b2d41Schristos	type-stack.h \
143215d8e94aSchristos	typeprint.h \
143315d8e94aSchristos	ui-file.h \
143415d8e94aSchristos	ui-out.h \
1435051580eeSchristos	ui-style.h \
143615d8e94aSchristos	user-regs.h \
143715d8e94aSchristos	utils.h \
143815d8e94aSchristos	valprint.h \
143915d8e94aSchristos	value.h \
144015d8e94aSchristos	varobj.h \
144115d8e94aSchristos	varobj-iter.h \
144215d8e94aSchristos	vax-tdep.h \
144315d8e94aSchristos	windows-nat.h \
144415d8e94aSchristos	windows-tdep.h \
144515d8e94aSchristos	x86-bsd-nat.h \
144615d8e94aSchristos	x86-linux-nat.h \
144715d8e94aSchristos	x86-nat.h \
144815d8e94aSchristos	xcoffread.h \
1449*184b2d41Schristos	xml-builtin.h \
145015d8e94aSchristos	xml-support.h \
145115d8e94aSchristos	xml-syscall.h \
145215d8e94aSchristos	xml-tdesc.h \
145315d8e94aSchristos	xtensa-tdep.h \
1454*184b2d41Schristos	arch/aarch32.h \
1455051580eeSchristos	arch/aarch64.h \
145615d8e94aSchristos	arch/aarch64-insn.h \
1457*184b2d41Schristos	arch/arc.h \
145815d8e94aSchristos	arch/arm.h \
1459051580eeSchristos	arch/i386.h \
1460051580eeSchristos	arch/ppc-linux-common.h \
1461051580eeSchristos	arch/ppc-linux-tdesc.h \
1462051580eeSchristos	arch/riscv.h \
146315d8e94aSchristos	cli/cli-cmds.h \
146415d8e94aSchristos	cli/cli-decode.h \
146515d8e94aSchristos	cli/cli-script.h \
146615d8e94aSchristos	cli/cli-setshow.h \
1467051580eeSchristos	cli/cli-style.h \
146815d8e94aSchristos	cli/cli-utils.h \
146915d8e94aSchristos	compile/compile.h \
1470051580eeSchristos	compile/compile-c.h \
1471051580eeSchristos	compile/compile-cplus.h \
1472051580eeSchristos	compile/compile-internal.h \
1473051580eeSchristos	compile/compile-object-load.h \
1474051580eeSchristos	compile/compile-object-run.h \
1475051580eeSchristos	compile/gcc-c-plugin.h \
1476051580eeSchristos	compile/gcc-cp-plugin.h \
147715d8e94aSchristos	config/nm-linux.h \
147815d8e94aSchristos	config/nm-nto.h \
147915d8e94aSchristos	config/djgpp/langinfo.h \
148015d8e94aSchristos	config/djgpp/nl_types.h \
148115d8e94aSchristos	config/i386/nm-i386gnu.h \
148215d8e94aSchristos	config/sparc/nm-sol2.h \
148315d8e94aSchristos	mi/mi-cmds.h \
148415d8e94aSchristos	mi/mi-common.h \
148515d8e94aSchristos	mi/mi-console.h \
148615d8e94aSchristos	mi/mi-getopt.h \
148715d8e94aSchristos	mi/mi-main.h \
148815d8e94aSchristos	mi/mi-out.h \
148915d8e94aSchristos	mi/mi-parse.h \
149015d8e94aSchristos	nat/aarch64-linux.h \
149115d8e94aSchristos	nat/aarch64-linux-hw-point.h \
1492051580eeSchristos	nat/aarch64-sve-linux-ptrace.h \
149315d8e94aSchristos	nat/amd64-linux-siginfo.h \
149415d8e94aSchristos	nat/gdb_ptrace.h \
149515d8e94aSchristos	nat/gdb_thread_db.h \
1496051580eeSchristos	nat/fork-inferior.h \
149715d8e94aSchristos	nat/linux-btrace.h \
149815d8e94aSchristos	nat/linux-namespaces.h \
149915d8e94aSchristos	nat/linux-nat.h \
150015d8e94aSchristos	nat/linux-osdata.h \
150115d8e94aSchristos	nat/linux-personality.h \
150215d8e94aSchristos	nat/linux-ptrace.h \
150315d8e94aSchristos	nat/linux-waitpid.h \
150415d8e94aSchristos	nat/mips-linux-watch.h \
150515d8e94aSchristos	nat/ppc-linux.h \
150615d8e94aSchristos	nat/x86-cpuid.h \
150715d8e94aSchristos	nat/x86-dregs.h \
150815d8e94aSchristos	nat/x86-gcc-cpuid.h \
150915d8e94aSchristos	nat/x86-linux.h \
151015d8e94aSchristos	nat/x86-linux-dregs.h \
151115d8e94aSchristos	python/py-event.h \
151215d8e94aSchristos	python/py-events.h \
151315d8e94aSchristos	python/py-stopevent.h \
151415d8e94aSchristos	python/python.h \
151515d8e94aSchristos	python/python-internal.h \
151615d8e94aSchristos	regformats/regdef.h \
151715d8e94aSchristos	target/resume.h \
151815d8e94aSchristos	target/target.h \
151915d8e94aSchristos	target/wait.h \
152015d8e94aSchristos	target/waitstatus.h \
152115d8e94aSchristos	tui/tui.h \
152215d8e94aSchristos	tui/tui-command.h \
152315d8e94aSchristos	tui/tui-data.h \
152415d8e94aSchristos	tui/tui-disasm.h \
152515d8e94aSchristos	tui/tui-file.h \
152615d8e94aSchristos	tui/tui-hooks.h \
152715d8e94aSchristos	tui/tui-io.h \
152815d8e94aSchristos	tui/tui-layout.h \
152915d8e94aSchristos	tui/tui-regs.h \
153015d8e94aSchristos	tui/tui-source.h \
153115d8e94aSchristos	tui/tui-stack.h \
153215d8e94aSchristos	tui/tui-win.h \
153315d8e94aSchristos	tui/tui-windata.h \
153415d8e94aSchristos	tui/tui-wingeneral.h \
1535051580eeSchristos	tui/tui-winsource.h \
1536051580eeSchristos	x86-tdep.h
1537a1ba9ba4Schristos
1538a1ba9ba4Schristos# Header files that already have srcdir in them, or which are in objdir.
1539a1ba9ba4Schristos
154015d8e94aSchristosHFILES_WITH_SRCDIR = \
154115d8e94aSchristos	../bfd/bfd.h \
154215d8e94aSchristos	jit-reader.h
1543a1ba9ba4Schristos
1544a1ba9ba4Schristos# {X,T,NAT}DEPFILES are something of a pain in that it's hard to
1545a1ba9ba4Schristos# default their values the way we do for SER_HARDWIRE; in the future
1546a1ba9ba4Schristos# maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
1547a1ba9ba4Schristos# variables analogous to SER_HARDWIRE which get defaulted in this
1548a1ba9ba4Schristos# Makefile.in
1549a1ba9ba4Schristos
1550051580eeSchristosDEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) $(SIM_OBS)
1551a1ba9ba4Schristos
1552a1ba9ba4SchristosSOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS)
1553a1ba9ba4Schristos# Don't include YYFILES (*.c) because we already include *.y in SFILES,
1554a1ba9ba4Schristos# and it's more useful to see it in the .y file.
1555a1ba9ba4SchristosTAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
1556a1ba9ba4Schristos	$(CONFIG_SRCS)
1557a1ba9ba4SchristosTAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
1558a1ba9ba4Schristos
1559a1ba9ba4SchristosCOMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
1560051580eeSchristos	mi/mi-common.o \
156115d8e94aSchristos	version.o \
156215d8e94aSchristos	xml-builtin.o \
1563051580eeSchristos	$(patsubst %.c,%.o,$(COMMON_SFILES)) \
1564051580eeSchristos	$(SUBDIR_CLI_OBS) \
1565051580eeSchristos	$(SUBDIR_TARGET_OBS) \
1566a1ba9ba4Schristos	$(SUBDIR_GCC_COMPILE_OBS)
1567a1ba9ba4Schristos
1568*184b2d41SchristosSUBDIRS = doc @subdirs@ data-directory
1569a1ba9ba4SchristosCLEANDIRS = $(SUBDIRS)
1570a1ba9ba4Schristos
1571a1ba9ba4Schristos# List of subdirectories in the build tree that must exist.
1572a1ba9ba4Schristos# This is used to force build failures in existing trees when
1573a1ba9ba4Schristos# a new directory is added.
1574a1ba9ba4Schristos# The format here is for the `case' shell command.
1575*184b2d41SchristosREQUIRED_SUBDIRS = doc | testsuite | data-directory
1576a1ba9ba4Schristos
1577051580eeSchristos# Parser intermediate files.
157815d8e94aSchristosYYFILES = \
1579a1ba9ba4Schristos	ada-exp.c \
158015d8e94aSchristos	ada-lex.c \
158115d8e94aSchristos	c-exp.c \
158215d8e94aSchristos	cp-name-parser.c \
158315d8e94aSchristos	d-exp.c \
158415d8e94aSchristos	f-exp.c \
158515d8e94aSchristos	go-exp.c \
158615d8e94aSchristos	m2-exp.c \
158715d8e94aSchristos	p-exp.c \
158815d8e94aSchristos	rust-exp.c
158915d8e94aSchristos
1590051580eeSchristos# ada-lex.c is included by another file, so it shouldn't wind up as a
1591051580eeSchristos# .o itself.
1592051580eeSchristosYYOBJ = $(filter-out ada-lex.o,$(patsubst %.c,%.o,$(YYFILES)))
1593a1ba9ba4Schristos
1594a1ba9ba4Schristos# Things which need to be built when making a distribution.
1595a1ba9ba4Schristos
1596a1ba9ba4SchristosDISTSTUFF = $(YYFILES)
1597a1ba9ba4Schristos
1598a1ba9ba4Schristos
1599a1ba9ba4Schristos# All generated files which can be included by another file.
160015d8e94aSchristosgenerated_files = \
160115d8e94aSchristos	ada-lex.c \
160215d8e94aSchristos	config.h \
160315d8e94aSchristos	jit-reader.h \
1604*184b2d41Schristos	$(NAT_GENERATED_FILES) \
1605*184b2d41Schristos	$(NM_H)
1606a1ba9ba4Schristos
160715d8e94aSchristos# Flags needed to compile Python code
160815d8e94aSchristosPYTHON_CFLAGS = @PYTHON_CFLAGS@
1609a1ba9ba4Schristos
1610051580eeSchristosall: gdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb
1611a1ba9ba4Schristos	@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
1612a1ba9ba4Schristos
161315d8e94aSchristos# Rule for compiling .c files in the top-level gdb directory.
1614051580eeSchristos# The order-only dependencies ensure that we create the build subdirectories.
1615051580eeSchristos%.o: %.c | $(CONFIG_DEP_SUBDIR)
161615d8e94aSchristos	$(COMPILE) $<
161715d8e94aSchristos	$(POSTCOMPILE)
161815d8e94aSchristos
1619051580eeSchristos$(CONFIG_DEP_SUBDIR):
1620051580eeSchristos	$(SHELL) $(srcdir)/../mkinstalldirs $@
1621051580eeSchristos
1622051580eeSchristos# Python files need special flags.
1623051580eeSchristospython/%.o: INTERNAL_CFLAGS += $(PYTHON_CFLAGS)
1624051580eeSchristos
162515d8e94aSchristos# Rules for compiling .c files in the various source subdirectories.
162615d8e94aSchristos%.o: $(srcdir)/gdbtk/generic/%.c
162715d8e94aSchristos	$(COMPILE) $(all_gdbtk_cflags) $<
162815d8e94aSchristos	$(POSTCOMPILE)
162915d8e94aSchristos
1630a1ba9ba4Schristosinstallcheck:
1631a1ba9ba4Schristos
1632a1ba9ba4Schristos# The check target can not use subdir_do, because subdir_do does not
1633a1ba9ba4Schristos# use TARGET_FLAGS_TO_PASS.
1634a1ba9ba4Schristoscheck: force
1635a1ba9ba4Schristos	@if [ -f testsuite/Makefile ]; then \
1636a1ba9ba4Schristos	  rootme=`pwd`; export rootme; \
1637a1ba9ba4Schristos	  rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1638a1ba9ba4Schristos	  cd testsuite; \
1639a1ba9ba4Schristos	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
1640a1ba9ba4Schristos	else true; fi
1641a1ba9ba4Schristos
1642a1ba9ba4Schristoscheck-perf: force
1643a1ba9ba4Schristos	@if [ -f testsuite/Makefile ]; then \
1644a1ba9ba4Schristos	  rootme=`pwd`; export rootme; \
1645a1ba9ba4Schristos	  rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1646a1ba9ba4Schristos	  cd testsuite; \
1647a1ba9ba4Schristos	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check-perf; \
1648a1ba9ba4Schristos	else true; fi
1649a1ba9ba4Schristos
1650a1ba9ba4Schristoscheck-read1: force
1651a1ba9ba4Schristos	@if [ -f testsuite/Makefile ]; then \
1652a1ba9ba4Schristos	  rootme=`pwd`; export rootme; \
1653a1ba9ba4Schristos	  rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1654a1ba9ba4Schristos	  cd testsuite; \
1655a1ba9ba4Schristos	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check-read1; \
1656a1ba9ba4Schristos	else true; fi
1657a1ba9ba4Schristos
1658b2396a7bSchristoscheck-parallel: force
1659b2396a7bSchristos	@if [ -f testsuite/Makefile ]; then \
1660b2396a7bSchristos	  rootme=`pwd`; export rootme; \
1661b2396a7bSchristos	  rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1662b2396a7bSchristos	  cd testsuite; \
1663b2396a7bSchristos	  $(MAKE) $(TARGET_FLAGS_TO_PASS) check-parallel; \
1664b2396a7bSchristos	else true; fi
1665b2396a7bSchristos
1666a1ba9ba4Schristos# The idea is to parallelize testing of multilibs, for example:
1667a1ba9ba4Schristos#   make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1668a1ba9ba4Schristos# will run 3 concurrent sessions of check, eventually testing all 10
1669a1ba9ba4Schristos# combinations.  GNU make is required for the % pattern to work, as is
1670a1ba9ba4Schristos# a shell that expands alternations within braces.  If GNU make is not
1671a1ba9ba4Schristos# used, this rule will harmlessly fail to match.  Used FORCE_PARALLEL to
1672a1ba9ba4Schristos# prevent serialized checking due to the passed RUNTESTFLAGS.
1673a1ba9ba4Schristos# FIXME: use config.status --config not --version, when available.
1674a1ba9ba4Schristoscheck//%: force
1675a1ba9ba4Schristos	@if [ -f testsuite/config.status ]; then \
1676a1ba9ba4Schristos	  rootme=`pwd`; export rootme; \
1677a1ba9ba4Schristos	  rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
1678a1ba9ba4Schristos	  target=`echo "$@" | sed 's,//.*,,'`; \
1679a1ba9ba4Schristos	  variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
1680a1ba9ba4Schristos	  vardots=`echo "$$variant" | sed 's,/,.,g'`; \
1681a1ba9ba4Schristos	  testdir=testsuite.$$vardots; \
1682a1ba9ba4Schristos	  if [ ! -f $$testdir/Makefile ] && [ -f testsuite/config.status ]; then \
1683a1ba9ba4Schristos	    configargs=`cd testsuite && ./config.status --version | \
1684a1ba9ba4Schristos	      sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
1685a1ba9ba4Schristos	    $(SHELL) $(srcdir)/../mkinstalldirs $$testdir && \
1686a1ba9ba4Schristos	    (cd $$testdir && \
1687a1ba9ba4Schristos	     eval $(SHELL) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
1688a1ba9ba4Schristos			   "\"--srcdir=\$$rootsrc/testsuite\"" \
1689a1ba9ba4Schristos	     ); \
1690a1ba9ba4Schristos	  else :; fi && cd $$testdir && \
1691a1ba9ba4Schristos	  $(MAKE) $(TARGET_FLAGS_TO_PASS) \
1692a1ba9ba4Schristos	    RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
1693a1ba9ba4Schristos	    FORCE_PARALLEL=$(if $(FORCE_PARALLEL),1,$(if $(RUNTESTFLAGS),,1)) \
1694a1ba9ba4Schristos	    "$$target"; \
1695a1ba9ba4Schristos	else true; fi
1696a1ba9ba4Schristos
1697a1ba9ba4Schristos# The set of headers checked by 'check-headers' by default.
1698a1ba9ba4SchristosCHECK_HEADERS = $(HFILES_NO_SRCDIR)
1699a1ba9ba4Schristos
1700a1ba9ba4Schristos# Try to compile each header in isolation, thus ensuring headers are
1701a1ba9ba4Schristos# self-contained.
1702a1ba9ba4Schristos#
1703a1ba9ba4Schristos# Defaults to checking all $HFILES_NO_SRCDIR headers.
1704a1ba9ba4Schristos#
1705a1ba9ba4Schristos# Do:
1706a1ba9ba4Schristos#
1707a1ba9ba4Schristos#    make check-headers CHECK_HEADERS="header.h list.h"
1708a1ba9ba4Schristos#
1709a1ba9ba4Schristos# to check specific headers.
1710a1ba9ba4Schristos#
1711a1ba9ba4Schristoscheck-headers:
1712a1ba9ba4Schristos	@echo Checking headers.
1713a1ba9ba4Schristos	for i in $(CHECK_HEADERS) ; do \
171415d8e94aSchristos		$(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \
171515d8e94aSchristos		$(INTERNAL_CFLAGS) -include defs.h $(srcdir)/$$i ; \
1716a1ba9ba4Schristos	done
1717a1ba9ba4Schristos.PHONY: check-headers
1718a1ba9ba4Schristos
1719a1ba9ba4Schristosinfo install-info clean-info dvi pdf install-pdf html install-html: force
1720a1ba9ba4Schristos	@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
1721a1ba9ba4Schristos
1722a1ba9ba4Schristos# Traditionally "install" depends on "all".  But it may be useful
1723a1ba9ba4Schristos# not to; for example, if the user has made some trivial change to a
1724a1ba9ba4Schristos# source file and doesn't care about rebuilding or just wants to save the
1725a1ba9ba4Schristos# time it takes for make to check that all is up to date.
1726a1ba9ba4Schristos# install-only is intended to address that need.
1727a1ba9ba4Schristosinstall: all
1728a1ba9ba4Schristos	@$(MAKE) $(FLAGS_TO_PASS) install-only
1729a1ba9ba4Schristos
1730a1ba9ba4Schristosinstall-only: $(CONFIG_INSTALL)
1731a1ba9ba4Schristos	transformed_name=`t='$(program_transform_name)'; \
1732a1ba9ba4Schristos			  echo gdb | sed -e "$$t"` ; \
1733a1ba9ba4Schristos		if test "x$$transformed_name" = x; then \
1734a1ba9ba4Schristos		  transformed_name=gdb ; \
1735a1ba9ba4Schristos		else \
1736a1ba9ba4Schristos		  true ; \
1737a1ba9ba4Schristos		fi ; \
1738a1ba9ba4Schristos		$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
1739*184b2d41Schristos		$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdb$(EXEEXT) \
1740a1ba9ba4Schristos			$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
1741a1ba9ba4Schristos		$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
1742a1ba9ba4Schristos		$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
1743a1ba9ba4Schristos	if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
1744a1ba9ba4Schristos	then \
1745a1ba9ba4Schristos	  transformed_name=`t='$(program_transform_name)'; \
1746a1ba9ba4Schristos			    echo gcore | sed -e "$$t"` ; \
1747a1ba9ba4Schristos		  if test "x$$transformed_name" = x; then \
1748a1ba9ba4Schristos		    transformed_name=gcore ; \
1749a1ba9ba4Schristos		  else \
1750a1ba9ba4Schristos		    true ; \
1751a1ba9ba4Schristos		  fi ; \
1752a1ba9ba4Schristos		  $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
1753a1ba9ba4Schristos		  $(INSTALL_SCRIPT) gcore \
1754a1ba9ba4Schristos			  $(DESTDIR)$(bindir)/$$transformed_name; \
1755a1ba9ba4Schristos	fi
1756051580eeSchristos	transformed_name=`t='$(program_transform_name)'; \
1757051580eeSchristos			  echo gdb-add-index | sed -e "$$t"` ; \
1758051580eeSchristos	if test "x$$transformed_name" = x; then \
1759051580eeSchristos	  transformed_name=gdb-add-index ; \
1760051580eeSchristos	else \
1761051580eeSchristos	  true ; \
1762051580eeSchristos	fi ; \
1763051580eeSchristos	$(INSTALL_SCRIPT) $(srcdir)/contrib/gdb-add-index.sh \
1764051580eeSchristos		$(DESTDIR)$(bindir)/$$transformed_name
1765a1ba9ba4Schristos	@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
1766a1ba9ba4Schristos
1767a1ba9ba4Schristosinstall-strip:
1768a1ba9ba4Schristos	$(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1769a1ba9ba4Schristos	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1770a1ba9ba4Schristos	  `test -z '$(STRIP)' || \
1771a1ba9ba4Schristos	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
1772a1ba9ba4Schristos
1773a1ba9ba4Schristosinstall-guile:
1774a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/guile/gdb
1775a1ba9ba4Schristos
1776a1ba9ba4Schristosinstall-python:
1777a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
1778a1ba9ba4Schristos
1779a1ba9ba4Schristosuninstall: force $(CONFIG_UNINSTALL)
1780a1ba9ba4Schristos	transformed_name=`t='$(program_transform_name)'; \
1781a1ba9ba4Schristos			  echo gdb | sed -e $$t` ; \
1782a1ba9ba4Schristos		if test "x$$transformed_name" = x; then \
1783a1ba9ba4Schristos		  transformed_name=gdb ; \
1784a1ba9ba4Schristos		else \
1785a1ba9ba4Schristos		  true ; \
1786a1ba9ba4Schristos		fi ; \
1787a1ba9ba4Schristos		rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
1788a1ba9ba4Schristos		      $(DESTDIR)$(man1dir)/$$transformed_name.1
1789a1ba9ba4Schristos	if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
1790a1ba9ba4Schristos	then \
1791a1ba9ba4Schristos	  transformed_name=`t='$(program_transform_name)'; \
1792a1ba9ba4Schristos			    echo gcore | sed -e "$$t"` ; \
1793a1ba9ba4Schristos		  if test "x$$transformed_name" = x; then \
1794a1ba9ba4Schristos		    transformed_name=gcore ; \
1795a1ba9ba4Schristos		  else \
1796a1ba9ba4Schristos		    true ; \
1797a1ba9ba4Schristos		  fi ; \
1798a1ba9ba4Schristos		  rm -f $(DESTDIR)$(bindir)/$$transformed_name; \
1799a1ba9ba4Schristos	fi
1800a1ba9ba4Schristos	@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
1801a1ba9ba4Schristos
1802a1ba9ba4Schristos# The C++ name parser can be built standalone for testing.
1803a1ba9ba4Schristostest-cp-name-parser.o: cp-name-parser.c
1804a1ba9ba4Schristos	$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
1805a1ba9ba4Schristos	$(POSTCOMPILE)
1806a1ba9ba4Schristos
1807a1ba9ba4Schristostest-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
1808051580eeSchristos	$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) \
1809051580eeSchristos		-o test-cp-name-parser$(EXEEXT) test-cp-name-parser.o \
1810051580eeSchristos		$(LIBIBERTY)
1811a1ba9ba4Schristos
1812a1ba9ba4Schristos# We do this by grepping through sources.  If that turns out to be too slow,
1813a1ba9ba4Schristos# maybe we could just require every .o file to have an initialization routine
1814a1ba9ba4Schristos# of a given name (top.o -> _initialize_top, etc.).
1815a1ba9ba4Schristos#
1816a1ba9ba4Schristos# Formatting conventions:  The name of the _initialize_* routines must start
1817a1ba9ba4Schristos# in column zero, and must not be inside #if.
1818a1ba9ba4Schristos#
1819a1ba9ba4Schristos# Note that the set of files with init functions might change, or the names
1820a1ba9ba4Schristos# of the functions might change, so this files needs to depend on all the
1821051580eeSchristos# source files that will be linked into gdb.  However, due to the way
1822051580eeSchristos# this Makefile has generally been written, we do this indirectly, by
1823051580eeSchristos# computing the list of source files from the list of object files.
1824a1ba9ba4Schristos
1825051580eeSchristosINIT_FILES = \
1826051580eeSchristos	$(patsubst %.o,%.c, \
1827051580eeSchristos	  $(patsubst %-exp.o,%-exp.y, \
1828051580eeSchristos	    $(filter-out init.o version.o %_S.o %_U.o,\
1829051580eeSchristos	      $(COMMON_OBS))))
1830a1ba9ba4Schristos
1831051580eeSchristosinit.c: stamp-init; @true
1832051580eeSchristosstamp-init: $(INIT_FILES)
1833051580eeSchristos	@$(ECHO_INIT_C) echo "Making init.c"
1834a1ba9ba4Schristos	@rm -f init.c-tmp init.l-tmp
1835a1ba9ba4Schristos	@touch init.c-tmp
1836051580eeSchristos	@-for f in $(INIT_FILES); do \
1837051580eeSchristos	    sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' \
1838051580eeSchristos	        $(srcdir)/$$f 2>/dev/null; \
1839051580eeSchristos	done > init.l-tmp
1840a1ba9ba4Schristos	@echo '/* Do not modify this file.  */' >>init.c-tmp
1841a1ba9ba4Schristos	@echo '/* It is created automatically by the Makefile.  */'>>init.c-tmp
1842a1ba9ba4Schristos	@echo '#include "defs.h"      /* For initialize_file_ftype.  */' >>init.c-tmp
1843a1ba9ba4Schristos	@echo 'extern void initialize_all_files(void);' >>init.c-tmp
1844a1ba9ba4Schristos	@sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp >>init.c-tmp
1845a1ba9ba4Schristos	@echo 'void' >>init.c-tmp
1846a1ba9ba4Schristos	@echo 'initialize_all_files (void)' >>init.c-tmp
1847a1ba9ba4Schristos	@echo '{' >>init.c-tmp
1848a1ba9ba4Schristos	@sed -e 's/\(.*\)/  _initialize_\1 ();/' <init.l-tmp >>init.c-tmp
1849a1ba9ba4Schristos	@echo '}' >>init.c-tmp
1850051580eeSchristos	@$(SHELL) $(srcdir)/../move-if-change init.c-tmp init.c
1851051580eeSchristos	@echo stamp > stamp-init
1852a1ba9ba4Schristos
1853a1ba9ba4Schristos.PRECIOUS: init.c
1854a1ba9ba4Schristos
1855a1ba9ba4Schristos# Create a library of the gdb object files and build GDB by linking
1856a1ba9ba4Schristos# against that.
1857a1ba9ba4Schristos#
1858a1ba9ba4Schristos# init.o is very important.  It pulls in the rest of GDB.
1859051580eeSchristosLIBGDB_OBS = $(sort $(COMMON_OBS)) init.o
1860a1ba9ba4Schristoslibgdb.a: $(LIBGDB_OBS)
1861a1ba9ba4Schristos	-rm -f libgdb.a
1862a1ba9ba4Schristos	$(AR) q libgdb.a $(LIBGDB_OBS)
1863a1ba9ba4Schristos	$(RANLIB) libgdb.a
1864a1ba9ba4Schristos
1865a1ba9ba4Schristos# Removing the old gdb first works better if it is running, at least on SunOS.
1866051580eeSchristosgdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(CDEPS) $(TDEPLIBS)
1867051580eeSchristos	$(SILENCE) rm -f gdb$(EXEEXT)
1868051580eeSchristos	$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
1869a1ba9ba4Schristos		-o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
1870a1ba9ba4Schristos		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
1871051580eeSchristosifneq ($(CODESIGN_CERT),)
1872051580eeSchristos	$(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT)
1873051580eeSchristosendif
1874a1ba9ba4Schristos
1875a1ba9ba4Schristos# Convenience rule to handle recursion.
1876a1ba9ba4Schristos.PHONY: all-data-directory
1877a1ba9ba4Schristosall-data-directory: data-directory/Makefile
1878a1ba9ba4Schristos	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=data-directory subdir_do
1879a1ba9ba4Schristos
1880a1ba9ba4Schristos# This is useful when debugging GDB, because some Unix's don't let you run GDB
1881a1ba9ba4Schristos# on itself without copying the executable.  So "make gdb1" will make
1882a1ba9ba4Schristos# gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
1883a1ba9ba4Schristos# Removing gdb1 before the copy is the right thing if gdb1 is open
1884a1ba9ba4Schristos# in another process.
1885a1ba9ba4Schristosgdb1$(EXEEXT): gdb$(EXEEXT)
1886a1ba9ba4Schristos	rm -f gdb1$(EXEEXT)
1887a1ba9ba4Schristos	cp gdb$(EXEEXT) gdb1$(EXEEXT)
1888a1ba9ba4Schristos
1889a1ba9ba4Schristos# Put the proper machine-specific files first, so M-. on a machine
1890a1ba9ba4Schristos# specific routine gets the one for the correct machine.  (FIXME: those
1891a1ba9ba4Schristos# files go in twice; we should be removing them from the main list).
1892a1ba9ba4Schristos
1893a1ba9ba4Schristos# TAGS depends on all the files that go into it so you can rebuild TAGS
1894a1ba9ba4Schristos# with `make TAGS' and not have to say `rm TAGS' first.
1895a1ba9ba4Schristos
1896a1ba9ba4SchristosGDB_NM_FILE = @GDB_NM_FILE@
1897a1ba9ba4SchristosTAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
1898a1ba9ba4Schristos	@echo Making TAGS
1899a1ba9ba4Schristos	etags `(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
1900a1ba9ba4Schristos	`(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
1901a1ba9ba4Schristos		echo $(srcdir)/$$i ; \
1902a1ba9ba4Schristos	done ; for i in $(TAGFILES_WITH_SRCDIR); do \
1903a1ba9ba4Schristos		echo $$i ; \
1904a1ba9ba4Schristos	done) | sed -e 's/\.o$$/\.c/'` \
1905a1ba9ba4Schristos	`find $(srcdir)/config -name '*.h' -print`
1906a1ba9ba4Schristos
1907a1ba9ba4Schristostags: TAGS
1908a1ba9ba4Schristos
1909a1ba9ba4Schristosclean mostlyclean: $(CONFIG_CLEAN)
1910a1ba9ba4Schristos	@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
1911051580eeSchristos	rm -f *.o *.a *~ init.c-tmp init.l-tmp version.c-tmp
1912051580eeSchristos	rm -f init.c stamp-init version.c stamp-version
1913a1ba9ba4Schristos	rm -f gdb$(EXEEXT) core make.log
1914a1ba9ba4Schristos	rm -f gdb[0-9]$(EXEEXT)
1915a1ba9ba4Schristos	rm -f test-cp-name-parser$(EXEEXT)
1916a1ba9ba4Schristos	rm -f xml-builtin.c stamp-xml
1917a1ba9ba4Schristos	rm -f $(DEPDIR)/*
1918051580eeSchristos	for i in $(CONFIG_SRC_SUBDIR); do \
1919051580eeSchristos		rm -f $$i/*.o;	\
1920051580eeSchristos		rm -f $$i/$(DEPDIR)/*; \
1921051580eeSchristos	done
1922a1ba9ba4Schristos
1923a1ba9ba4Schristos# This used to depend on c-exp.c m2-exp.c TAGS
1924a1ba9ba4Schristos# I believe this is wrong; the makefile standards for distclean just
1925a1ba9ba4Schristos# describe removing files; the only sort of "re-create a distribution"
1926a1ba9ba4Schristos# functionality described is if the distributed files are unmodified.
1927a1ba9ba4Schristosdistclean: clean
1928a1ba9ba4Schristos	@$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
1929051580eeSchristos	rm -f nm.h config.status config.h stamp-h b jit-reader.h
1930051580eeSchristos	rm -f gdb-gdb.py gdb-gdb.gdb
1931a1ba9ba4Schristos	rm -f y.output yacc.acts yacc.tmp y.tab.h
1932a1ba9ba4Schristos	rm -f config.log config.cache
1933a1ba9ba4Schristos	rm -f Makefile
1934a1ba9ba4Schristos	rm -rf $(DEPDIR)
1935051580eeSchristos	for i in $(CONFIG_SRC_SUBDIR); do \
1936051580eeSchristos		if test -d $$i/$(DEPDIR); then rmdir $$i/$(DEPDIR); fi \
1937051580eeSchristos	done
1938a1ba9ba4Schristos
1939a1ba9ba4Schristosmaintainer-clean: local-maintainer-clean do-maintainer-clean distclean
1940a1ba9ba4Schristosrealclean: maintainer-clean
1941a1ba9ba4Schristos
1942a1ba9ba4Schristoslocal-maintainer-clean:
1943a1ba9ba4Schristos	@echo "This command is intended for maintainers to use;"
1944a1ba9ba4Schristos	@echo "it deletes files that may require special tools to rebuild."
1945a1ba9ba4Schristos	rm -f c-exp.c \
1946a1ba9ba4Schristos		cp-name-parser.c \
1947a1ba9ba4Schristos		ada-lex.c ada-exp.c \
1948b2396a7bSchristos		d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
1949051580eeSchristos	rm -f TAGS
1950a1ba9ba4Schristos	rm -f $(YYFILES)
1951a1ba9ba4Schristos	rm -f nm.h config.status
1952a1ba9ba4Schristos
1953a1ba9ba4Schristosdo-maintainer-clean:
1954a1ba9ba4Schristos	@$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(CLEANDIRS)" \
1955a1ba9ba4Schristos		subdir_do
1956a1ba9ba4Schristos
1957a1ba9ba4Schristosdiststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
1958a1ba9ba4Schristos	cd doc; $(MAKE) $(MFLAGS) diststuff
1959a1ba9ba4Schristos
1960a1ba9ba4Schristossubdir_do: force
1961a1ba9ba4Schristos	@for i in $(DODIRS); do \
1962a1ba9ba4Schristos		case $$i in \
1963a1ba9ba4Schristos		$(REQUIRED_SUBDIRS)) \
1964a1ba9ba4Schristos			if [ ! -f ./$$i/Makefile ] ; then \
1965a1ba9ba4Schristos				echo "Missing $$i/Makefile" >&2 ; \
1966a1ba9ba4Schristos				exit 1 ; \
1967a1ba9ba4Schristos			fi ;; \
1968a1ba9ba4Schristos		esac ; \
1969a1ba9ba4Schristos		if [ -f ./$$i/Makefile ] ; then \
1970a1ba9ba4Schristos			if (cd ./$$i; \
1971a1ba9ba4Schristos				$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1972a1ba9ba4Schristos			else exit 1 ; fi ; \
1973a1ba9ba4Schristos		else true ; fi ; \
1974a1ba9ba4Schristos	done
1975a1ba9ba4Schristos
1976051580eeSchristosMakefile: Makefile.in config.status
1977*184b2d41Schristos	$(SHELL) config.status $@
1978a1ba9ba4Schristos
1979051580eeSchristosdata-directory/Makefile: data-directory/Makefile.in config.status
1980*184b2d41Schristos	$(SHELL) config.status $@
1981a1ba9ba4Schristos
1982a1ba9ba4Schristos.PHONY: run
1983a1ba9ba4Schristosrun: Makefile
1984a1ba9ba4Schristos	./gdb$(EXEEXT) --data-directory=`pwd`/data-directory $(GDBFLAGS)
1985a1ba9ba4Schristos
1986a1ba9ba4Schristosjit-reader.h: $(srcdir)/jit-reader.in
1987a1ba9ba4Schristos	$(SHELL) config.status $@
1988a1ba9ba4Schristos
1989a1ba9ba4Schristosgcore: $(srcdir)/gcore.in
1990a1ba9ba4Schristos	$(SHELL) config.status $@
1991a1ba9ba4Schristos
1992051580eeSchristosgdb-gdb.py: $(srcdir)/gdb-gdb.py.in
1993051580eeSchristos	$(SHELL) config.status $@
1994051580eeSchristos
1995051580eeSchristosgdb-gdb.gdb: $(srcdir)/gdb-gdb.gdb.in
1996051580eeSchristos	$(SHELL) config.status $@
1997051580eeSchristos
1998a1ba9ba4Schristosconfig.h: stamp-h ; @true
1999a1ba9ba4Schristosstamp-h: $(srcdir)/config.in config.status
2000*184b2d41Schristos	$(SHELL) config.status config.h
2001*184b2d41Schristos
2002*184b2d41Schristosnm.h: stamp-nmh ; @true
2003*184b2d41Schristosstamp-nmh: config.status
2004*184b2d41Schristos	$(SHELL) config.status nm.h
2005a1ba9ba4Schristos
2006051580eeSchristosconfig.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh
2007a1ba9ba4Schristos	$(SHELL) config.status --recheck
2008a1ba9ba4Schristos
2009a1ba9ba4SchristosACLOCAL = aclocal
2010a1ba9ba4SchristosACLOCAL_AMFLAGS = -I ../config
2011a1ba9ba4Schristos
2012a1ba9ba4Schristos# Keep these in sync with the includes in acinclude.m4.
2013a1ba9ba4Schristosaclocal_m4_deps = \
2014a1ba9ba4Schristos	configure.ac \
2015a1ba9ba4Schristos	acx_configure_dir.m4 \
2016a1ba9ba4Schristos	transform.m4 \
2017a1ba9ba4Schristos	../bfd/bfd.m4 \
2018a1ba9ba4Schristos	../config/acinclude.m4 \
2019*184b2d41Schristos	../config/enable.m4 \
2020a1ba9ba4Schristos	../config/plugins.m4 \
2021a1ba9ba4Schristos	../config/lead-dot.m4 \
2022a1ba9ba4Schristos	../config/override.m4 \
2023a1ba9ba4Schristos	../config/largefile.m4 \
2024a1ba9ba4Schristos	../config/gettext-sister.m4 \
2025a1ba9ba4Schristos	../config/lib-ld.m4 \
2026a1ba9ba4Schristos	../config/lib-prefix.m4 \
2027a1ba9ba4Schristos	../config/lib-link.m4 \
2028a1ba9ba4Schristos	../config/acx.m4 \
2029a1ba9ba4Schristos	../config/tcl.m4 \
2030a1ba9ba4Schristos	../config/depstand.m4 \
2031a1ba9ba4Schristos	../config/lcmessage.m4 \
2032a1ba9ba4Schristos	../config/codeset.m4 \
2033*184b2d41Schristos	../config/zlib.m4 \
2034*184b2d41Schristos	../config/ax_pthread.m4
2035a1ba9ba4Schristos
2036a1ba9ba4Schristos$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
2037a1ba9ba4Schristos	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
2038a1ba9ba4Schristos
2039a1ba9ba4SchristosAUTOCONF = autoconf
2040a1ba9ba4Schristosconfigure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
2041a1ba9ba4Schristos$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(configure_deps)
2042a1ba9ba4Schristos	cd $(srcdir) && $(AUTOCONF)
2043a1ba9ba4Schristos
2044a1ba9ba4SchristosAUTOHEADER = autoheader
2045a1ba9ba4Schristos$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(configure_deps)
2046a1ba9ba4Schristos	cd $(srcdir) && $(AUTOHEADER)
2047a1ba9ba4Schristos	rm -f stamp-h
2048a1ba9ba4Schristos	touch $@
2049a1ba9ba4Schristos
2050a1ba9ba4Schristos# automatic rebuilding in automake-generated Makefiles requires
2051a1ba9ba4Schristos# this rule in the toplevel Makefile, which, with GNU make, causes
2052a1ba9ba4Schristos# the desired updates through the implicit regeneration of the Makefile
2053a1ba9ba4Schristos# and all of its prerequisites.
2054a1ba9ba4Schristosam--refresh:
2055a1ba9ba4Schristos	@:
2056a1ba9ba4Schristos
2057a1ba9ba4Schristosforce:
2058a1ba9ba4Schristos
2059a1ba9ba4Schristos# Documentation!
2060a1ba9ba4Schristos# GDB QUICK REFERENCE (TeX dvi file, CM fonts)
2061a1ba9ba4Schristosdoc/refcard.dvi:
2062a1ba9ba4Schristos	cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS)
2063a1ba9ba4Schristos
2064a1ba9ba4Schristos# GDB QUICK REFERENCE (PostScript output, common PS fonts)
2065a1ba9ba4Schristosdoc/refcard.ps:
2066a1ba9ba4Schristos	cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS)
2067a1ba9ba4Schristos
2068a1ba9ba4Schristos# GDB MANUAL: TeX dvi file
2069a1ba9ba4Schristosdoc/gdb.dvi:
2070a1ba9ba4Schristos	cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS)
2071a1ba9ba4Schristos
2072a1ba9ba4Schristos# GDB MANUAL: info file
2073a1ba9ba4Schristosdoc/gdb.info:
2074a1ba9ba4Schristos	cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)
2075a1ba9ba4Schristos
2076a1ba9ba4Schristos# Make copying.c from COPYING
2077a1ba9ba4Schristos$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copying.awk
2078a1ba9ba4Schristos	awk -f $(srcdir)/copying.awk \
2079a1ba9ba4Schristos		< $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
2080a1ba9ba4Schristos	mv $(srcdir)/copying.tmp $(srcdir)/copying.c
2081a1ba9ba4Schristos
2082051580eeSchristosversion.c: stamp-version; @true
2083051580eeSchristos# Note that the obvious names for the temp file are taken by
2084051580eeSchristos# create-version.sh.
2085*184b2d41Schristosstamp-version: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh
2086*184b2d41Schristos	$(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir) \
2087051580eeSchristos	    $(host_alias) $(target_alias) version-t.t
2088051580eeSchristos	@$(SHELL) $(srcdir)/../move-if-change version-t.t version.c
2089051580eeSchristos	@echo stamp > stamp-version
2090a1ba9ba4Schristos
2091a1ba9ba4Schristos
2092a1ba9ba4Schristosgdb.cxref: $(SFILES)
2093a1ba9ba4Schristos	cxref -I. $(SFILES) >gdb.cxref
2094a1ba9ba4Schristos
2095a1ba9ba4Schristosforce_update:
2096a1ba9ba4Schristos
2097a1ba9ba4Schristos# GNU Make has an annoying habit of putting *all* the Makefile variables
2098a1ba9ba4Schristos# into the environment, unless you include this target as a circumvention.
2099a1ba9ba4Schristos# Rumor is that this will be fixed (and this target can be removed)
2100a1ba9ba4Schristos# in GNU Make 4.0.
2101a1ba9ba4Schristos.NOEXPORT:
2102a1ba9ba4Schristos
2103a1ba9ba4Schristos# GNU Make 3.63 has a different problem: it keeps tacking command line
2104a1ba9ba4Schristos# overrides onto the definition of $(MAKE).  This variable setting
2105a1ba9ba4Schristos# will remove them.
2106a1ba9ba4SchristosMAKEOVERRIDES =
2107a1ba9ba4Schristos
2108a1ba9ba4SchristosALLDEPFILES = \
2109*184b2d41Schristos	aarch32-tdep.c \
2110051580eeSchristos	aarch64-fbsd-nat.c \
2111051580eeSchristos	aarch64-fbsd-tdep.c \
2112a1ba9ba4Schristos	aarch64-linux-nat.c \
211315d8e94aSchristos	aarch64-linux-tdep.c \
211415d8e94aSchristos	aarch64-nbsd-nat.c \
211515d8e94aSchristos	aarch64-nbsd-tdep.c \
211615d8e94aSchristos	aarch64-newlib-tdep.c \
2117051580eeSchristos	aarch64-ravenscar-thread.c \
211815d8e94aSchristos	aarch64-tdep.c \
2119a1ba9ba4Schristos	aix-thread.c \
212015d8e94aSchristos	alpha-bsd-nat.c \
212115d8e94aSchristos	alpha-bsd-tdep.c \
212215d8e94aSchristos	alpha-linux-nat.c \
2123a1ba9ba4Schristos	alpha-linux-tdep.c \
212415d8e94aSchristos	alpha-mdebug-tdep.c \
212515d8e94aSchristos	alpha-nbsd-tdep.c \
212615d8e94aSchristos	alpha-obsd-tdep.c \
212715d8e94aSchristos	alpha-tdep.c \
212815d8e94aSchristos	amd64-bsd-nat.c \
2129a1ba9ba4Schristos	amd64-darwin-tdep.c \
2130a1ba9ba4Schristos	amd64-dicos-tdep.c \
213115d8e94aSchristos	amd64-fbsd-nat.c \
213215d8e94aSchristos	amd64-fbsd-tdep.c \
213315d8e94aSchristos	amd64-linux-nat.c \
213415d8e94aSchristos	amd64-linux-tdep.c \
213515d8e94aSchristos	amd64-nat.c \
213615d8e94aSchristos	amd64-nbsd-nat.c \
213715d8e94aSchristos	amd64-nbsd-tdep.c \
213815d8e94aSchristos	amd64-obsd-nat.c \
213915d8e94aSchristos	amd64-obsd-tdep.c \
2140a1ba9ba4Schristos	amd64-sol2-tdep.c \
214115d8e94aSchristos	amd64-tdep.c \
214215d8e94aSchristos	arc-tdep.c \
214315d8e94aSchristos	arm.c \
214415d8e94aSchristos	arm-bsd-tdep.c \
2145051580eeSchristos	arm-fbsd-nat.c \
2146051580eeSchristos	arm-fbsd-tdep.c \
214715d8e94aSchristos	arm-get-next-pcs.c \
214815d8e94aSchristos	arm-linux.c \
214915d8e94aSchristos	arm-linux-nat.c \
215015d8e94aSchristos	arm-linux-tdep.c \
215115d8e94aSchristos	arm-nbsd-nat.c \
215215d8e94aSchristos	arm-nbsd-tdep.c \
215315d8e94aSchristos	arm-obsd-tdep.c \
215415d8e94aSchristos	arm-symbian-tdep.c \
215515d8e94aSchristos	arm-tdep.c \
2156a1ba9ba4Schristos	avr-tdep.c \
215715d8e94aSchristos	bfin-linux-tdep.c \
215815d8e94aSchristos	bfin-tdep.c \
2159*184b2d41Schristos	bpf-tdep.c \
216015d8e94aSchristos	bsd-kvm.c \
216115d8e94aSchristos	bsd-uthread.c \
2162051580eeSchristos	csky-linux-tdep.c \
2163051580eeSchristos	csky-tdep.c \
216415d8e94aSchristos	darwin-nat.c \
216515d8e94aSchristos	dicos-tdep.c \
2166a1ba9ba4Schristos	fbsd-nat.c \
2167a1ba9ba4Schristos	fbsd-tdep.c \
2168a1ba9ba4Schristos	fork-child.c \
2169a1ba9ba4Schristos	ft32-tdep.c \
2170a1ba9ba4Schristos	glibc-tdep.c \
217115d8e94aSchristos	go32-nat.c \
217215d8e94aSchristos	h8300-tdep.c \
217315d8e94aSchristos	hppa-bsd-tdep.c \
217415d8e94aSchristos	hppa-linux-nat.c \
217515d8e94aSchristos	hppa-linux-tdep.c \
217615d8e94aSchristos	hppa-nbsd-nat.c \
217715d8e94aSchristos	hppa-nbsd-tdep.c \
217815d8e94aSchristos	hppa-obsd-nat.c \
217915d8e94aSchristos	hppa-obsd-tdep.c \
2180a1ba9ba4Schristos	hppa-tdep.c \
218115d8e94aSchristos	i386-bsd-nat.c \
218215d8e94aSchristos	i386-bsd-tdep.c \
218315d8e94aSchristos	i386-darwin-nat.c \
218415d8e94aSchristos	i386-darwin-tdep.c \
2185a1ba9ba4Schristos	i386-dicos-tdep.c \
218615d8e94aSchristos	i386-fbsd-nat.c \
218715d8e94aSchristos	i386-fbsd-tdep.c \
218815d8e94aSchristos	i386-gnu-nat.c \
218915d8e94aSchristos	i386-gnu-tdep.c \
219015d8e94aSchristos	i386-linux-nat.c \
219115d8e94aSchristos	i386-linux-tdep.c \
219215d8e94aSchristos	i386-nbsd-nat.c \
219315d8e94aSchristos	i386-nbsd-tdep.c \
219415d8e94aSchristos	i386-obsd-nat.c \
219515d8e94aSchristos	i386-obsd-tdep.c \
219615d8e94aSchristos	i386-sol2-nat.c \
219715d8e94aSchristos	i386-sol2-tdep.c \
219815d8e94aSchristos	i386-tdep.c \
2199*184b2d41Schristos	i386-windows-tdep.c \
220015d8e94aSchristos	i387-tdep.c \
2201a1ba9ba4Schristos	ia64-libunwind-tdep.c \
220215d8e94aSchristos	ia64-linux-nat.c \
220315d8e94aSchristos	ia64-linux-tdep.c \
220415d8e94aSchristos	ia64-tdep.c \
220515d8e94aSchristos	ia64-vms-tdep.c \
220615d8e94aSchristos	inf-ptrace.c \
2207a1ba9ba4Schristos	linux-fork.c \
2208a1ba9ba4Schristos	linux-record.c \
220915d8e94aSchristos	linux-tdep.c \
2210a1ba9ba4Schristos	lm32-tdep.c \
221115d8e94aSchristos	m32r-linux-nat.c \
221215d8e94aSchristos	m32r-linux-tdep.c \
2213a1ba9ba4Schristos	m32r-tdep.c \
221415d8e94aSchristos	m68hc11-tdep.c \
221515d8e94aSchristos	m68k-bsd-nat.c \
221615d8e94aSchristos	m68k-bsd-tdep.c \
221715d8e94aSchristos	m68k-linux-nat.c \
221815d8e94aSchristos	m68k-linux-tdep.c \
2219a1ba9ba4Schristos	m68k-tdep.c \
222015d8e94aSchristos	microblaze-linux-tdep.c \
222115d8e94aSchristos	microblaze-tdep.c \
222215d8e94aSchristos	mingw-hdep.c \
222315d8e94aSchristos	mips-fbsd-nat.c \
222415d8e94aSchristos	mips-fbsd-tdep.c \
222515d8e94aSchristos	mips-linux-nat.c \
222615d8e94aSchristos	mips-linux-tdep.c \
222715d8e94aSchristos	mips-nbsd-nat.c \
222815d8e94aSchristos	mips-nbsd-tdep.c \
2229a1ba9ba4Schristos	mips-sde-tdep.c \
2230a1ba9ba4Schristos	mips-tdep.c \
223115d8e94aSchristos	mips64-obsd-nat.c \
223215d8e94aSchristos	mips64-obsd-tdep.c \
2233a1ba9ba4Schristos	msp430-tdep.c \
223415d8e94aSchristos	nbsd-nat.c \
223515d8e94aSchristos	nbsd-tdep.c \
2236b2396a7bSchristos	nds32-tdep.c \
223715d8e94aSchristos	nios2-linux-tdep.c \
223815d8e94aSchristos	nios2-tdep.c \
223915d8e94aSchristos	obsd-nat.c \
224015d8e94aSchristos	obsd-tdep.c \
224115d8e94aSchristos	posix-hdep.c \
224215d8e94aSchristos	ppc-fbsd-nat.c \
224315d8e94aSchristos	ppc-fbsd-tdep.c \
224415d8e94aSchristos	ppc-linux-nat.c \
224515d8e94aSchristos	ppc-linux-tdep.c \
224615d8e94aSchristos	ppc-nbsd-nat.c \
224715d8e94aSchristos	ppc-nbsd-tdep.c \
224815d8e94aSchristos	ppc-obsd-nat.c \
224915d8e94aSchristos	ppc-obsd-tdep.c \
225015d8e94aSchristos	ppc-ravenscar-thread.c \
225115d8e94aSchristos	ppc-sysv-tdep.c \
225215d8e94aSchristos	ppc64-tdep.c \
2253a1ba9ba4Schristos	procfs.c \
2254a1ba9ba4Schristos	ravenscar-thread.c \
2255a1ba9ba4Schristos	remote-sim.c \
2256051580eeSchristos	riscv-fbsd-nat.c \
2257051580eeSchristos	riscv-fbsd-tdep.c \
2258051580eeSchristos	riscv-linux-nat.c \
2259051580eeSchristos	riscv-linux-tdep.c \
2260*184b2d41Schristos	riscv-ravenscar-thread.c \
2261051580eeSchristos	riscv-tdep.c \
2262a1ba9ba4Schristos	rl78-tdep.c \
2263a1ba9ba4Schristos	rs6000-lynx178-tdep.c \
226415d8e94aSchristos	rs6000-nat.c \
226515d8e94aSchristos	rs6000-tdep.c \
2266a1ba9ba4Schristos	rx-tdep.c \
226715d8e94aSchristos	s390-linux-nat.c \
226815d8e94aSchristos	s390-linux-tdep.c \
2269051580eeSchristos	s390-tdep.c \
2270a1ba9ba4Schristos	score-tdep.c \
227115d8e94aSchristos	ser-go32.c \
227215d8e94aSchristos	ser-mingw.c \
227315d8e94aSchristos	ser-pipe.c \
227415d8e94aSchristos	ser-tcp.c \
2275051580eeSchristos	ser-uds.c \
227615d8e94aSchristos	sh-nbsd-nat.c \
227715d8e94aSchristos	sh-nbsd-tdep.c \
227815d8e94aSchristos	sh-tdep.c \
2279a1ba9ba4Schristos	sol2-tdep.c \
228015d8e94aSchristos	solib-aix.c \
2281a1ba9ba4Schristos	solib-svr4.c \
228215d8e94aSchristos	sparc-linux-nat.c \
228315d8e94aSchristos	sparc-linux-tdep.c \
228415d8e94aSchristos	sparc-nat.c \
228515d8e94aSchristos	sparc-nbsd-nat.c \
228615d8e94aSchristos	sparc-nbsd-tdep.c \
228715d8e94aSchristos	sparc-obsd-tdep.c \
2288a1ba9ba4Schristos	sparc-ravenscar-thread.c \
228915d8e94aSchristos	sparc-sol2-nat.c \
229015d8e94aSchristos	sparc-sol2-tdep.c \
229115d8e94aSchristos	sparc-tdep.c \
229215d8e94aSchristos	sparc64-fbsd-nat.c \
229315d8e94aSchristos	sparc64-fbsd-tdep.c \
229415d8e94aSchristos	sparc64-linux-nat.c \
229515d8e94aSchristos	sparc64-linux-tdep.c \
229615d8e94aSchristos	sparc64-nat.c \
229715d8e94aSchristos	sparc64-nbsd-nat.c \
229815d8e94aSchristos	sparc64-nbsd-tdep.c \
229915d8e94aSchristos	sparc64-obsd-nat.c \
230015d8e94aSchristos	sparc64-obsd-tdep.c \
230115d8e94aSchristos	sparc64-sol2-tdep.c \
230215d8e94aSchristos	sparc64-tdep.c \
230315d8e94aSchristos	tilegx-linux-nat.c \
230415d8e94aSchristos	tilegx-linux-tdep.c \
230515d8e94aSchristos	tilegx-tdep.c \
2306a1ba9ba4Schristos	v850-tdep.c \
230715d8e94aSchristos	vax-bsd-nat.c \
230815d8e94aSchristos	vax-nbsd-tdep.c \
230915d8e94aSchristos	vax-tdep.c \
231015d8e94aSchristos	windows-nat.c \
231115d8e94aSchristos	windows-tdep.c \
231215d8e94aSchristos	x86-nat.c \
2313051580eeSchristos	x86-tdep.c \
2314a1ba9ba4Schristos	xcoffread.c \
2315a1ba9ba4Schristos	xstormy16-tdep.c \
231615d8e94aSchristos	xtensa-config.c \
231715d8e94aSchristos	xtensa-linux-nat.c \
231815d8e94aSchristos	xtensa-linux-tdep.c \
231915d8e94aSchristos	xtensa-tdep.c \
2320*184b2d41Schristos	xtensa-xtregs.c
2321a1ba9ba4Schristos
2322a1ba9ba4Schristos# Some files need explicit build rules (due to -Werror problems) or due
2323a1ba9ba4Schristos# to sub-directory fun 'n' games.
2324a1ba9ba4Schristos
2325a1ba9ba4Schristos# ada-exp.c can appear in srcdir, for releases; or in ., for
2326a1ba9ba4Schristos# development builds.
2327a1ba9ba4SchristosADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
2328a1ba9ba4Schristos
2329a1ba9ba4Schristosada-exp.o: ada-exp.c
2330051580eeSchristos	$(COMPILE) $(ADA_EXP_C)
2331a1ba9ba4Schristos	$(POSTCOMPILE)
2332a1ba9ba4Schristos
2333a1ba9ba4Schristos# Message files.  Based on code in gcc/Makefile.in.
2334a1ba9ba4Schristos
2335a1ba9ba4Schristos# Rules for generating translated message descriptions.  Disabled by
2336a1ba9ba4Schristos# autoconf if the tools are not available.
2337a1ba9ba4Schristos
2338a1ba9ba4Schristos.PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
2339a1ba9ba4Schristos
2340a1ba9ba4Schristosall-po: $(CATALOGS)
2341a1ba9ba4Schristos
2342a1ba9ba4Schristos# This notation should be acceptable to all Make implementations used
2343a1ba9ba4Schristos# by people who are interested in updating .po files.
2344a1ba9ba4Schristosupdate-po: $(CATALOGS:.gmo=.pox)
2345a1ba9ba4Schristos
2346a1ba9ba4Schristos# N.B. We do not attempt to copy these into $(srcdir).  The snapshot
2347a1ba9ba4Schristos# script does that.
234815d8e94aSchristos%.gmo: %.po
2349a1ba9ba4Schristos	-test -d po || mkdir po
2350a1ba9ba4Schristos	$(GMSGFMT) --statistics -o $@ $<
2351a1ba9ba4Schristos
2352a1ba9ba4Schristos# The new .po has to be gone over by hand, so we deposit it into
2353a1ba9ba4Schristos# build/po with a different extension.  If build/po/$(PACKAGE).pot
2354a1ba9ba4Schristos# exists, use it (it was just created), else use the one in srcdir.
235515d8e94aSchristos%.pox: %.po
2356a1ba9ba4Schristos	-test -d po || mkdir po
2357a1ba9ba4Schristos	$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
2358a1ba9ba4Schristos			then echo po/$(PACKAGE).pot; \
2359a1ba9ba4Schristos			else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
2360a1ba9ba4Schristos
2361a1ba9ba4Schristos# This rule has to look for .gmo modules in both srcdir and the cwd,
2362a1ba9ba4Schristos# and has to check that we actually have a catalog for each language,
2363a1ba9ba4Schristos# in case they weren't built or included with the distribution.
2364a1ba9ba4Schristosinstall-po:
2365a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
2366a1ba9ba4Schristos	cats="$(CATALOGS)"; for cat in $$cats; do \
2367a1ba9ba4Schristos	  lang=`basename $$cat | sed 's/\.gmo$$//'`; \
2368a1ba9ba4Schristos	  if [ -f $$cat ]; then :; \
2369a1ba9ba4Schristos	  elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
2370a1ba9ba4Schristos	  else continue; \
2371a1ba9ba4Schristos	  fi; \
2372a1ba9ba4Schristos	  dir=$(localedir)/$$lang/LC_MESSAGES; \
2373a1ba9ba4Schristos	  echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
2374a1ba9ba4Schristos	  $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
2375a1ba9ba4Schristos	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
2376a1ba9ba4Schristos	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
2377a1ba9ba4Schristos	done
2378a1ba9ba4Schristosuninstall-po:
2379a1ba9ba4Schristos	cats="$(CATALOGS)"; for cat in $$cats; do \
2380a1ba9ba4Schristos	  lang=`basename $$cat | sed 's/\.gmo$$//'`; \
2381a1ba9ba4Schristos	  if [ -f $$cat ]; then :; \
2382a1ba9ba4Schristos	  elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
2383a1ba9ba4Schristos	  else continue; \
2384a1ba9ba4Schristos	  fi; \
2385a1ba9ba4Schristos	  dir=$(localedir)/$$lang/LC_MESSAGES; \
2386a1ba9ba4Schristos	  rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
2387a1ba9ba4Schristos	done
2388a1ba9ba4Schristos# Delete po/*.gmo only if we are not building in the source directory.
2389a1ba9ba4Schristosclean-po:
2390a1ba9ba4Schristos	-if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi
2391a1ba9ba4Schristos
2392a1ba9ba4Schristos# Rule for regenerating the message template (gdb.pot).  Instead of
2393a1ba9ba4Schristos# forcing everyone to edit POTFILES.in, which proved impractical, this
2394a1ba9ba4Schristos# rule has no dependencies and always regenerates gdb.pot.  This is
2395a1ba9ba4Schristos# relatively harmless since the .po files do not directly depend on
2396a1ba9ba4Schristos# it.  The .pot file is left in the build directory.  Since GDB's
2397a1ba9ba4Schristos# Makefile lacks a cannonical list of sources (missing xm, tm and nm
2398a1ba9ba4Schristos# files) force this rule.
2399a1ba9ba4Schristos$(PACKAGE).pot: po/$(PACKAGE).pot
2400a1ba9ba4Schristospo/$(PACKAGE).pot: force
2401a1ba9ba4Schristos	-test -d po || mkdir po
2402a1ba9ba4Schristos	sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)
2403a1ba9ba4Schristos
2404a1ba9ba4Schristos
2405a1ba9ba4Schristos#
2406a1ba9ba4Schristos# YACC/LEX dependencies
2407a1ba9ba4Schristos#
2408a1ba9ba4Schristos# LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
2409a1ba9ba4Schristos# exist in srcdir, then compiled in objdir to LANG-exp.o.  If we
2410a1ba9ba4Schristos# said LANG-exp.c rather than ./c-exp.c some makes would
2411a1ba9ba4Schristos# sometimes re-write it into $(srcdir)/c-exp.c.  Remove bogus
2412a1ba9ba4Schristos# decls for malloc/realloc/free which conflict with everything else.
2413a1ba9ba4Schristos# Strictly speaking c-exp.c should therefore depend on
2414a1ba9ba4Schristos# Makefile.in, but that was a pretty big annoyance.
2415a1ba9ba4Schristos
241615d8e94aSchristos%.c: %.y
2417051580eeSchristos	$(ECHO_YACC) $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- \
2418051580eeSchristos		$(YACC) $(YFLAGS) || (rm -f $@.tmp; false)
2419051580eeSchristos	@sed -e '/extern.*malloc/d' \
2420a1ba9ba4Schristos	     -e '/extern.*realloc/d' \
2421a1ba9ba4Schristos	     -e '/extern.*free/d' \
2422a1ba9ba4Schristos	     -e '/include.*malloc.h/d' \
2423a1ba9ba4Schristos	     -e 's/\([^x]\)malloc/\1xmalloc/g' \
2424a1ba9ba4Schristos	     -e 's/\([^x]\)realloc/\1xrealloc/g' \
2425a1ba9ba4Schristos	     -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2426a1ba9ba4Schristos	     -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
2427a1ba9ba4Schristos	     -e '/^#line.*y.tab.c/d' \
242815d8e94aSchristos	     -e 's/YY_NULL/YY_NULLPTR/g' \
2429051580eeSchristos	  < $@.tmp > $@.new && \
2430051580eeSchristos	  rm -f $@.tmp && \
2431051580eeSchristos	  mv $@.new $@
243215d8e94aSchristos%.c: %.l
2433051580eeSchristos	$(ECHO_LEX) $(FLEX) -t $<  \
2434051580eeSchristos	    | sed -e '/extern.*malloc/d' \
2435a1ba9ba4Schristos	        -e '/extern.*realloc/d' \
2436a1ba9ba4Schristos	        -e '/extern.*free/d' \
2437a1ba9ba4Schristos	        -e '/include.*malloc.h/d' \
2438a1ba9ba4Schristos	        -e 's/\([^x]\)malloc/\1xmalloc/g' \
2439a1ba9ba4Schristos	        -e 's/\([^x]\)realloc/\1xrealloc/g' \
2440a1ba9ba4Schristos	        -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
2441a1ba9ba4Schristos	        -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
2442a1ba9ba4Schristos		-e 's/yy_flex_xrealloc/yyxrealloc/g' \
2443051580eeSchristos	      > $@.new && \
2444051580eeSchristos	    mv $@.new $@
2445a1ba9ba4Schristos
2446a1ba9ba4Schristos.PRECIOUS: ada-lex.c
2447a1ba9ba4Schristos
2448a1ba9ba4Schristos# XML rules
2449a1ba9ba4Schristos
2450a1ba9ba4Schristosxml-builtin.c: stamp-xml; @true
2451a1ba9ba4Schristosstamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES)
2452051580eeSchristos	$(SILENCE) rm -f xml-builtin.tmp
2453051580eeSchristos	$(ECHO_GEN_XML_BUILTIN) AWK="$(AWK)" \
2454a1ba9ba4Schristos	  $(SHELL) $(srcdir)/features/feature_to_c.sh \
2455a1ba9ba4Schristos	  xml-builtin.tmp $(XMLFILES)
2456051580eeSchristos	$(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin.c
2457051580eeSchristos	$(SILENCE) echo stamp > stamp-xml
2458a1ba9ba4Schristos
2459a1ba9ba4Schristos.PRECIOUS: xml-builtin.c
2460a1ba9ba4Schristos
2461a1ba9ba4Schristos#
2462a1ba9ba4Schristos# GDBTK sub-directory
2463a1ba9ba4Schristos#
2464a1ba9ba4Schristos
2465a1ba9ba4Schristosall-gdbtk: insight$(EXEEXT)
2466a1ba9ba4Schristos
2467a1ba9ba4Schristosinstall-gdbtk:
2468a1ba9ba4Schristos	transformed_name=`t='$(program_transform_name)'; \
2469a1ba9ba4Schristos		  echo insight | sed -e $$t` ; \
2470a1ba9ba4Schristos	if test "x$$transformed_name" = x; then \
2471a1ba9ba4Schristos	  transformed_name=insight ; \
2472a1ba9ba4Schristos	else \
2473a1ba9ba4Schristos	  true ; \
2474a1ba9ba4Schristos	fi ; \
2475a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
2476*184b2d41Schristos	$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) insight$(EXEEXT) \
2477a1ba9ba4Schristos		$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
2478a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs \
2479a1ba9ba4Schristos		$(DESTDIR)$(GDBTK_LIBRARY) ; \
2480a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs \
2481a1ba9ba4Schristos		$(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \
2482a1ba9ba4Schristos	$(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \
2483a1ba9ba4Schristos		$(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
2484a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs \
2485a1ba9ba4Schristos		$(DESTDIR)$(GDBTK_LIBRARY)/images \
2486a1ba9ba4Schristos		$(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \
2487a1ba9ba4Schristos	$(SHELL) $(srcdir)/../mkinstalldirs \
2488a1ba9ba4Schristos		$(DESTDIR)$(GDBTK_LIBRARY)/help \
2489a1ba9ba4Schristos		$(DESTDIR)$(GDBTK_LIBRARY)/help/images \
2490a1ba9ba4Schristos		$(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
2491a1ba9ba4Schristos	cd $(srcdir)/gdbtk/library ; \
2492a1ba9ba4Schristos	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; \
2493a1ba9ba4Schristos	  do \
2494a1ba9ba4Schristos		$(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
2495a1ba9ba4Schristos	  done ;
2496a1ba9ba4Schristos
2497a1ba9ba4Schristosuninstall-gdbtk:
2498a1ba9ba4Schristos	transformed_name=`t='$(program_transform_name)'; \
2499a1ba9ba4Schristos		  echo insight | sed -e $$t` ; \
2500a1ba9ba4Schristos	if test "x$$transformed_name" = x; then \
2501a1ba9ba4Schristos		transformed_name=insight ; \
2502a1ba9ba4Schristos	else \
2503a1ba9ba4Schristos		true ; \
2504a1ba9ba4Schristos	fi ; \
2505a1ba9ba4Schristos	rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
2506a1ba9ba4Schristos	rm -rf $(DESTDIR)$(GDBTK_LIBRARY)
2507a1ba9ba4Schristos
2508a1ba9ba4Schristosclean-gdbtk:
2509a1ba9ba4Schristos	rm -f insight$(EXEEXT)
2510a1ba9ba4Schristos
2511a1ba9ba4Schristos# Removing the old gdb first works better if it is running, at least on SunOS.
2512051580eeSchristosinsight$(EXEEXT): gdbtk-main.o libgdb.a $(CDEPS) $(TDEPLIBS)
2513a1ba9ba4Schristos	rm -f insight$(EXEEXT)
2514051580eeSchristos	$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
2515a1ba9ba4Schristos		-o insight$(EXEEXT) gdbtk-main.o libgdb.a \
2516a1ba9ba4Schristos		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
2517a1ba9ba4Schristos
2518a1ba9ba4Schristosgdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
2519a1ba9ba4Schristos	$(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
2520a1ba9ba4Schristos
2521a1ba9ba4Schristosall_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \
2522a1ba9ba4Schristos		$(ITK_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
2523a1ba9ba4Schristos		$(GDBTK_CFLAGS) \
2524a1ba9ba4Schristos		-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
2525a1ba9ba4Schristos		-DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
2526a1ba9ba4Schristos
2527a1ba9ba4Schristos#
252815d8e94aSchristos# Dependency tracking.
2529a1ba9ba4Schristos#
2530a1ba9ba4Schristos
253115d8e94aSchristosifeq ($(DEPMODE),depmode=gcc3)
2532a1ba9ba4Schristos# Note that we put the dependencies into a .Tpo file, then move them
2533a1ba9ba4Schristos# into place if the compile succeeds.  We need this because gcc does
2534a1ba9ba4Schristos# not atomically write the dependency output file.
253515d8e94aSchristosoverride COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
2536051580eeSchristos	-MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
2537051580eeSchristosoverride POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
2538051580eeSchristos	$(@D)/$(DEPDIR)/$(basename $(@F)).Po
253915d8e94aSchristoselse
254015d8e94aSchristosoverride COMPILE.pre = source='$<' object='$@' libtool=no \
2541051580eeSchristos	DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
2542051580eeSchristos	$(CXX) -x c++ $(CXX_DIALECT)
2543a1ba9ba4Schristos# depcomp handles atomicity for us, so we don't need a postcompile
2544a1ba9ba4Schristos# step.
254515d8e94aSchristosoverride POSTCOMPILE =
254615d8e94aSchristosendif
2547a1ba9ba4Schristos
2548a1ba9ba4Schristos# A list of all the objects we might care about in this build, for
2549a1ba9ba4Schristos# dependency tracking.
2550a1ba9ba4Schristosall_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \
2551a1ba9ba4Schristos	test-cp-name-parser.o
2552a1ba9ba4Schristos
2553051580eeSchristos# All the .deps files to include.
2554051580eeSchristosall_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\
2555051580eeSchristos    $(dir $(dep))/$(DEPDIR)/$(notdir $(dep)))
2556051580eeSchristos
2557a1ba9ba4Schristos# Ensure that generated files are created early.  Use order-only
2558a1ba9ba4Schristos# dependencies if available.  They require GNU make 3.80 or newer,
2559a1ba9ba4Schristos# and the .VARIABLES variable was introduced at the same time.
256015d8e94aSchristosifdef .VARIABLES
256115d8e94aSchristos$(all_object_files): | $(generated_files)
256215d8e94aSchristoselse
2563a1ba9ba4Schristos$(all_object_files) : $(generated_files)
256415d8e94aSchristosendif
2565a1ba9ba4Schristos
2566a1ba9ba4Schristos# Dependencies.
2567051580eeSchristos-include $(all_deps_files)
256815d8e94aSchristos
256915d8e94aSchristos# Disable implicit make rules.
257015d8e94aSchristosinclude $(srcdir)/disable-implicit-rules.mk
2571a1ba9ba4Schristos
2572a1ba9ba4Schristos### end of the gdb Makefile.in.
2573