]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/Makefile.in
gdbserver: Use pattern rule for regformats source file generation
[thirdparty/binutils-gdb.git] / gdb / gdbserver / Makefile.in
1 # Copyright (C) 1989-2017 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
47 SHELL = @SHELL@
48 EXEEXT = @EXEEXT@
49
50 INSTALL = @INSTALL@
51 INSTALL_PROGRAM = @INSTALL_PROGRAM@
52 INSTALL_DATA = @INSTALL_DATA@
53 RANLIB = @RANLIB@
54
55 CC = @CC@
56 CXX = @CXX@
57 CXX_DIALECT = @CXX_DIALECT@
58 AR = @AR@
59 AR_FLAGS = rc
60
61 # Dependency tracking information.
62 DEPMODE = @CCDEPMODE@
63 DEPDIR = @DEPDIR@
64 depcomp = $(SHELL) $(srcdir)/../depcomp
65
66 # Note that these are overridden by GNU make-specific code below if
67 # GNU make is used. The overrides implement dependency tracking.
68 COMPILE.pre = $(CXX) $(CXX_DIALECT)
69 COMPILE.post = -c -o $@
70 COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
71 POSTCOMPILE = @true
72
73 # Directory containing source files. Don't clean up the spacing,
74 # this exact string is matched for by the "configure" script.
75 srcdir = @srcdir@
76 abs_top_srcdir = @abs_top_srcdir@
77 abs_srcdir = @abs_srcdir@
78 VPATH = @srcdir@
79
80 # It is also possible that you will need to add -I/usr/include/sys to the
81 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
82 # is where it should be according to Posix).
83
84 # Set this up with gcc if you have gnu ld and the loader will print out
85 # line numbers for undefinded refs.
86 #CC_LD = g++ -static
87 CC_LD = $(CXX) $(CXX_DIALECT)
88
89 # Where is the "include" directory? Traditionally ../include or ./include
90 INCLUDE_DIR = ${srcdir}/../../include
91 INCLUDE_DEP = $$(INCLUDE_DIR)
92
93 LIBIBERTY_BUILDDIR = build-libiberty-gdbserver
94 LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
95
96 # Where is ust? These will be empty if ust was not available.
97 ustlibs = @ustlibs@
98 ustinc = @ustinc@
99
100 # gnulib
101 GNULIB_BUILDDIR = build-gnulib-gdbserver
102 LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
103 INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
104
105 # Generated headers in the gnulib directory. These must be listed
106 # so that they are generated before other files are compiled.
107 GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
108
109 # All the includes used for CFLAGS and for lint.
110 # -I. for config files.
111 # -I${srcdir} for our headers.
112 # -I$(srcdir)/../regformats for regdef.h.
113 #
114 # We do not include ../target or ../nat in here because headers
115 # in those directories should be included with the subdirectory.
116 # e.g.: "target/wait.h".
117 #
118 INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../common \
119 -I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
120 $(INCGNU)
121
122 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
123 # from the config/ directory.
124 GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
125 #PROFILE_CFLAGS = -pg
126
127 WARN_CFLAGS = @WARN_CFLAGS@
128 WERROR_CFLAGS = @WERROR_CFLAGS@
129
130 WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \
131 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
132
133 # These are specifically reserved for setting from the command line
134 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
135 CFLAGS = @CFLAGS@
136 CXXFLAGS = @CXXFLAGS@
137 CPPFLAGS = @CPPFLAGS@
138
139 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
140 INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
141 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
142 INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
143 INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
144
145 # LDFLAGS is specifically reserved for setting from the command line
146 # when running make.
147 LDFLAGS = @LDFLAGS@
148 INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
149
150 # All source files that go into linking GDB remote server.
151
152 SFILES = \
153 $(srcdir)/debug.c \
154 $(srcdir)/dll.c \
155 $(srcdir)/gdbreplay.c \
156 $(srcdir)/hostio.c \
157 $(srcdir)/hostio-errno.c \
158 $(srcdir)/i387-fp.c \
159 $(srcdir)/inferiors.c \
160 $(srcdir)/linux-aarch64-low.c \
161 $(srcdir)/linux-arm-low.c \
162 $(srcdir)/linux-bfin-low.c \
163 $(srcdir)/linux-cris-low.c \
164 $(srcdir)/linux-crisv32-low.c \
165 $(srcdir)/linux-ia64-low.c \
166 $(srcdir)/linux-low.c \
167 $(srcdir)/linux-m32r-low.c \
168 $(srcdir)/linux-m68k-low.c \
169 $(srcdir)/linux-mips-low.c \
170 $(srcdir)/linux-nios2-low.c \
171 $(srcdir)/linux-ppc-low.c \
172 $(srcdir)/linux-s390-low.c \
173 $(srcdir)/linux-sh-low.c \
174 $(srcdir)/linux-sparc-low.c \
175 $(srcdir)/linux-tile-low.c \
176 $(srcdir)/linux-x86-low.c \
177 $(srcdir)/linux-xtensa-low.c \
178 $(srcdir)/mem-break.c \
179 $(srcdir)/proc-service.c \
180 $(srcdir)/proc-service.list \
181 $(srcdir)/regcache.c \
182 $(srcdir)/remote-utils.c \
183 $(srcdir)/server.c \
184 $(srcdir)/symbol.c \
185 $(srcdir)/target.c \
186 $(srcdir)/thread-db.c \
187 $(srcdir)/utils.c \
188 $(srcdir)/win32-arm-low.c \
189 $(srcdir)/win32-i386-low.c \
190 $(srcdir)/win32-low.c \
191 $(srcdir)/wincecompat.c \
192 $(srcdir)/x86-low.c \
193 $(srcdir)/arch/arm.c \
194 $(srcdir)/arch/arm-get-next-pcs.c \
195 $(srcdir)/arch/arm-linux.c \
196 $(srcdir)/common/btrace-common.c \
197 $(srcdir)/common/buffer.c \
198 $(srcdir)/common/cleanups.c \
199 $(srcdir)/common/common-debug.c \
200 $(srcdir)/common/common-exceptions.c \
201 $(srcdir)/common/common-regcache.c \
202 $(srcdir)/common/common-utils.c \
203 $(srcdir)/common/errors.c \
204 $(srcdir)/common/environ.c \
205 $(srcdir)/common/fileio.c \
206 $(srcdir)/common/filestuff.c \
207 $(srcdir)/common/gdb_vecs.c \
208 $(srcdir)/common/new-op.c \
209 $(srcdir)/common/print-utils.c \
210 $(srcdir)/common/ptid.c \
211 $(srcdir)/common/rsp-low.c \
212 $(srcdir)/common/vec.c \
213 $(srcdir)/common/xml-utils.c \
214 $(srcdir)/nat/linux-btrace.c \
215 $(srcdir)/nat/linux-namespaces.c \
216 $(srcdir)/nat/linux-osdata.c \
217 $(srcdir)/nat/linux-personality.c \
218 $(srcdir)/nat/mips-linux-watch.c \
219 $(srcdir)/nat/ppc-linux.c \
220 $(srcdir)/target/waitstatus.c
221
222 DEPFILES = @GDBSERVER_DEPFILES@
223
224 LIBOBJS = @LIBOBJS@
225
226 SOURCES = $(SFILES)
227 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
228
229 OBS = \
230 agent.o \
231 ax.o \
232 btrace-common.o \
233 buffer.o \
234 cleanups.o \
235 common-debug.o \
236 common-exceptions.o \
237 common-regcache.o \
238 common-utils.o \
239 debug.o \
240 dll.o \
241 errors.o \
242 environ.o \
243 event-loop.o \
244 fileio.o \
245 filestuff.o \
246 format.o \
247 gdb_vecs.o \
248 hostio.o \
249 inferiors.o \
250 mem-break.o \
251 new-op.o \
252 notif.o \
253 print-utils.o \
254 ptid.o \
255 regcache.o \
256 remote-utils.o \
257 rsp-low.o \
258 server.o \
259 signals.o \
260 signals-state-save-restore.o \
261 symbol.o \
262 target.o \
263 tdesc.o \
264 tracepoint.o \
265 utils.o \
266 vec.o \
267 version.o \
268 waitstatus.o \
269 xml-utils.o \
270 $(DEPFILES) \
271 $(LIBOBJS) \
272 $(XML_BUILTIN)
273
274 GDBREPLAY_OBS = gdbreplay.o version.o
275 GDBSERVER_LIBS = @GDBSERVER_LIBS@
276 XM_CLIBS = @LIBS@
277 CDEPS = $(srcdir)/proc-service.list
278
279 # XML files to compile in to gdbserver, if any.
280 XML_DIR = $(srcdir)/../features
281 XML_FILES = @srv_xmlfiles@
282 XML_BUILTIN = @srv_xmlbuiltin@
283
284 IPA_DEPFILES = @IPA_DEPFILES@
285 extra_libraries = @extra_libraries@
286
287 SUBDIRS = $(GNULIB_BUILDDIR) $(LIBIBERTY_BUILDDIR)
288 CLEANDIRS = $(SUBDIRS)
289
290 # List of subdirectories in the build tree that must exist.
291 # This is used to force build failures in existing trees when
292 # a new directory is added.
293 # The format here is for the `case' shell command.
294 REQUIRED_SUBDIRS = $(GNULIB_BUILDDIR) | $(LIBIBERTY_BUILDDIR)
295
296 FLAGS_TO_PASS = \
297 "prefix=$(prefix)" \
298 "exec_prefix=$(exec_prefix)" \
299 "infodir=$(infodir)" \
300 "datarootdir=$(datarootdir)" \
301 "docdir=$(docdir)" \
302 "htmldir=$(htmldir)" \
303 "pdfdir=$(pdfdir)" \
304 "libdir=$(libdir)" \
305 "mandir=$(mandir)" \
306 "datadir=$(datadir)" \
307 "includedir=$(includedir)" \
308 "against=$(against)" \
309 "DESTDIR=$(DESTDIR)" \
310 "AR=$(AR)" \
311 "AR_FLAGS=$(AR_FLAGS)" \
312 "CC=$(CC)" \
313 "CFLAGS=$(CFLAGS)" \
314 "CXX=$(CXX)" \
315 "CXXFLAGS=$(CXXFLAGS)" \
316 "DLLTOOL=$(DLLTOOL)" \
317 "LDFLAGS=$(LDFLAGS)" \
318 "RANLIB=$(RANLIB)" \
319 "MAKEINFO=$(MAKEINFO)" \
320 "MAKEHTML=$(MAKEHTML)" \
321 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
322 "INSTALL=$(INSTALL)" \
323 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
324 "INSTALL_DATA=$(INSTALL_DATA)" \
325 "RUNTEST=$(RUNTEST)" \
326 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
327
328 # All generated files which can be included by another file.
329 generated_files = config.h $(GNULIB_H)
330
331 %.o: %.c
332 $(COMPILE) $<
333 $(POSTCOMPILE)
334
335 all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
336 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
337
338 # Traditionally "install" depends on "all". But it may be useful
339 # not to; for example, if the user has made some trivial change to a
340 # source file and doesn't care about rebuilding or just wants to save the
341 # time it takes for make to check that all is up to date.
342 # install-only is intended to address that need.
343 install: all
344 @$(MAKE) $(FLAGS_TO_PASS) install-only
345
346 install-only:
347 n=`echo gdbserver | sed '$(program_transform_name)'`; \
348 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
349 if [ x"$(IPA_DEPFILES)" != x ]; then \
350 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir); \
351 $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
352 fi; \
353 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
354 $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
355 # Note that we run install and not install-only, as the latter
356 # is not part of GNU standards and in particular not provided
357 # in libiberty.
358 @$(MAKE) $(FLAGS_TO_PASS) DO=install "DODIRS=$(SUBDIRS)" subdir_do
359
360 uninstall: force
361 n=`echo gdbserver | sed '$(program_transform_name)'`; \
362 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
363 rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
364 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
365
366 installcheck:
367 check:
368 info dvi pdf:
369 install-info:
370 install-pdf:
371 html:
372 install-html:
373 clean-info: force
374 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
375
376 gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS} $(LIBGNU) $(LIBIBERTY)
377 rm -f gdbserver$(EXEEXT)
378 $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver$(EXEEXT) $(OBS) \
379 $(LIBGNU) $(LIBIBERTY) $(GDBSERVER_LIBS) $(XM_CLIBS)
380
381 $(LIBGNU) $(LIBIBERTY) $(GNULIB_H): all-lib
382 all-lib: $(GNULIB_BUILDDIR)/Makefile $(LIBIBERTY_BUILDDIR)/Makefile
383 @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS="$(SUBDIRS)" subdir_do
384 .PHONY: all-lib
385
386 gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU) $(LIBIBERTY)
387 rm -f gdbreplay$(EXEEXT)
388 $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
389 $(XM_CLIBS) $(LIBGNU) $(LIBIBERTY)
390
391 IPA_OBJS = ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o \
392 regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o \
393 tdesc-ipa.o print-utils-ipa.o rsp-low-ipa.o errors-ipa.o \
394 ${IPA_DEPFILES}
395
396 IPA_LIB = libinproctrace.so
397
398 $(IPA_LIB): $(IPA_OBJS) ${ADD_DEPS} ${CDEPS}
399 rm -f $(IPA_LIB)
400 $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) -Wl,--no-undefined $(INTERNAL_CFLAGS) \
401 $(INTERNAL_LDFLAGS) -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread
402
403 # Put the proper machine-specific files first, so M-. on a machine
404 # specific routine gets the one for the correct machine.
405 # The xyzzy stuff below deals with empty DEPFILES
406 TAGS: ${TAGFILES}
407 etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
408 `find ${srcdir}/../config -name ${XM_FILE} -print` \
409 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
410 `for i in yzzy ${DEPFILES}; do \
411 if [ x$$i != xyzzy ]; then \
412 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
413 fi; \
414 done` \
415 ${TAGFILES}
416 tags: TAGS
417
418 clean:
419 rm -f *.o ${ADD_FILES} *~
420 rm -f version.c
421 rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
422 rm -f $(IPA_LIB)
423 rm -f aarch64.c
424 rm -f reg-arm.c reg-bfin.c i386.c reg-ia64.c reg-m32r.c reg-m68k.c
425 rm -f reg-sh.c reg-sparc.c reg-spu.c amd64.c i386-linux.c
426 rm -f reg-cris.c reg-crisv32.c amd64-linux.c reg-xtensa.c
427 rm -f reg-tilegx.c reg-tilegx32.c
428 rm -f arm-with-iwmmxt.c
429 rm -f arm-with-vfpv2.c arm-with-vfpv3.c arm-with-neon.c
430 rm -f mips-linux.c mips-dsp-linux.c
431 rm -f mips64-linux.c mips64-dsp-linux.c
432 rm -f nios2-linux.c
433 rm -f powerpc-32.c powerpc-32l.c powerpc-64l.c powerpc-e500l.c
434 rm -f powerpc-altivec32l.c powerpc-cell32l.c powerpc-vsx32l.c
435 rm -f powerpc-altivec64l.c powerpc-cell64l.c powerpc-vsx64l.c
436 rm -f powerpc-isa205-32l.c powerpc-isa205-64l.c
437 rm -f powerpc-isa205-altivec32l.c powerpc-isa205-vsx32l.c powerpc-isa205-altivec64l.c
438 rm -f powerpc-isa205-vsx64l.c
439 rm -f s390-linux32.c s390-linux64.c s390x-linux64.c
440 rm -f s390-linux32v1.c s390-linux32v2.c s390-linux64v1.c
441 rm -f s390-linux64v2.c s390x-linux64v1.c s390x-linux64v2.c
442 rm -f s390-te-linux64.c s390x-te-linux64.c
443 rm -f s390-vx-linux64.c s390x-vx-linux64.c
444 rm -f s390-tevx-linux64.c s390x-tevx-linux64.c
445 rm -f tic6x-c64xp-linux.c tic6x-c64x-linux.c tic6x-c62x-linux.c
446 rm -f xml-builtin.c stamp-xml
447 rm -f i386-avx.c i386-avx-linux.c
448 rm -f i386-mpx.c i386-mpx-linux.c
449 rm -f i386-avx-mpx.c i386-avx-mpx-linux.c
450 rm -f i386-avx-avx512.c i386-avx-avx512-linux.c
451 rm -f i386-avx-mpx-avx512-pku.c i386-avx-mpx-avx512-pku-linux.c
452 rm -f amd64-avx.c amd64-avx-linux.c
453 rm -f amd64-mpx.c amd64-mpx-linux.c
454 rm -f amd64-avx-mpx.c amd64-avx-mpx-linux.c
455 rm -f amd64-avx-avx512.c amd64-avx-avx512-linux.c
456 rm -f amd64-avx-mpx-avx512-pku.c amd64-avx-mpx-avx512-pku-linux.c
457 rm -f i386-mmx.c i386-mmx-linux.c
458 rm -f x32.c x32-linux.c
459 rm -f x32-avx.c x32-avx-linux.c
460 rm -f x32-avx-avx512.c x32-avx-avx512-linux.c
461 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
462
463 maintainer-clean realclean distclean: clean
464 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
465 rm -rf $(GNULIB_BUILDDIR)
466 rm -f Makefile config.status config.h stamp-h config.log
467 rm -f Makefile
468
469 subdir_do: force
470 @for i in $(DODIRS); do \
471 case $$i in \
472 $(REQUIRED_SUBDIRS)) \
473 if [ ! -f ./$$i/Makefile ] ; then \
474 echo "Missing $$i/Makefile" >&2 ; \
475 exit 1 ; \
476 fi ;; \
477 esac ; \
478 if [ -f ./$$i/Makefile ] ; then \
479 if (cd ./$$i; \
480 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
481 else exit 1 ; fi ; \
482 else true ; fi ; \
483 done
484
485 config.h: stamp-h ; @true
486 stamp-h: config.in config.status
487 CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
488
489 Makefile: Makefile.in config.status
490 CONFIG_HEADERS="" $(SHELL) ./config.status
491
492 $(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status
493 @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
494 CONFIG_COMMANDS="depfiles" \
495 CONFIG_HEADERS= \
496 CONFIG_LINKS= \
497 $(SHELL) config.status
498
499 config.status: configure configure.srv $(srcdir)/../../bfd/development.sh
500 $(SHELL) ./config.status --recheck
501
502 # automatic rebuilding in automake-generated Makefiles requires
503 # this rule in the toplevel Makefile, which, with GNU make, causes
504 # the desired updates through the implicit regeneration of the Makefile
505 # and all of its prerequisites.
506 am--refresh:
507 @:
508
509 force:
510
511 version.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh
512 $(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \
513 $(host_alias) $(target_alias) version.c
514
515 xml-builtin.c: stamp-xml; @true
516 stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
517 rm -f xml-builtin.tmp
518 $(SHELL) $(XML_DIR)/feature_to_c.sh xml-builtin.tmp $(XML_FILES)
519 $(SHELL) $(srcdir)/../../move-if-change xml-builtin.tmp xml-builtin.c
520 echo stamp > stamp-xml
521
522 .PRECIOUS: xml-builtin.c
523
524 # GNU Make has an annoying habit of putting *all* the Makefile variables
525 # into the environment, unless you include this target as a circumvention.
526 # Rumor is that this will be fixed (and this target can be removed)
527 # in GNU Make 4.0.
528 .NOEXPORT:
529
530 # GNU Make 3.63 has a different problem: it keeps tacking command line
531 # overrides onto the definition of $(MAKE). This variable setting
532 # will remove them.
533 MAKEOVERRIDES =
534
535 regdat_sh = $(srcdir)/../regformats/regdat.sh
536
537 UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
538
539 # Note, we only build the IPA if -fvisibility=hidden is supported in
540 # the first place.
541 IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
542 -fPIC -DIN_PROCESS_AGENT \
543 -fvisibility=hidden
544
545 IPAGENT_COMPILE = $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
546
547 # In-process agent object rules
548 ax-ipa.o: ax.c
549 $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
550 $(POSTCOMPILE)
551 tracepoint-ipa.o: tracepoint.c
552 $(IPAGENT_COMPILE) $<
553 $(POSTCOMPILE)
554 utils-ipa.o: utils.c
555 $(IPAGENT_COMPILE) $<
556 $(POSTCOMPILE)
557 format-ipa.o: ../common/format.c
558 $(IPAGENT_COMPILE) $<
559 $(POSTCOMPILE)
560 common-utils-ipa.o: ../common/common-utils.c
561 $(IPAGENT_COMPILE) $<
562 $(POSTCOMPILE)
563 remote-utils-ipa.o: remote-utils.c
564 $(IPAGENT_COMPILE) $<
565 $(POSTCOMPILE)
566 regcache-ipa.o: regcache.c
567 $(IPAGENT_COMPILE) $<
568 $(POSTCOMPILE)
569 i386-linux-ipa.o: i386-linux.c
570 $(IPAGENT_COMPILE) $<
571 $(POSTCOMPILE)
572 i386-mmx-linux-ipa.o: i386-mmx-linux.c
573 $(IPAGENT_COMPILE) $<
574 $(POSTCOMPILE)
575 i386-avx-linux-ipa.o: i386-avx-linux.c
576 $(IPAGENT_COMPILE) $<
577 $(POSTCOMPILE)
578 i386-mpx-linux-ipa.o: i386-mpx-linux.c
579 $(IPAGENT_COMPILE) $<
580 $(POSTCOMPILE)
581 i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c
582 $(IPAGENT_COMPILE) $<
583 $(POSTCOMPILE)
584 i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c
585 $(IPAGENT_COMPILE) $<
586 $(POSTCOMPILE)
587 i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c
588 $(IPAGENT_COMPILE) $<
589 $(POSTCOMPILE)
590 linux-i386-ipa.o: linux-i386-ipa.c
591 $(IPAGENT_COMPILE) $<
592 $(POSTCOMPILE)
593 linux-amd64-ipa.o: linux-amd64-ipa.c
594 $(IPAGENT_COMPILE) $<
595 $(POSTCOMPILE)
596 amd64-linux-ipa.o: amd64-linux.c
597 $(IPAGENT_COMPILE) $<
598 $(POSTCOMPILE)
599 amd64-avx-linux-ipa.o: amd64-avx-linux.c
600 $(IPAGENT_COMPILE) $<
601 $(POSTCOMPILE)
602 amd64-mpx-linux-ipa.o: amd64-mpx-linux.c
603 $(IPAGENT_COMPILE) $<
604 $(POSTCOMPILE)
605 amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c
606 $(IPAGENT_COMPILE) $<
607 $(POSTCOMPILE)
608 amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c
609 $(IPAGENT_COMPILE) $<
610 $(POSTCOMPILE)
611 amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c
612 $(IPAGENT_COMPILE) $<
613 $(POSTCOMPILE)
614 linux-aarch64-ipa.o: linux-aarch64-ipa.c
615 $(IPAGENT_COMPILE) $<
616 $(POSTCOMPILE)
617 aarch64-ipa.o: aarch64.c
618 $(IPAGENT_COMPILE) $<
619 $(POSTCOMPILE)
620 linux-s390-ipa.o: linux-s390-ipa.c
621 $(IPAGENT_COMPILE) $<
622 $(POSTCOMPILE)
623 s390-linux32-ipa.o: s390-linux32.c
624 $(IPAGENT_COMPILE) $<
625 $(POSTCOMPILE)
626 s390-linux32v1-ipa.o: s390-linux32v1.c
627 $(IPAGENT_COMPILE) $<
628 $(POSTCOMPILE)
629 s390-linux32v2-ipa.o: s390-linux32v2.c
630 $(IPAGENT_COMPILE) $<
631 $(POSTCOMPILE)
632 s390-linux64-ipa.o: s390-linux64.c
633 $(IPAGENT_COMPILE) $<
634 $(POSTCOMPILE)
635 s390-linux64v1-ipa.o: s390-linux64v1.c
636 $(IPAGENT_COMPILE) $<
637 $(POSTCOMPILE)
638 s390-linux64v2-ipa.o: s390-linux64v2.c
639 $(IPAGENT_COMPILE) $<
640 $(POSTCOMPILE)
641 s390-te-linux64-ipa.o: s390-te-linux64.c
642 $(IPAGENT_COMPILE) $<
643 $(POSTCOMPILE)
644 s390-vx-linux64-ipa.o: s390-vx-linux64.c
645 $(IPAGENT_COMPILE) $<
646 $(POSTCOMPILE)
647 s390-tevx-linux64-ipa.o: s390-tevx-linux64.c
648 $(IPAGENT_COMPILE) $<
649 $(POSTCOMPILE)
650 s390x-linux64-ipa.o: s390x-linux64.c
651 $(IPAGENT_COMPILE) $<
652 $(POSTCOMPILE)
653 s390x-linux64v1-ipa.o: s390x-linux64v1.c
654 $(IPAGENT_COMPILE) $<
655 $(POSTCOMPILE)
656 s390x-linux64v2-ipa.o: s390x-linux64v2.c
657 $(IPAGENT_COMPILE) $<
658 $(POSTCOMPILE)
659 s390x-te-linux64-ipa.o: s390x-te-linux64.c
660 $(IPAGENT_COMPILE) $<
661 $(POSTCOMPILE)
662 s390x-vx-linux64-ipa.o: s390x-vx-linux64.c
663 $(IPAGENT_COMPILE) $<
664 $(POSTCOMPILE)
665 s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c
666 $(IPAGENT_COMPILE) $<
667 $(POSTCOMPILE)
668 linux-ppc-ipa.o: linux-ppc-ipa.c
669 $(IPAGENT_COMPILE) $<
670 $(POSTCOMPILE)
671 powerpc-32l-ipa.o: powerpc-32l.c
672 $(IPAGENT_COMPILE) $<
673 $(POSTCOMPILE)
674 powerpc-altivec32l-ipa.o: powerpc-altivec32l.c
675 $(IPAGENT_COMPILE) $<
676 $(POSTCOMPILE)
677 powerpc-cell32l-ipa.o: powerpc-cell32l.c
678 $(IPAGENT_COMPILE) $<
679 $(POSTCOMPILE)
680 powerpc-vsx32l-ipa.o: powerpc-vsx32l.c
681 $(IPAGENT_COMPILE) $<
682 $(POSTCOMPILE)
683 powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c
684 $(IPAGENT_COMPILE) $<
685 $(POSTCOMPILE)
686 powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c
687 $(IPAGENT_COMPILE) $<
688 $(POSTCOMPILE)
689 powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c
690 $(IPAGENT_COMPILE) $<
691 $(POSTCOMPILE)
692 powerpc-e500l-ipa.o: powerpc-e500l.c
693 $(IPAGENT_COMPILE) $<
694 $(POSTCOMPILE)
695 powerpc-64l-ipa.o: powerpc-64l.c
696 $(IPAGENT_COMPILE) $<
697 $(POSTCOMPILE)
698 powerpc-altivec64l-ipa.o: powerpc-altivec64l.c
699 $(IPAGENT_COMPILE) $<
700 $(POSTCOMPILE)
701 powerpc-cell64l-ipa.o: powerpc-cell64l.c
702 $(IPAGENT_COMPILE) $<
703 $(POSTCOMPILE)
704 powerpc-vsx64l-ipa.o: powerpc-vsx64l.c
705 $(IPAGENT_COMPILE) $<
706 $(POSTCOMPILE)
707 powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c
708 $(IPAGENT_COMPILE) $<
709 $(POSTCOMPILE)
710 powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c
711 $(IPAGENT_COMPILE) $<
712 $(POSTCOMPILE)
713 powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c
714 $(IPAGENT_COMPILE) $<
715 $(POSTCOMPILE)
716 tdesc-ipa.o: tdesc.c
717 $(IPAGENT_COMPILE) $<
718 $(POSTCOMPILE)
719 print-utils-ipa.o: ../common/print-utils.c
720 $(IPAGENT_COMPILE) $<
721 $(POSTCOMPILE)
722 rsp-low-ipa.o: ../common/rsp-low.c
723 $(IPAGENT_COMPILE) $<
724 $(POSTCOMPILE)
725 errors-ipa.o: ../common/errors.c
726 $(IPAGENT_COMPILE) $<
727 $(POSTCOMPILE)
728 x32-linux-ipa.o: x32-linux.c
729 $(IPAGENT_COMPILE) $<
730 $(POSTCOMPILE)
731 x32-avx-linux-ipa.o: x32-avx-linux.c
732 $(IPAGENT_COMPILE) $<
733 $(POSTCOMPILE)
734 x32-avx512-linux-ipa.o: x32-avx512-linux.c
735 $(IPAGENT_COMPILE) $<
736 $(POSTCOMPILE)
737
738 ax.o: ax.c
739 $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
740 $(POSTCOMPILE)
741
742 signals.o: ../common/signals.c
743 $(COMPILE) $<
744 $(POSTCOMPILE)
745 print-utils.o: ../common/print-utils.c
746 $(COMPILE) $<
747 $(POSTCOMPILE)
748 rsp-low.o: ../common/rsp-low.c
749 $(COMPILE) $<
750 $(POSTCOMPILE)
751 common-utils.o: ../common/common-utils.c
752 $(COMPILE) $<
753 $(POSTCOMPILE)
754 posix-strerror.o: ../common/posix-strerror.c
755 $(COMPILE) $<
756 $(POSTCOMPILE)
757 mingw-strerror.o: ../common/mingw-strerror.c
758 $(COMPILE) $<
759 $(POSTCOMPILE)
760 vec.o: ../common/vec.c
761 $(COMPILE) $<
762 $(POSTCOMPILE)
763 gdb_vecs.o: ../common/gdb_vecs.c
764 $(COMPILE) $<
765 $(POSTCOMPILE)
766 xml-utils.o: ../common/xml-utils.c
767 $(COMPILE) $<
768 $(POSTCOMPILE)
769 ptid.o: ../common/ptid.c
770 $(COMPILE) $<
771 $(POSTCOMPILE)
772 buffer.o: ../common/buffer.c
773 $(COMPILE) $<
774 $(POSTCOMPILE)
775 format.o: ../common/format.c
776 $(COMPILE) $<
777 $(POSTCOMPILE)
778 filestuff.o: ../common/filestuff.c
779 $(COMPILE) $<
780 $(POSTCOMPILE)
781 agent.o: ../common/agent.c
782 $(COMPILE) $<
783 $(POSTCOMPILE)
784 errors.o: ../common/errors.c
785 $(COMPILE) $<
786 $(POSTCOMPILE)
787 environ.o: ../common/environ.c
788 $(COMPILE) $<
789 $(POSTCOMPILE)
790 common-debug.o: ../common/common-debug.c
791 $(COMPILE) $<
792 $(POSTCOMPILE)
793 cleanups.o: ../common/cleanups.c
794 $(COMPILE) $<
795 $(POSTCOMPILE)
796 common-exceptions.o: ../common/common-exceptions.c
797 $(COMPILE) $<
798 $(POSTCOMPILE)
799 waitstatus.o: ../target/waitstatus.c
800 $(COMPILE) $<
801 $(POSTCOMPILE)
802 fileio.o: ../common/fileio.c
803 $(COMPILE) $<
804 $(POSTCOMPILE)
805 common-regcache.o: ../common/common-regcache.c
806 $(COMPILE) $<
807 $(POSTCOMPILE)
808 signals-state-save-restore.o: ../common/signals-state-save-restore.c
809 $(COMPILE) $<
810 $(POSTCOMPILE)
811 new-op.o: ../common/new-op.c
812 $(COMPILE) $<
813 $(POSTCOMPILE)
814
815 # Arch object files rules form ../arch
816
817 arm.o: ../arch/arm.c
818 $(COMPILE) $<
819 $(POSTCOMPILE)
820 arm-linux.o: ../arch/arm-linux.c
821 $(COMPILE) $<
822 $(POSTCOMPILE)
823 arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c
824 $(COMPILE) $<
825 $(POSTCOMPILE)
826
827 # Native object files rules from ../nat
828
829 x86-dregs.o: ../nat/x86-dregs.c
830 $(COMPILE) $<
831 $(POSTCOMPILE)
832 amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c
833 $(COMPILE) $<
834 $(POSTCOMPILE)
835 linux-btrace.o: ../nat/linux-btrace.c
836 $(COMPILE) $<
837 $(POSTCOMPILE)
838 linux-osdata.o: ../nat/linux-osdata.c
839 $(COMPILE) $<
840 $(POSTCOMPILE)
841 linux-procfs.o: ../nat/linux-procfs.c
842 $(COMPILE) $<
843 $(POSTCOMPILE)
844 linux-ptrace.o: ../nat/linux-ptrace.c
845 $(COMPILE) $<
846 $(POSTCOMPILE)
847 linux-waitpid.o: ../nat/linux-waitpid.c
848 $(COMPILE) $<
849 $(POSTCOMPILE)
850 mips-linux-watch.o: ../nat/mips-linux-watch.c
851 $(COMPILE) $<
852 $(POSTCOMPILE)
853 ppc-linux.o: ../nat/ppc-linux.c
854 $(COMPILE) $<
855 $(POSTCOMPILE)
856 linux-personality.o: ../nat/linux-personality.c
857 $(COMPILE) $<
858 $(POSTCOMPILE)
859 aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c
860 $(COMPILE) $<
861 $(POSTCOMPILE)
862 aarch64-linux.o: ../nat/aarch64-linux.c
863 $(COMPILE) $<
864 $(POSTCOMPILE)
865 btrace-common.o: ../common/btrace-common.c
866 $(COMPILE) $<
867 $(POSTCOMPILE)
868 x86-linux.o: ../nat/x86-linux.c
869 $(COMPILE) $<
870 $(POSTCOMPILE)
871 x86-linux-dregs.o: ../nat/x86-linux-dregs.c
872 $(COMPILE) $<
873 $(POSTCOMPILE)
874 linux-namespaces.o: ../nat/linux-namespaces.c
875 $(COMPILE) $<
876 $(POSTCOMPILE)
877
878 # Architecture specific object files rules from ../arch
879
880 aarch64-insn.o: ../arch/aarch64-insn.c
881 $(COMPILE) $<
882 $(POSTCOMPILE)
883
884 # Rules for register format descriptions.
885
886 %.c: ../regformats/%.dat | $(regdat_sh)
887 $(SHELL) $(regdat_sh) $< $@
888
889 %.c: ../regformats/arm/%.dat | $(regdat_sh)
890 $(SHELL) $(regdat_sh) $< $@
891
892 %.c: ../regformats/i386/%.dat | $(regdat_sh)
893 $(SHELL) $(regdat_sh) $< $@
894
895 %.c: ../regformats/rs6000/%.dat | $(regdat_sh)
896 $(SHELL) $(regdat_sh) $< $@
897
898 #
899 # Dependency tracking.
900 #
901
902 ifeq ($(DEPMODE),depmode=gcc3)
903 # Note that we put the dependencies into a .Tpo file, then move them
904 # into place if the compile succeeds. We need this because gcc does
905 # not atomically write the dependency output file.
906 override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
907 -MF $(DEPDIR)/$(basename $(@F)).Tpo
908 override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
909 $(DEPDIR)/$(basename $(@F)).Po
910 else
911 override COMPILE.pre = source='$<' object='$@' libtool=no \
912 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
913 # depcomp handles atomicity for us, so we don't need a postcompile
914 # step.
915 override POSTCOMPILE =
916 endif
917
918 # A list of all the objects we might care about in this build, for
919 # dependency tracking.
920 all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
921
922 # Ensure that generated files are created early. Use order-only
923 # dependencies if available. They require GNU make 3.80 or newer,
924 # and the .VARIABLES variable was introduced at the same time.
925 ifdef .VARIABLES
926 $(all_object_files): | $(generated_files)
927 else
928 $(all_object_files) : $(generated_files)
929 endif
930
931 # Dependencies.
932 -include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
933
934 # Disable implicit make rules.
935 include $(srcdir)/../disable-implicit-rules.mk
936
937 # This is the end of "Makefile.in".