[gdb/testsuite] Remove stale exec in gdb_compile_ada
[deliverable/binutils-gdb.git] / gdbserver / Makefile.in
CommitLineData
b811d2c2 1# Copyright (C) 1989-2020 Free Software Foundation, Inc.
c906108c
SS
2
3# This file is part of GDB.
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
32de4b9d 7# the Free Software Foundation; either version 3 of the License, or
c906108c 8# (at your option) any later version.
1b3f6016 9#
c906108c
SS
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
1b3f6016 14#
c906108c 15# You should have received a copy of the GNU General Public License
32de4b9d 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
c906108c 17
b593ecca
SM
18# Please keep lists in this file sorted alphabetically, with one item per line.
19# See gdb/Makefile.in for guidelines on ordering files and directories.
20
d6e9fb05
JK
21prefix = @prefix@
22exec_prefix = @exec_prefix@
c906108c 23
bd885420
YQ
24host_alias = @host_noncanonical@
25target_alias = @target_noncanonical@
d6e9fb05
JK
26program_transform_name = @program_transform_name@
27bindir = @bindir@
28libdir = @libdir@
c906108c
SS
29tooldir = $(libdir)/$(target_alias)
30
96e946ca 31datarootdir = @datarootdir@
d6e9fb05
JK
32datadir = @datadir@
33mandir = @mandir@
c906108c
SS
34man1dir = $(mandir)/man1
35man2dir = $(mandir)/man2
36man3dir = $(mandir)/man3
37man4dir = $(mandir)/man4
38man5dir = $(mandir)/man5
39man6dir = $(mandir)/man6
40man7dir = $(mandir)/man7
41man8dir = $(mandir)/man8
42man9dir = $(mandir)/man9
d6e9fb05 43infodir = @infodir@
085dd6e6 44htmldir = $(prefix)/html
d6e9fb05 45includedir = @includedir@
60d6cfc9 46CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@
c906108c 47
bdaed379
HD
48install_sh = @install_sh@
49
a8347a2a 50SHELL = @SHELL@
de7c3b4a 51EXEEXT = @EXEEXT@
c906108c 52
d6e9fb05
JK
53INSTALL = @INSTALL@
54INSTALL_PROGRAM = @INSTALL_PROGRAM@
bdaed379 55INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
d6e9fb05 56INSTALL_DATA = @INSTALL_DATA@
c9a1864a 57RANLIB = @RANLIB@
c906108c 58
84563040 59CC = @CC@
3bc3d82a 60CXX = @CXX@
8629c02c 61CXX_DIALECT = @CXX_DIALECT@
e1d2394b
MS
62AR = @AR@
63AR_FLAGS = rc
bdaed379 64STRIP = @STRIP@
c906108c 65
61c125b9
TT
66# Dependency tracking information.
67DEPMODE = @CCDEPMODE@
68DEPDIR = @DEPDIR@
919adfe8 69depcomp = $(SHELL) $(srcdir)/../depcomp
61c125b9 70
c906108c
SS
71# Directory containing source files. Don't clean up the spacing,
72# this exact string is matched for by the "configure" script.
d6e9fb05 73srcdir = @srcdir@
8629c02c
SM
74abs_top_srcdir = @abs_top_srcdir@
75abs_srcdir = @abs_srcdir@
d6e9fb05 76VPATH = @srcdir@
c906108c 77
919adfe8 78include $(srcdir)/../gdb/silent-rules.mk
39be3c7e
SM
79
80# Note that these are overridden by GNU make-specific code below if
81# GNU make is used. The overrides implement dependency tracking.
82COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
83COMPILE.post = -c -o $@
84COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
85POSTCOMPILE = @true
86
c906108c 87# It is also possible that you will need to add -I/usr/include/sys to the
1b3f6016 88# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
c906108c
SS
89# is where it should be according to Posix).
90
91# Set this up with gcc if you have gnu ld and the loader will print out
92# line numbers for undefinded refs.
8629c02c
SM
93#CC_LD = g++ -static
94CC_LD = $(CXX) $(CXX_DIALECT)
c906108c
SS
95
96# Where is the "include" directory? Traditionally ../include or ./include
919adfe8 97INCLUDE_DIR = ${srcdir}/../include
c906108c
SS
98INCLUDE_DEP = $$(INCLUDE_DIR)
99
0b04e523
TT
100LIBIBERTY_BUILDDIR = build-libiberty-gdbserver
101LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
102
0fb4aa4b
PA
103# Where is ust? These will be empty if ust was not available.
104ustlibs = @ustlibs@
105ustinc = @ustinc@
106
c9a1864a 107# gnulib
c971b7fa
PA
108GNULIB_BUILDDIR = build-gnulib-gdbserver
109LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
919adfe8 110INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
ecedbe58 111
c9a1864a
YQ
112# Generated headers in the gnulib directory. These must be listed
113# so that they are generated before other files are compiled.
c971b7fa 114GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
c9a1864a 115
919adfe8 116INCSUPPORT = -I$(srcdir)/.. -I..
01027315 117
c906108c
SS
118# All the includes used for CFLAGS and for lint.
119# -I. for config files.
7ea81414 120# -I${srcdir} for our headers.
919adfe8 121# -I$(srcdir)/../gdb/regformats for regdef.h.
96d7229d
LM
122#
123# We do not include ../target or ../nat in here because headers
124# in those directories should be included with the subdirectory.
125# e.g.: "target/wait.h".
126#
a0707f3c 127INCLUDE_CFLAGS = -I. -I${srcdir} \
919adfe8
TT
128 -I$(srcdir)/../gdb/regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
129 -I$(srcdir)/../gdb $(INCGNU) $(INCSUPPORT)
c906108c
SS
130
131# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
132# from the config/ directory.
133GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
134#PROFILE_CFLAGS = -pg
135
d4596a3d
PA
136WARN_CFLAGS = @WARN_CFLAGS@
137WERROR_CFLAGS = @WERROR_CFLAGS@
0729219d 138
d3ce09f5
SS
139WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \
140 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
141
a994041d 142# These are specifically reserved for setting from the command line
c906108c 143# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
84563040 144CFLAGS = @CFLAGS@
a994041d 145CXXFLAGS = @CXXFLAGS@
bffc0964 146CPPFLAGS = @CPPFLAGS@
84563040 147
5e030278
TT
148PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
149PTHREAD_LIBS = @PTHREAD_LIBS@
150
c906108c 151# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
8629c02c 152INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
5e030278 153 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
8629c02c
SM
154INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
155INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
c906108c
SS
156
157# LDFLAGS is specifically reserved for setting from the command line
158# when running make.
697f7479 159LDFLAGS = @LDFLAGS@
f6de3c42 160INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
c906108c 161
c906108c
SS
162# All source files that go into linking GDB remote server.
163
b593ecca
SM
164SFILES = \
165 $(srcdir)/debug.c \
166 $(srcdir)/dll.c \
167 $(srcdir)/gdbreplay.c \
168 $(srcdir)/hostio.c \
169 $(srcdir)/hostio-errno.c \
170 $(srcdir)/i387-fp.c \
171 $(srcdir)/inferiors.c \
98fc70d6 172 $(srcdir)/linux-aarch64-low.c \
b593ecca
SM
173 $(srcdir)/linux-arm-low.c \
174 $(srcdir)/linux-bfin-low.c \
175 $(srcdir)/linux-cris-low.c \
176 $(srcdir)/linux-crisv32-low.c \
177 $(srcdir)/linux-ia64-low.c \
178 $(srcdir)/linux-low.c \
7cfbc4a0 179 $(srcdir)/linux-m32r-low.c \
b593ecca
SM
180 $(srcdir)/linux-m68k-low.c \
181 $(srcdir)/linux-mips-low.c \
68f5f838 182 $(srcdir)/linux-nios2-low.c \
b593ecca 183 $(srcdir)/linux-ppc-low.c \
eee84df1 184 $(srcdir)/linux-s390-low.c \
b593ecca
SM
185 $(srcdir)/linux-sh-low.c \
186 $(srcdir)/linux-sparc-low.c \
187 $(srcdir)/linux-tile-low.c \
d0722149 188 $(srcdir)/linux-x86-low.c \
1525d545 189 $(srcdir)/linux-xtensa-low.c \
b593ecca
SM
190 $(srcdir)/mem-break.c \
191 $(srcdir)/proc-service.c \
192 $(srcdir)/proc-service.list \
193 $(srcdir)/regcache.c \
194 $(srcdir)/remote-utils.c \
195 $(srcdir)/server.c \
196 $(srcdir)/symbol.c \
197 $(srcdir)/target.c \
198 $(srcdir)/thread-db.c \
199 $(srcdir)/utils.c \
200 $(srcdir)/win32-arm-low.c \
201 $(srcdir)/win32-i386-low.c \
202 $(srcdir)/win32-low.c \
203 $(srcdir)/wincecompat.c \
204 $(srcdir)/x86-low.c \
919adfe8
TT
205 $(srcdir)/../gdb/alloc.c \
206 $(srcdir)/../gdb/arch/arm.c \
207 $(srcdir)/../gdb/arch/arm-get-next-pcs.c \
208 $(srcdir)/../gdb/arch/arm-linux.c \
209 $(srcdir)/../gdb/arch/ppc-linux-common.c \
210 $(srcdir)/../gdbsupport/btrace-common.c \
211 $(srcdir)/../gdbsupport/buffer.c \
212 $(srcdir)/../gdbsupport/cleanups.c \
213 $(srcdir)/../gdbsupport/common-debug.c \
214 $(srcdir)/../gdbsupport/common-exceptions.c \
215 $(srcdir)/../gdbsupport/common-inferior.c \
216 $(srcdir)/../gdbsupport/common-regcache.c \
217 $(srcdir)/../gdbsupport/common-utils.c \
218 $(srcdir)/../gdbsupport/errors.c \
219 $(srcdir)/../gdbsupport/environ.c \
220 $(srcdir)/../gdbsupport/fileio.c \
221 $(srcdir)/../gdbsupport/filestuff.c \
222 $(srcdir)/../gdbsupport/job-control.c \
223 $(srcdir)/../gdbsupport/gdb-dlfcn.c \
224 $(srcdir)/../gdbsupport/gdb_tilde_expand.c \
225 $(srcdir)/../gdbsupport/gdb_vecs.c \
226 $(srcdir)/../gdbsupport/gdb_wait.c \
227 $(srcdir)/../gdbsupport/netstuff.c \
228 $(srcdir)/../gdbsupport/new-op.c \
229 $(srcdir)/../gdbsupport/pathstuff.c \
230 $(srcdir)/../gdbsupport/print-utils.c \
231 $(srcdir)/../gdbsupport/ptid.c \
232 $(srcdir)/../gdbsupport/rsp-low.c \
233 $(srcdir)/../gdbsupport/safe-strerror.c \
234 $(srcdir)/../gdbsupport/tdesc.c \
235 $(srcdir)/../gdbsupport/xml-utils.c \
236 $(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \
237 $(srcdir)/../gdb/nat/linux-btrace.c \
238 $(srcdir)/../gdb/nat/linux-namespaces.c \
239 $(srcdir)/../gdb/nat/linux-osdata.c \
240 $(srcdir)/../gdb/nat/linux-personality.c \
241 $(srcdir)/../gdb/nat/mips-linux-watch.c \
242 $(srcdir)/../gdb/nat/ppc-linux.c \
243 $(srcdir)/../gdb/nat/fork-inferior.c \
244 $(srcdir)/../gdb/target/waitstatus.c
c906108c 245
7ea81414 246DEPFILES = @GDBSERVER_DEPFILES@
c906108c 247
e28b3332
DJ
248LIBOBJS = @LIBOBJS@
249
7ea81414 250SOURCES = $(SFILES)
1b3f6016 251TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
c906108c 252
b593ecca 253OBS = \
08f10e02 254 alloc.o \
b593ecca 255 ax.o \
268a13a5
TT
256 gdbsupport/agent.o \
257 gdbsupport/btrace-common.o \
258 gdbsupport/buffer.o \
259 gdbsupport/cleanups.o \
260 gdbsupport/common-debug.o \
261 gdbsupport/common-exceptions.o \
80fd2826 262 gdbsupport/common-inferior.o \
268a13a5
TT
263 gdbsupport/job-control.o \
264 gdbsupport/common-regcache.o \
265 gdbsupport/common-utils.o \
266 gdbsupport/errors.o \
267 gdbsupport/environ.o \
268 gdbsupport/fileio.o \
269 gdbsupport/filestuff.o \
270 gdbsupport/format.o \
2d41fa11 271 gdbsupport/gdb-dlfcn.o \
268a13a5
TT
272 gdbsupport/gdb_tilde_expand.o \
273 gdbsupport/gdb_vecs.o \
559e7e50 274 gdbsupport/gdb_wait.o \
268a13a5
TT
275 gdbsupport/netstuff.o \
276 gdbsupport/new-op.o \
277 gdbsupport/pathstuff.o \
278 gdbsupport/print-utils.o \
279 gdbsupport/ptid.o \
280 gdbsupport/rsp-low.o \
cd850b40 281 gdbsupport/safe-strerror.o \
268a13a5
TT
282 gdbsupport/signals.o \
283 gdbsupport/signals-state-save-restore.o \
284 gdbsupport/tdesc.o \
268a13a5 285 gdbsupport/xml-utils.o \
b593ecca
SM
286 debug.o \
287 dll.o \
b593ecca 288 event-loop.o \
b593ecca
SM
289 hostio.o \
290 inferiors.o \
291 mem-break.o \
b593ecca 292 notif.o \
b593ecca
SM
293 regcache.o \
294 remote-utils.o \
b593ecca 295 server.o \
b593ecca
SM
296 symbol.o \
297 target.o \
298 tdesc.o \
299 tracepoint.o \
300 utils.o \
b593ecca 301 version.o \
42cd72aa 302 target/waitstatus.o \
b593ecca
SM
303 $(DEPFILES) \
304 $(LIBOBJS) \
305 $(XML_BUILTIN)
306
03349c93 307GDBREPLAY_OBS = \
268a13a5
TT
308 gdbsupport/cleanups.o \
309 gdbsupport/common-exceptions.o \
310 gdbsupport/common-utils.o \
311 gdbsupport/rsp-low.o \
312 gdbsupport/errors.o \
313 gdbsupport/netstuff.o \
314 gdbsupport/print-utils.o \
ab7d13f0 315 gdbsupport/safe-strerror.o \
03349c93
PA
316 gdbreplay.o \
317 utils.o \
318 version.o
319
5e030278 320GDBSERVER_LIBS = @GDBSERVER_LIBS@ $(PTHREAD_LIBS)
b80864fb 321XM_CLIBS = @LIBS@
f6528abd 322CDEPS = $(srcdir)/proc-service.list
c906108c 323
fb1e4ffc 324# XML files to compile in to gdbserver, if any.
919adfe8 325XML_DIR = $(srcdir)/../gdb/features
fb1e4ffc
DJ
326XML_FILES = @srv_xmlfiles@
327XML_BUILTIN = @srv_xmlbuiltin@
328
fa593d66
PA
329IPA_DEPFILES = @IPA_DEPFILES@
330extra_libraries = @extra_libraries@
331
0b04e523 332SUBDIRS = $(GNULIB_BUILDDIR) $(LIBIBERTY_BUILDDIR)
c971b7fa
PA
333CLEANDIRS = $(SUBDIRS)
334
335# List of subdirectories in the build tree that must exist.
336# This is used to force build failures in existing trees when
337# a new directory is added.
338# The format here is for the `case' shell command.
0b04e523 339REQUIRED_SUBDIRS = $(GNULIB_BUILDDIR) | $(LIBIBERTY_BUILDDIR)
c971b7fa 340
f474844c
JZ
341FLAGS_TO_PASS = \
342 "prefix=$(prefix)" \
343 "exec_prefix=$(exec_prefix)" \
344 "infodir=$(infodir)" \
345 "datarootdir=$(datarootdir)" \
346 "docdir=$(docdir)" \
347 "htmldir=$(htmldir)" \
348 "pdfdir=$(pdfdir)" \
349 "libdir=$(libdir)" \
350 "mandir=$(mandir)" \
351 "datadir=$(datadir)" \
352 "includedir=$(includedir)" \
353 "against=$(against)" \
354 "DESTDIR=$(DESTDIR)" \
355 "AR=$(AR)" \
356 "AR_FLAGS=$(AR_FLAGS)" \
357 "CC=$(CC)" \
358 "CFLAGS=$(CFLAGS)" \
359 "CXX=$(CXX)" \
360 "CXXFLAGS=$(CXXFLAGS)" \
361 "DLLTOOL=$(DLLTOOL)" \
362 "LDFLAGS=$(LDFLAGS)" \
363 "RANLIB=$(RANLIB)" \
364 "MAKEINFO=$(MAKEINFO)" \
365 "MAKEHTML=$(MAKEHTML)" \
366 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
367 "INSTALL=$(INSTALL)" \
368 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
369 "INSTALL_DATA=$(INSTALL_DATA)" \
370 "RUNTEST=$(RUNTEST)" \
371 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
372
fd9bb8b8
PA
373# All generated files which can be included by another file.
374generated_files = config.h $(GNULIB_H)
375
fa593d66 376all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
c971b7fa 377 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c
SS
378
379# Traditionally "install" depends on "all". But it may be useful
1b3f6016 380# not to; for example, if the user has made some trivial change to a
c906108c
SS
381# source file and doesn't care about rebuilding or just wants to save the
382# time it takes for make to check that all is up to date.
383# install-only is intended to address that need.
f474844c
JZ
384install: all
385 @$(MAKE) $(FLAGS_TO_PASS) install-only
386
1b3f6016 387install-only:
c906108c
SS
388 n=`echo gdbserver | sed '$(program_transform_name)'`; \
389 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
12ac6819 390 if [ x"$(IPA_DEPFILES)" != x ]; then \
919adfe8 391 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libdir); \
48189bec 392 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
fa593d66 393 fi; \
919adfe8 394 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
48189bec 395 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
0b04e523
TT
396 # Note that we run install and not install-only, as the latter
397 # is not part of GNU standards and in particular not provided
398 # in libiberty.
399 @$(MAKE) $(FLAGS_TO_PASS) DO=install "DODIRS=$(SUBDIRS)" subdir_do
c906108c 400
bdaed379
HD
401install-strip:
402 $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
403 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
404 `test -z '$(STRIP)' || \
405 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
406
c906108c
SS
407uninstall: force
408 n=`echo gdbserver | sed '$(program_transform_name)'`; \
409 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
f1048712 410 rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
c971b7fa 411 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c
SS
412
413installcheck:
414check:
9453113a 415info dvi pdf:
c906108c 416install-info:
9453113a 417install-pdf:
085dd6e6
JM
418html:
419install-html:
c9a1864a 420clean-info: force
c971b7fa 421 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c 422
8ff03f0b 423gdbserver$(EXEEXT): $(sort $(OBS)) ${CDEPS} $(LIBGNU) $(LIBIBERTY)
39be3c7e
SM
424 $(SILENCE) rm -f gdbserver$(EXEEXT)
425 $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
426 -o gdbserver$(EXEEXT) $(OBS) $(LIBGNU) $(LIBIBERTY) \
427 $(GDBSERVER_LIBS) $(XM_CLIBS)
c9a1864a 428
0b04e523
TT
429$(LIBGNU) $(LIBIBERTY) $(GNULIB_H): all-lib
430all-lib: $(GNULIB_BUILDDIR)/Makefile $(LIBIBERTY_BUILDDIR)/Makefile
431 @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS="$(SUBDIRS)" subdir_do
c9a1864a 432.PHONY: all-lib
c906108c 433
8ff03f0b 434gdbreplay$(EXEEXT): $(sort $(GDBREPLAY_OBS)) $(LIBGNU) $(LIBIBERTY)
39be3c7e
SM
435 $(SILENCE) rm -f gdbreplay$(EXEEXT)
436 $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
437 -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) $(XM_CLIBS) $(LIBGNU) \
438 $(LIBIBERTY)
c906108c 439
a206891a 440IPA_OBJS = \
08f10e02 441 alloc-ipa.o \
a206891a 442 ax-ipa.o \
268a13a5
TT
443 gdbsupport/common-utils-ipa.o \
444 gdbsupport/errors-ipa.o \
445 gdbsupport/format-ipa.o \
446 gdbsupport/print-utils-ipa.o \
447 gdbsupport/rsp-low-ipa.o \
ab7d13f0 448 gdbsupport/safe-strerror-ipa.o \
268a13a5 449 gdbsupport/tdesc-ipa.o \
a206891a
SM
450 regcache-ipa.o \
451 remote-utils-ipa.o \
a206891a
SM
452 tdesc-ipa.o \
453 tracepoint-ipa.o \
454 utils-ipa.o \
ef87c8bb 455 ${IPA_DEPFILES}
fa593d66 456
8629c02c 457IPA_LIB = libinproctrace.so
fa593d66 458
8ff03f0b 459$(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
39be3c7e
SM
460 $(SILENCE) rm -f $(IPA_LIB)
461 $(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
462 -Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
463 -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread
fa593d66 464
c906108c
SS
465# Put the proper machine-specific files first, so M-. on a machine
466# specific routine gets the one for the correct machine.
467# The xyzzy stuff below deals with empty DEPFILES
468TAGS: ${TAGFILES}
42ba50ec 469 etags \
c906108c
SS
470 `for i in yzzy ${DEPFILES}; do \
471 if [ x$$i != xyzzy ]; then \
42cd72aa
MR
472 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' \
473 -e 's,/\(arch\|nat\|target\)/,/../\1/,' \
474 -e 's,/\(gdbsupport\)/,/../../\1/,'; \
c906108c
SS
475 fi; \
476 done` \
477 ${TAGFILES}
478tags: TAGS
479
480clean:
481 rm -f *.o ${ADD_FILES} *~
de7c3b4a 482 rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
fa593d66 483 rm -f $(IPA_LIB)
8fa5b777
SM
484 rm -f *-generated.c
485 rm -f stamp-xml
65dd1e59 486 rm -f $(DEPDIR)/*.Po
60d6cfc9
YQ
487 for i in $(CONFIG_SRC_SUBDIR); do \
488 rm -f $$i/*.o; \
489 rm -f $$i/$(DEPDIR)/*; \
490 done
c971b7fa 491 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c 492
a59d1c82 493maintainer-clean realclean distclean: clean
c971b7fa
PA
494 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
495 rm -rf $(GNULIB_BUILDDIR)
496 rm -f Makefile config.status config.h stamp-h config.log
497 rm -f Makefile
60d6cfc9
YQ
498 for i in $(CONFIG_SRC_SUBDIR); do \
499 rmdir $$i/$(DEPDIR); \
500 done
c971b7fa
PA
501
502subdir_do: force
503 @for i in $(DODIRS); do \
504 case $$i in \
505 $(REQUIRED_SUBDIRS)) \
506 if [ ! -f ./$$i/Makefile ] ; then \
507 echo "Missing $$i/Makefile" >&2 ; \
508 exit 1 ; \
509 fi ;; \
510 esac ; \
511 if [ -f ./$$i/Makefile ] ; then \
512 if (cd ./$$i; \
513 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
514 else exit 1 ; fi ; \
515 else true ; fi ; \
516 done
c906108c 517
c3a3ccc7
DJ
518config.h: stamp-h ; @true
519stamp-h: config.in config.status
c5adaa19 520 $(SHELL) ./config.status config.h
0729219d 521
7ea81414 522Makefile: Makefile.in config.status
c5adaa19 523 $(SHELL) ./config.status $@
c906108c 524
919adfe8 525$(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status
c971b7fa 526 @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
c9a1864a
YQ
527 CONFIG_COMMANDS="depfiles" \
528 CONFIG_HEADERS= \
529 CONFIG_LINKS= \
c971b7fa 530 $(SHELL) config.status
c9a1864a 531
919adfe8 532config.status: configure configure.srv $(srcdir)/../bfd/development.sh
d6e9fb05
JK
533 $(SHELL) ./config.status --recheck
534
c9a1864a
YQ
535# automatic rebuilding in automake-generated Makefiles requires
536# this rule in the toplevel Makefile, which, with GNU make, causes
537# the desired updates through the implicit regeneration of the Makefile
538# and all of its prerequisites.
539am--refresh:
540 @:
541
c906108c
SS
542force:
543
919adfe8
TT
544version-generated.c: Makefile $(srcdir)/../gdb/version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh
545 $(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir)/../gdb \
39be3c7e 546 $(host_alias) $(target_alias) $@
c906108c 547
8fa5b777 548xml-builtin-generated.c: stamp-xml; @true
fb1e4ffc 549stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
39be3c7e
SM
550 $(SILENCE) rm -f xml-builtin.tmp
551 $(ECHO_GEN_XML_BUILTIN_GENERATED) $(SHELL) $(XML_DIR)/feature_to_c.sh \
552 xml-builtin.tmp $(XML_FILES)
919adfe8 553 $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin-generated.c
39be3c7e 554 $(SILENCE) echo stamp > stamp-xml
fb1e4ffc 555
9b4b61c8 556.PRECIOUS: xml-builtin.c
fb1e4ffc 557
c906108c
SS
558# GNU Make has an annoying habit of putting *all* the Makefile variables
559# into the environment, unless you include this target as a circumvention.
560# Rumor is that this will be fixed (and this target can be removed)
561# in GNU Make 4.0.
562.NOEXPORT:
563
564# GNU Make 3.63 has a different problem: it keeps tacking command line
565# overrides onto the definition of $(MAKE). This variable setting
566# will remove them.
8629c02c 567MAKEOVERRIDES =
c906108c 568
919adfe8 569regdat_sh = $(srcdir)/../gdb/regformats/regdat.sh
7a60ad40 570
0fb4aa4b
PA
571UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
572
956cc47c
SN
573# Undo gnulib replacements for the IPA shared library build.
574# The gnulib headers are still needed, but gnulib is not linked
575# into the IPA lib so replacement apis don't work.
ab7d13f0 576UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r
956cc47c 577
fa593d66
PA
578# Note, we only build the IPA if -fvisibility=hidden is supported in
579# the first place.
bffc0964 580IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
956cc47c 581 $(UNDO_GNULIB_CFLAGS) \
3ba6ad0f 582 -fPIC -DIN_PROCESS_AGENT \
fa593d66
PA
583 -fvisibility=hidden
584
39be3c7e 585IPAGENT_COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
61c125b9 586
1a01e7c6
SM
587# Rules for special cases.
588
61c125b9
TT
589ax-ipa.o: ax.c
590 $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
591 $(POSTCOMPILE)
61c125b9
TT
592
593ax.o: ax.c
594 $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
595 $(POSTCOMPILE)
596
a543c5ca
AH
597# Rules for objects that go in the in-process agent.
598
919adfe8 599arch/%-ipa.o: ../gdb/arch/%.c
a543c5ca 600 $(IPAGENT_COMPILE) $<
b4570e4b
YQ
601 $(POSTCOMPILE)
602
919adfe8 603gdbsupport/%-ipa.o: ../gdbsupport/%.c
a543c5ca
AH
604 $(IPAGENT_COMPILE) $<
605 $(POSTCOMPILE)
a8ebe3d5 606
8fa5b777
SM
607%-ipa.o: %-generated.c
608 $(IPAGENT_COMPILE) $<
609 $(POSTCOMPILE)
610
a8ebe3d5
SM
611%-ipa.o: %.c
612 $(IPAGENT_COMPILE) $<
613 $(POSTCOMPILE)
614
919adfe8 615%-ipa.o: ../gdb/%.c
1ee7b812
BE
616 $(IPAGENT_COMPILE) $<
617 $(POSTCOMPILE)
618
1a01e7c6
SM
619# Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
620# Therefore, this one needs to be before "%.o: %.c" for it to be considered for
621# files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c.
622#
623# Later versions of GNU Make choose the rule with the shortest stem, so it would
624# work in any order.
625
626%-ipa.o: %-ipa.c
627 $(IPAGENT_COMPILE) $<
628 $(POSTCOMPILE)
629
a543c5ca 630# Rules for objects that go in the gdbserver binary.
36bc18a8 631
919adfe8 632arch/%.o: ../gdb/arch/%.c
a543c5ca 633 $(COMPILE) $<
5f035c07
YQ
634 $(POSTCOMPILE)
635
919adfe8 636gdbsupport/%.o: ../gdbsupport/%.c
8fa5b777
SM
637 $(COMPILE) $<
638 $(POSTCOMPILE)
639
a543c5ca 640%.o: %-generated.c
21122961
SM
641 $(COMPILE) $<
642 $(POSTCOMPILE)
643
a543c5ca 644%.o: %.c
6bda016b
SM
645 $(COMPILE) $<
646 $(POSTCOMPILE)
647
919adfe8 648nat/%.o: ../gdb/nat/%.c
c5a22423
SM
649 $(COMPILE) $<
650 $(POSTCOMPILE)
651
919adfe8 652target/%.o: ../gdb/target/%.c
21122961
SM
653 $(COMPILE) $<
654 $(POSTCOMPILE)
08f10e02 655
919adfe8 656%.o: ../gdb/%.c
08f10e02
TT
657 $(COMPILE) $<
658 $(POSTCOMPILE)
21122961 659
8fa5b777
SM
660# Rules for register format descriptions. Suffix destination files with
661# -generated to identify and clean them easily.
c362e621 662
919adfe8 663%-generated.c: ../gdb/regformats/%.dat $(regdat_sh)
39be3c7e 664 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
c362e621 665
919adfe8 666%-generated.c: ../gdb/regformats/arm/%.dat $(regdat_sh)
39be3c7e 667 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
c362e621 668
919adfe8 669%-generated.c: ../gdb/regformats/rs6000/%.dat $(regdat_sh)
39be3c7e 670 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
61c125b9
TT
671
672#
3b165252 673# Dependency tracking.
61c125b9
TT
674#
675
3b165252 676ifeq ($(DEPMODE),depmode=gcc3)
61c125b9
TT
677# Note that we put the dependencies into a .Tpo file, then move them
678# into place if the compile succeeds. We need this because gcc does
679# not atomically write the dependency output file.
3b165252 680override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
60d6cfc9
YQ
681 -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
682override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
683 $(@D)/$(DEPDIR)/$(basename $(@F)).Po
3b165252
SM
684else
685override COMPILE.pre = source='$<' object='$@' libtool=no \
60d6cfc9
YQ
686 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
687 $(CXX) -x c++ $(CXX_DIALECT)
61c125b9
TT
688# depcomp handles atomicity for us, so we don't need a postcompile
689# step.
3b165252
SM
690override POSTCOMPILE =
691endif
61c125b9
TT
692
693# A list of all the objects we might care about in this build, for
694# dependency tracking.
1798301e 695all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
61c125b9
TT
696
697# Ensure that generated files are created early. Use order-only
698# dependencies if available. They require GNU make 3.80 or newer,
699# and the .VARIABLES variable was introduced at the same time.
3b165252
SM
700ifdef .VARIABLES
701$(all_object_files): | $(generated_files)
702else
61c125b9 703$(all_object_files) : $(generated_files)
3b165252 704endif
61c125b9 705
f31c089e
SM
706# All the .deps files to include.
707all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\
708 $(dir $(dep))/$(DEPDIR)/$(notdir $(dep)))
709
61c125b9 710# Dependencies.
f31c089e 711-include $(all_deps_files)
61c125b9 712
ad02e4fe 713# Disable implicit make rules.
919adfe8 714include $(srcdir)/../gdb/disable-implicit-rules.mk
ad02e4fe 715
50a421ac
SM
716# Do not delete intermediate files (e.g. *-generated.c).
717.SECONDARY:
718
c906108c 719# This is the end of "Makefile.in".
This page took 1.501507 seconds and 4 git commands to generate.