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