60a52d3412b9fa4796b3a47d7bf74f8a713f8ca0
[deliverable/binutils-gdb.git] / 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 install_sh = @install_sh@
49
50 SHELL = @SHELL@
51 EXEEXT = @EXEEXT@
52
53 INSTALL = @INSTALL@
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
56 INSTALL_DATA = @INSTALL_DATA@
57 RANLIB = @RANLIB@
58
59 CC = @CC@
60 CXX = @CXX@
61 CXX_DIALECT = @CXX_DIALECT@
62 AR = @AR@
63 AR_FLAGS = rc
64 STRIP = @STRIP@
65
66 # Dependency tracking information.
67 DEPMODE = @CCDEPMODE@
68 DEPDIR = @DEPDIR@
69 depcomp = $(SHELL) $(srcdir)/../depcomp
70
71 # Directory containing source files. Don't clean up the spacing,
72 # this exact string is matched for by the "configure" script.
73 srcdir = @srcdir@
74 abs_top_srcdir = @abs_top_srcdir@
75 abs_srcdir = @abs_srcdir@
76 VPATH = @srcdir@
77
78 include $(srcdir)/../gdb/silent-rules.mk
79
80 # Note that these are overridden by GNU make-specific code below if
81 # GNU make is used. The overrides implement dependency tracking.
82 COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
83 COMPILE.post = -c -o $@
84 COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
85 POSTCOMPILE = @true
86
87 # It is also possible that you will need to add -I/usr/include/sys to the
88 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
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.
93 #CC_LD = g++ -static
94 CC_LD = $(CXX) $(CXX_DIALECT)
95
96 # Where is the "include" directory? Traditionally ../include or ./include
97 INCLUDE_DIR = ${srcdir}/../include
98 INCLUDE_DEP = $$(INCLUDE_DIR)
99
100 LIBIBERTY_BUILDDIR = build-libiberty-gdbserver
101 LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
102
103 # Where is ust? These will be empty if ust was not available.
104 ustlibs = @ustlibs@
105 ustinc = @ustinc@
106
107 # gnulib
108 GNULIB_BUILDDIR = build-gnulib-gdbserver
109 LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
110 INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
111
112 # Generated headers in the gnulib directory. These must be listed
113 # so that they are generated before other files are compiled.
114 GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
115
116 INCSUPPORT = -I$(srcdir)/.. -I..
117
118 # All the includes used for CFLAGS and for lint.
119 # -I. for config files.
120 # -I${srcdir} for our headers.
121 # -I$(srcdir)/../gdb/regformats for regdef.h.
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 #
127 INCLUDE_CFLAGS = -I. -I${srcdir} \
128 -I$(srcdir)/../gdb/regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
129 -I$(srcdir)/../gdb $(INCGNU) $(INCSUPPORT)
130
131 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
132 # from the config/ directory.
133 GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
134 #PROFILE_CFLAGS = -pg
135
136 WARN_CFLAGS = @WARN_CFLAGS@
137 WERROR_CFLAGS = @WERROR_CFLAGS@
138
139 WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \
140 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
141
142 # These are specifically reserved for setting from the command line
143 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
144 CFLAGS = @CFLAGS@
145 CXXFLAGS = @CXXFLAGS@
146 CPPFLAGS = @CPPFLAGS@
147
148 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
149 PTHREAD_LIBS = @PTHREAD_LIBS@
150
151 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
152 INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
153 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
154 INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
155 INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
156
157 # LDFLAGS is specifically reserved for setting from the command line
158 # when running make.
159 LDFLAGS = @LDFLAGS@
160 INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
161
162 # All source files that go into linking GDB remote server.
163
164 SFILES = \
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 \
172 $(srcdir)/linux-aarch64-low.c \
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 \
179 $(srcdir)/linux-m32r-low.c \
180 $(srcdir)/linux-m68k-low.c \
181 $(srcdir)/linux-mips-low.c \
182 $(srcdir)/linux-nios2-low.c \
183 $(srcdir)/linux-ppc-low.c \
184 $(srcdir)/linux-s390-low.c \
185 $(srcdir)/linux-sh-low.c \
186 $(srcdir)/linux-sparc-low.c \
187 $(srcdir)/linux-tile-low.c \
188 $(srcdir)/linux-x86-low.c \
189 $(srcdir)/linux-xtensa-low.c \
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 \
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
245
246 DEPFILES = @GDBSERVER_DEPFILES@
247
248 LIBOBJS = @LIBOBJS@
249
250 SOURCES = $(SFILES)
251 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
252
253 OBS = \
254 alloc.o \
255 ax.o \
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 \
262 gdbsupport/common-inferior.o \
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 \
271 gdbsupport/gdb-dlfcn.o \
272 gdbsupport/gdb_tilde_expand.o \
273 gdbsupport/gdb_vecs.o \
274 gdbsupport/gdb_wait.o \
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 \
281 gdbsupport/safe-strerror.o \
282 gdbsupport/signals.o \
283 gdbsupport/signals-state-save-restore.o \
284 gdbsupport/tdesc.o \
285 gdbsupport/xml-utils.o \
286 debug.o \
287 dll.o \
288 event-loop.o \
289 hostio.o \
290 inferiors.o \
291 mem-break.o \
292 notif.o \
293 regcache.o \
294 remote-utils.o \
295 server.o \
296 symbol.o \
297 target.o \
298 tdesc.o \
299 tracepoint.o \
300 utils.o \
301 version.o \
302 target/waitstatus.o \
303 $(DEPFILES) \
304 $(LIBOBJS) \
305 $(XML_BUILTIN)
306
307 GDBREPLAY_OBS = \
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 \
315 gdbsupport/safe-strerror.o \
316 gdbreplay.o \
317 utils.o \
318 version.o
319
320 GDBSERVER_LIBS = @GDBSERVER_LIBS@ $(PTHREAD_LIBS)
321 XM_CLIBS = @LIBS@
322 CDEPS = $(srcdir)/proc-service.list
323
324 # XML files to compile in to gdbserver, if any.
325 XML_DIR = $(srcdir)/../gdb/features
326 XML_FILES = @srv_xmlfiles@
327 XML_BUILTIN = @srv_xmlbuiltin@
328
329 IPA_DEPFILES = @IPA_DEPFILES@
330 extra_libraries = @extra_libraries@
331
332 SUBDIRS = $(GNULIB_BUILDDIR) $(LIBIBERTY_BUILDDIR)
333 CLEANDIRS = $(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.
339 REQUIRED_SUBDIRS = $(GNULIB_BUILDDIR) | $(LIBIBERTY_BUILDDIR)
340
341 FLAGS_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
373 # All generated files which can be included by another file.
374 generated_files = config.h $(GNULIB_H)
375
376 all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
377 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
378
379 # Traditionally "install" depends on "all". But it may be useful
380 # not to; for example, if the user has made some trivial change to a
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.
384 install: all
385 @$(MAKE) $(FLAGS_TO_PASS) install-only
386
387 install-only:
388 n=`echo gdbserver | sed '$(program_transform_name)'`; \
389 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
390 if [ x"$(IPA_DEPFILES)" != x ]; then \
391 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libdir); \
392 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
393 fi; \
394 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
395 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
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
400
401 install-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
407 uninstall: force
408 n=`echo gdbserver | sed '$(program_transform_name)'`; \
409 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
410 rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
411 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
412
413 installcheck:
414 check:
415 info dvi pdf:
416 install-info:
417 install-pdf:
418 html:
419 install-html:
420 clean-info: force
421 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
422
423 gdbserver$(EXEEXT): $(sort $(OBS)) ${CDEPS} $(LIBGNU) $(LIBIBERTY)
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)
428
429 $(LIBGNU) $(LIBIBERTY) $(GNULIB_H): all-lib
430 all-lib: $(GNULIB_BUILDDIR)/Makefile $(LIBIBERTY_BUILDDIR)/Makefile
431 @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS="$(SUBDIRS)" subdir_do
432 .PHONY: all-lib
433
434 gdbreplay$(EXEEXT): $(sort $(GDBREPLAY_OBS)) $(LIBGNU) $(LIBIBERTY)
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)
439
440 IPA_OBJS = \
441 alloc-ipa.o \
442 ax-ipa.o \
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 \
448 gdbsupport/safe-strerror-ipa.o \
449 gdbsupport/tdesc-ipa.o \
450 regcache-ipa.o \
451 remote-utils-ipa.o \
452 tdesc-ipa.o \
453 tracepoint-ipa.o \
454 utils-ipa.o \
455 ${IPA_DEPFILES}
456
457 IPA_LIB = libinproctrace.so
458
459 $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
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
464
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
468 TAGS: ${TAGFILES}
469 etags \
470 `for i in yzzy ${DEPFILES}; do \
471 if [ x$$i != xyzzy ]; then \
472 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' \
473 -e 's,/\(arch\|nat\|target\)/,/../\1/,' \
474 -e 's,/\(gdbsupport\)/,/../../\1/,'; \
475 fi; \
476 done` \
477 ${TAGFILES}
478 tags: TAGS
479
480 clean:
481 rm -f *.o ${ADD_FILES} *~
482 rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
483 rm -f $(IPA_LIB)
484 rm -f *-generated.c
485 rm -f stamp-xml
486 rm -f $(DEPDIR)/*.Po
487 for i in $(CONFIG_SRC_SUBDIR); do \
488 rm -f $$i/*.o; \
489 rm -f $$i/$(DEPDIR)/*; \
490 done
491 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
492
493 maintainer-clean realclean distclean: clean
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
498 for i in $(CONFIG_SRC_SUBDIR); do \
499 rmdir $$i/$(DEPDIR); \
500 done
501
502 subdir_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
517
518 config.h: stamp-h ; @true
519 stamp-h: config.in config.status
520 $(SHELL) ./config.status config.h
521
522 Makefile: Makefile.in config.status
523 $(SHELL) ./config.status $@
524
525 $(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status
526 @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
527 CONFIG_COMMANDS="depfiles" \
528 CONFIG_HEADERS= \
529 CONFIG_LINKS= \
530 $(SHELL) config.status
531
532 config.status: configure configure.srv $(srcdir)/../bfd/development.sh
533 $(SHELL) ./config.status --recheck
534
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.
539 am--refresh:
540 @:
541
542 force:
543
544 version-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 \
546 $(host_alias) $(target_alias) $@
547
548 xml-builtin-generated.c: stamp-xml; @true
549 stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
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)
553 $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin-generated.c
554 $(SILENCE) echo stamp > stamp-xml
555
556 .PRECIOUS: xml-builtin.c
557
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.
567 MAKEOVERRIDES =
568
569 regdat_sh = $(srcdir)/../gdb/regformats/regdat.sh
570
571 UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
572
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.
576 UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r
577
578 # Note, we only build the IPA if -fvisibility=hidden is supported in
579 # the first place.
580 IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
581 $(UNDO_GNULIB_CFLAGS) \
582 -fPIC -DIN_PROCESS_AGENT \
583 -fvisibility=hidden
584
585 IPAGENT_COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
586
587 # Rules for special cases.
588
589 ax-ipa.o: ax.c
590 $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
591 $(POSTCOMPILE)
592
593 ax.o: ax.c
594 $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
595 $(POSTCOMPILE)
596
597 # Rules for objects that go in the in-process agent.
598
599 arch/%-ipa.o: ../gdb/arch/%.c
600 $(IPAGENT_COMPILE) $<
601 $(POSTCOMPILE)
602
603 gdbsupport/%-ipa.o: ../gdbsupport/%.c
604 $(IPAGENT_COMPILE) $<
605 $(POSTCOMPILE)
606
607 %-ipa.o: %-generated.c
608 $(IPAGENT_COMPILE) $<
609 $(POSTCOMPILE)
610
611 %-ipa.o: %.c
612 $(IPAGENT_COMPILE) $<
613 $(POSTCOMPILE)
614
615 %-ipa.o: ../gdb/%.c
616 $(IPAGENT_COMPILE) $<
617 $(POSTCOMPILE)
618
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
630 # Rules for objects that go in the gdbserver binary.
631
632 arch/%.o: ../gdb/arch/%.c
633 $(COMPILE) $<
634 $(POSTCOMPILE)
635
636 gdbsupport/%.o: ../gdbsupport/%.c
637 $(COMPILE) $<
638 $(POSTCOMPILE)
639
640 %.o: %-generated.c
641 $(COMPILE) $<
642 $(POSTCOMPILE)
643
644 %.o: %.c
645 $(COMPILE) $<
646 $(POSTCOMPILE)
647
648 nat/%.o: ../gdb/nat/%.c
649 $(COMPILE) $<
650 $(POSTCOMPILE)
651
652 target/%.o: ../gdb/target/%.c
653 $(COMPILE) $<
654 $(POSTCOMPILE)
655
656 %.o: ../gdb/%.c
657 $(COMPILE) $<
658 $(POSTCOMPILE)
659
660 # Rules for register format descriptions. Suffix destination files with
661 # -generated to identify and clean them easily.
662
663 %-generated.c: ../gdb/regformats/%.dat $(regdat_sh)
664 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
665
666 %-generated.c: ../gdb/regformats/arm/%.dat $(regdat_sh)
667 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
668
669 %-generated.c: ../gdb/regformats/rs6000/%.dat $(regdat_sh)
670 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
671
672 #
673 # Dependency tracking.
674 #
675
676 ifeq ($(DEPMODE),depmode=gcc3)
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.
680 override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
681 -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
682 override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
683 $(@D)/$(DEPDIR)/$(basename $(@F)).Po
684 else
685 override COMPILE.pre = source='$<' object='$@' libtool=no \
686 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
687 $(CXX) -x c++ $(CXX_DIALECT)
688 # depcomp handles atomicity for us, so we don't need a postcompile
689 # step.
690 override POSTCOMPILE =
691 endif
692
693 # A list of all the objects we might care about in this build, for
694 # dependency tracking.
695 all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
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.
700 ifdef .VARIABLES
701 $(all_object_files): | $(generated_files)
702 else
703 $(all_object_files) : $(generated_files)
704 endif
705
706 # All the .deps files to include.
707 all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\
708 $(dir $(dep))/$(DEPDIR)/$(notdir $(dep)))
709
710 # Dependencies.
711 -include $(all_deps_files)
712
713 # Disable implicit make rules.
714 include $(srcdir)/../gdb/disable-implicit-rules.mk
715
716 # Do not delete intermediate files (e.g. *-generated.c).
717 .SECONDARY:
718
719 # This is the end of "Makefile.in".
This page took 0.061016 seconds and 3 git commands to generate.