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