gdb: resume ongoing step after handling fork or vfork
[deliverable/binutils-gdb.git] / gdbserver / Makefile.in
1 # Copyright (C) 1989-2022 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 top_builddir = .
79
80 include $(srcdir)/../gdb/silent-rules.mk
81
82 # Note that these are overridden by GNU make-specific code below if
83 # GNU make is used. The overrides implement dependency tracking.
84 COMPILE.pre = $(CXX) $(CXX_DIALECT)
85 COMPILE.post = -c -o $@
86 POSTCOMPILE = @true
87
88 # CXXFLAGS is at the very end on purpose, so that user-supplied flags can
89 # override internal flags.
90 COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(CXXFLAGS) $(COMPILE.post)
91
92 # It is also possible that you will need to add -I/usr/include/sys to the
93 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
94 # is where it should be according to Posix).
95
96 # Set this up with gcc if you have gnu ld and the loader will print out
97 # line numbers for undefinded refs.
98 #CC_LD = g++ -static
99 CC_LD = $(CXX) $(CXX_DIALECT)
100
101 # Where is the "include" directory? Traditionally ../include or ./include
102 INCLUDE_DIR = ${srcdir}/../include
103 INCLUDE_DEP = $$(INCLUDE_DIR)
104
105 LIBIBERTY_BUILDDIR = ../libiberty
106 LIBIBERTY_NORMAL = $(LIBIBERTY_BUILDDIR)/libiberty.a
107 LIBIBERTY_NOASAN = $(LIBIBERTY_BUILDDIR)/noasan/libiberty.a
108 LIBIBERTY_PIC = $(LIBIBERTY_BUILDDIR)/pic/libiberty.a
109 LIBIBERTY_FOR_SHLIB = \
110 $(if $(wildcard $(LIBIBERTY_NOASAN)),\
111 $(LIBIBERTY_NOASAN),\
112 $(if $(wildcard $(LIBIBERTY_PIC)),\
113 $(LIBIBERTY_PIC),\
114 $(LIBIBERTY_NORMAL)))
115 LIBIBERTY = $(LIBIBERTY_NORMAL)
116
117 GDBSUPPORT_BUILDDIR = ../gdbsupport
118 GDBSUPPORT = $(GDBSUPPORT_BUILDDIR)/libgdbsupport.a
119
120 # Where is ust? These will be empty if ust was not available.
121 ustlibs = @ustlibs@
122 ustinc = @ustinc@
123
124 # gnulib
125 GNULIB_PARENT_DIR = ..
126 include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
127
128 # Where is the INTL library? Typically in ../intl.
129 INTL = @LIBINTL@
130 INTL_DEPS = @LIBINTL_DEP@
131 INTL_CFLAGS = @INCINTL@
132
133 INCSUPPORT = -I$(srcdir)/.. -I..
134
135 # All the includes used for CFLAGS and for lint.
136 # -I. for config files.
137 # -I${srcdir} for our headers.
138 # -I$(srcdir)/../gdb/regformats for regdef.h.
139 #
140 # We do not include ../target or ../nat in here because headers
141 # in those directories should be included with the subdirectory.
142 # e.g.: "target/wait.h".
143 #
144 INCLUDE_CFLAGS = -I. -I${srcdir} \
145 -I$(srcdir)/../gdb/regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
146 -I$(srcdir)/../gdb $(INCGNU) $(INCSUPPORT) \
147 $(INTL_CFLAGS)
148
149 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
150 # from the config/ directory.
151 GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
152 #PROFILE_CFLAGS = -pg
153
154 WARN_CFLAGS = @WARN_CFLAGS@
155 WERROR_CFLAGS = @WERROR_CFLAGS@
156
157 WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \
158 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
159
160 # These are specifically reserved for setting from the command line
161 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
162 CFLAGS = @CFLAGS@
163 CXXFLAGS = @CXXFLAGS@
164 CPPFLAGS = @CPPFLAGS@
165
166 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
167 PTHREAD_LIBS = @PTHREAD_LIBS@
168
169 WIN32APILIBS = @WIN32APILIBS@
170
171 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
172 INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
173 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
174 INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
175 INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
176
177 # LDFLAGS is specifically reserved for setting from the command line
178 # when running make.
179 LDFLAGS = @LDFLAGS@
180 INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
181
182 # All source files that go into linking GDB remote server.
183
184 SFILES = \
185 $(srcdir)/debug.cc \
186 $(srcdir)/dll.cc \
187 $(srcdir)/gdbreplay.cc \
188 $(srcdir)/hostio.cc \
189 $(srcdir)/i387-fp.cc \
190 $(srcdir)/inferiors.cc \
191 $(srcdir)/linux-aarch64-low.cc \
192 $(srcdir)/linux-arc-low.cc \
193 $(srcdir)/linux-arm-low.cc \
194 $(srcdir)/linux-ia64-low.cc \
195 $(srcdir)/linux-low.cc \
196 $(srcdir)/linux-m68k-low.cc \
197 $(srcdir)/linux-mips-low.cc \
198 $(srcdir)/linux-nios2-low.cc \
199 $(srcdir)/linux-ppc-low.cc \
200 $(srcdir)/linux-riscv-low.cc \
201 $(srcdir)/linux-s390-low.cc \
202 $(srcdir)/linux-sh-low.cc \
203 $(srcdir)/linux-sparc-low.cc \
204 $(srcdir)/linux-x86-low.cc \
205 $(srcdir)/linux-xtensa-low.cc \
206 $(srcdir)/mem-break.cc \
207 $(srcdir)/netbsd-aarch64-low.cc \
208 $(srcdir)/netbsd-amd64-low.cc \
209 $(srcdir)/netbsd-i386-low.cc \
210 $(srcdir)/netbsd-low.cc \
211 $(srcdir)/netbsd-low.h \
212 $(srcdir)/proc-service.cc \
213 $(srcdir)/proc-service.list \
214 $(srcdir)/regcache.cc \
215 $(srcdir)/remote-utils.cc \
216 $(srcdir)/server.cc \
217 $(srcdir)/symbol.cc \
218 $(srcdir)/target.cc \
219 $(srcdir)/thread-db.cc \
220 $(srcdir)/utils.cc \
221 $(srcdir)/win32-i386-low.cc \
222 $(srcdir)/win32-low.cc \
223 $(srcdir)/x86-low.cc \
224 $(srcdir)/../gdb/alloc.c \
225 $(srcdir)/../gdb/arch/arc.c \
226 $(srcdir)/../gdb/arch/arm.c \
227 $(srcdir)/../gdb/arch/arm-get-next-pcs.c \
228 $(srcdir)/../gdb/arch/arm-linux.c \
229 $(srcdir)/../gdb/arch/ppc-linux-common.c \
230 $(srcdir)/../gdb/arch/riscv.c \
231 $(srcdir)/../gdb/nat/aarch64-mte-linux-ptrace.c \
232 $(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \
233 $(srcdir)/../gdb/nat/linux-btrace.c \
234 $(srcdir)/../gdb/nat/linux-namespaces.c \
235 $(srcdir)/../gdb/nat/linux-osdata.c \
236 $(srcdir)/../gdb/nat/linux-personality.c \
237 $(srcdir)/../gdb/nat/mips-linux-watch.c \
238 $(srcdir)/../gdb/nat/ppc-linux.c \
239 $(srcdir)/../gdb/nat/riscv-linux-tdesc.c \
240 $(srcdir)/../gdb/nat/fork-inferior.c \
241 $(srcdir)/../gdb/target/waitstatus.c
242
243 DEPFILES = @GDBSERVER_DEPFILES@
244
245 LIBOBJS = @LIBOBJS@
246
247 SOURCES = $(SFILES)
248 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
249
250 OBS = \
251 alloc.o \
252 ax.o \
253 debug.o \
254 dll.o \
255 hostio.o \
256 inferiors.o \
257 mem-break.o \
258 notif.o \
259 regcache.o \
260 remote-utils.o \
261 server.o \
262 symbol.o \
263 target.o \
264 tdesc.o \
265 tracepoint.o \
266 utils.o \
267 version.o \
268 target/waitstatus.o \
269 $(DEPFILES) \
270 $(LIBOBJS) \
271 $(XML_BUILTIN)
272
273 GDBREPLAY_OBS = \
274 gdbreplay.o \
275 utils.o \
276 version.o
277
278 GDBSERVER_LIBS = @GDBSERVER_LIBS@ $(PTHREAD_LIBS)
279 XM_CLIBS = @LIBS@
280 CDEPS = $(srcdir)/proc-service.list
281
282 # XML files to compile in to gdbserver, if any.
283 XML_DIR = $(srcdir)/../gdb/features
284 XML_FILES = @srv_xmlfiles@
285 XML_BUILTIN = @srv_xmlbuiltin@
286
287 IPA_DEPFILES = @IPA_DEPFILES@
288 extra_libraries = @extra_libraries@
289
290 FLAGS_TO_PASS = \
291 "prefix=$(prefix)" \
292 "exec_prefix=$(exec_prefix)" \
293 "infodir=$(infodir)" \
294 "datarootdir=$(datarootdir)" \
295 "docdir=$(docdir)" \
296 "htmldir=$(htmldir)" \
297 "pdfdir=$(pdfdir)" \
298 "libdir=$(libdir)" \
299 "mandir=$(mandir)" \
300 "datadir=$(datadir)" \
301 "includedir=$(includedir)" \
302 "against=$(against)" \
303 "DESTDIR=$(DESTDIR)" \
304 "AR=$(AR)" \
305 "AR_FLAGS=$(AR_FLAGS)" \
306 "CC=$(CC)" \
307 "CFLAGS=$(CFLAGS)" \
308 "CXX=$(CXX)" \
309 "CXXFLAGS=$(CXXFLAGS)" \
310 "DLLTOOL=$(DLLTOOL)" \
311 "LDFLAGS=$(LDFLAGS)" \
312 "RANLIB=$(RANLIB)" \
313 "MAKEINFO=$(MAKEINFO)" \
314 "MAKEHTML=$(MAKEHTML)" \
315 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
316 "INSTALL=$(INSTALL)" \
317 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
318 "INSTALL_DATA=$(INSTALL_DATA)" \
319 "RUNTEST=$(RUNTEST)" \
320 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
321
322 # All generated files which can be included by another file.
323 generated_files = config.h
324
325 all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
326
327 # Traditionally "install" depends on "all". But it may be useful
328 # not to; for example, if the user has made some trivial change to a
329 # source file and doesn't care about rebuilding or just wants to save the
330 # time it takes for make to check that all is up to date.
331 # install-only is intended to address that need.
332 install: all
333 @$(MAKE) $(FLAGS_TO_PASS) install-only
334
335 install-only:
336 n=`echo gdbserver | sed '$(program_transform_name)'`; \
337 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
338 if [ x"$(IPA_DEPFILES)" != x ]; then \
339 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libdir); \
340 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
341 fi; \
342 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
343 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
344
345 install-strip:
346 $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
347 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
348 `test -z '$(STRIP)' || \
349 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
350
351 uninstall: force
352 n=`echo gdbserver | sed '$(program_transform_name)'`; \
353 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
354 rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
355
356 installcheck:
357 check:
358 info dvi pdf:
359 install-info:
360 install-pdf:
361 html:
362 install-html:
363 clean-info:
364
365 gdbserver$(EXEEXT): $(sort $(OBS)) ${CDEPS} $(LIBGNU) $(LIBIBERTY) \
366 $(INTL_DEPS) $(GDBSUPPORT)
367 $(SILENCE) rm -f gdbserver$(EXEEXT)
368 $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
369 $(CXXFLAGS) \
370 -o gdbserver$(EXEEXT) $(OBS) $(GDBSUPPORT) $(LIBGNU) \
371 $(LIBGNU_EXTRA_LIBS) $(LIBIBERTY) $(INTL) \
372 $(GDBSERVER_LIBS) $(XM_CLIBS) $(WIN32APILIBS)
373
374 gdbreplay$(EXEEXT): $(sort $(GDBREPLAY_OBS)) $(LIBGNU) $(LIBIBERTY) \
375 $(INTL_DEPS) $(GDBSUPPORT)
376 $(SILENCE) rm -f gdbreplay$(EXEEXT)
377 $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
378 $(CXXFLAGS) \
379 -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) $(XM_CLIBS) \
380 $(GDBSUPPORT) $(LIBGNU) $(LIBGNU_EXTRA_LIBS) \
381 $(LIBIBERTY) $(INTL) $(WIN32APILIBS)
382
383 IPA_OBJS = \
384 alloc-ipa.o \
385 ax-ipa.o \
386 gdbsupport/common-utils-ipa.o \
387 gdbsupport/errors-ipa.o \
388 gdbsupport/format-ipa.o \
389 gdbsupport/print-utils-ipa.o \
390 gdbsupport/rsp-low-ipa.o \
391 gdbsupport/safe-strerror-ipa.o \
392 gdbsupport/tdesc-ipa.o \
393 regcache-ipa.o \
394 remote-utils-ipa.o \
395 tdesc-ipa.o \
396 tracepoint-ipa.o \
397 utils-ipa.o \
398 ${IPA_DEPFILES}
399
400 IPA_LIB = libinproctrace.so
401
402 $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
403 $(SILENCE) rm -f $(IPA_LIB)
404 $(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
405 -Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
406 $(CXXFLAGS) \
407 -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread
408
409 # Put the proper machine-specific files first, so M-. on a machine
410 # specific routine gets the one for the correct machine.
411 # The xyzzy stuff below deals with empty DEPFILES
412 TAGS: ${TAGFILES}
413 etags \
414 `for i in yzzy ${DEPFILES}; do \
415 if [ x$$i != xyzzy ]; then \
416 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.cc/' \
417 -e 's,/\(arch\|nat\|target\)/,/../\1/,' \
418 fi; \
419 done` \
420 ${TAGFILES}
421 tags: TAGS
422
423 mostlyclean clean:
424 rm -f *.o ${ADD_FILES} *~
425 rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
426 rm -f $(IPA_LIB)
427 rm -f *-generated.cc
428 rm -f stamp-xml
429 rm -f $(DEPDIR)/*.Po
430 for i in $(CONFIG_SRC_SUBDIR); do \
431 rm -f $$i/*.o; \
432 rm -f $$i/$(DEPDIR)/*; \
433 done
434
435 maintainer-clean realclean distclean: clean
436 rm -f Makefile config.status config.h stamp-h config.log
437 rm -f Makefile
438 for i in $(CONFIG_SRC_SUBDIR); do \
439 rmdir $$i/$(DEPDIR); \
440 done
441
442 config.h: stamp-h ; @true
443 stamp-h: config.in config.status
444 $(SHELL) ./config.status config.h
445
446 Makefile: Makefile.in config.status
447 $(SHELL) ./config.status $@
448
449 config.status: configure configure.srv $(srcdir)/../bfd/development.sh
450 $(SHELL) ./config.status --recheck
451
452 # automatic rebuilding in automake-generated Makefiles requires
453 # this rule in the toplevel Makefile, which, with GNU make, causes
454 # the desired updates through the implicit regeneration of the Makefile
455 # and all of its prerequisites.
456 am--refresh:
457 @:
458
459 force:
460
461 version-generated.cc: Makefile $(srcdir)/../gdb/version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh
462 $(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir)/../gdb \
463 $(host_alias) $(target_alias) $@
464
465 xml-builtin-generated.cc: stamp-xml; @true
466 stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
467 $(SILENCE) rm -f xml-builtin.tmp
468 $(ECHO_GEN_XML_BUILTIN_GENERATED) $(SHELL) $(XML_DIR)/feature_to_c.sh \
469 xml-builtin.tmp $(XML_FILES)
470 $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin-generated.cc
471 $(SILENCE) echo stamp > stamp-xml
472
473 .PRECIOUS: xml-builtin.cc
474
475 # GNU Make has an annoying habit of putting *all* the Makefile variables
476 # into the environment, unless you include this target as a circumvention.
477 # Rumor is that this will be fixed (and this target can be removed)
478 # in GNU Make 4.0.
479 .NOEXPORT:
480
481 # GNU Make 3.63 has a different problem: it keeps tacking command line
482 # overrides onto the definition of $(MAKE). This variable setting
483 # will remove them.
484 MAKEOVERRIDES =
485
486 regdat_sh = $(srcdir)/../gdb/regformats/regdat.sh
487
488 UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
489
490 # Undo gnulib replacements for the IPA shared library build.
491 # The gnulib headers are still needed, but gnulib is not linked
492 # into the IPA lib so replacement apis don't work.
493 UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free
494
495 # Note, we only build the IPA if -fvisibility=hidden is supported in
496 # the first place.
497 IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
498 $(UNDO_GNULIB_CFLAGS) \
499 -fPIC -DIN_PROCESS_AGENT \
500 -fvisibility=hidden
501
502 # CXXFLAGS is at the very end on purpose, so that user-supplied flags can
503 # override internal flags.
504 IPAGENT_COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(IPAGENT_CFLAGS) $(CXXFLAGS) $(COMPILE.post)
505
506 # Rules for special cases.
507
508 ax-ipa.o: ax.cc
509 $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
510 $(POSTCOMPILE)
511
512 ax.o: ax.cc
513 $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
514 $(POSTCOMPILE)
515
516 # Rules for objects that go in the in-process agent.
517
518 arch/%-ipa.o: ../gdb/arch/%.c
519 $(IPAGENT_COMPILE) -x c++ $<
520 $(POSTCOMPILE)
521
522 gdbsupport/%-ipa.o: ../gdbsupport/%.cc
523 $(IPAGENT_COMPILE) $<
524 $(POSTCOMPILE)
525
526 %-ipa.o: %-generated.cc
527 $(IPAGENT_COMPILE) $<
528 $(POSTCOMPILE)
529
530 %-ipa.o: %.cc
531 $(IPAGENT_COMPILE) $<
532 $(POSTCOMPILE)
533
534 %-ipa.o: ../gdb/%.c
535 $(IPAGENT_COMPILE) -x c++ $<
536 $(POSTCOMPILE)
537
538 # Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
539 # Therefore, this one needs to be before "%.o: %.cc" for it to be considered for
540 # files such as linux-amd64-ipa.o generated from linux-amd64-ipa.cc.
541 #
542 # Later versions of GNU Make choose the rule with the shortest stem, so it would
543 # work in any order.
544
545 %-ipa.o: %-ipa.cc
546 $(IPAGENT_COMPILE) $<
547 $(POSTCOMPILE)
548
549 # Rules for objects that go in the gdbserver binary.
550
551 arch/%.o: ../gdb/arch/%.c
552 $(COMPILE) -x c++ $<
553 $(POSTCOMPILE)
554
555 %.o: %-generated.cc
556 $(COMPILE) $<
557 $(POSTCOMPILE)
558
559 %.o: %.cc
560 $(COMPILE) $<
561 $(POSTCOMPILE)
562
563 nat/%.o: ../gdb/nat/%.c
564 $(COMPILE) -x c++ $<
565 $(POSTCOMPILE)
566
567 target/%.o: ../gdb/target/%.c
568 $(COMPILE) -x c++ $<
569 $(POSTCOMPILE)
570
571 %.o: ../gdb/%.c
572 $(COMPILE) -x c++ $<
573 $(POSTCOMPILE)
574
575 # Rules for register format descriptions. Suffix destination files with
576 # -generated to identify and clean them easily.
577
578 %-generated.cc: ../gdb/regformats/%.dat $(regdat_sh)
579 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
580
581 %-generated.cc: ../gdb/regformats/rs6000/%.dat $(regdat_sh)
582 $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
583
584 #
585 # Dependency tracking.
586 #
587
588 ifeq ($(DEPMODE),depmode=gcc3)
589 # Note that we put the dependencies into a .Tpo file, then move them
590 # into place if the compile succeeds. We need this because gcc does
591 # not atomically write the dependency output file.
592 override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
593 -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
594 override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
595 $(@D)/$(DEPDIR)/$(basename $(@F)).Po
596 else
597 override COMPILE.pre = source='$<' object='$@' libtool=no \
598 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
599 $(CXX) $(CXX_DIALECT)
600 # depcomp handles atomicity for us, so we don't need a postcompile
601 # step.
602 override POSTCOMPILE =
603 endif
604
605 # A list of all the objects we might care about in this build, for
606 # dependency tracking.
607 all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
608
609 # Ensure that generated files are created early. Use order-only
610 # dependencies if available. They require GNU make 3.80 or newer,
611 # and the .VARIABLES variable was introduced at the same time.
612 ifdef .VARIABLES
613 $(all_object_files): | $(generated_files)
614 else
615 $(all_object_files) : $(generated_files)
616 endif
617
618 # All the .deps files to include.
619 all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\
620 $(dir $(dep))/$(DEPDIR)/$(notdir $(dep)))
621
622 # Dependencies.
623 -include $(all_deps_files)
624
625 # Disable implicit make rules.
626 include $(srcdir)/../gdb/disable-implicit-rules.mk
627
628 # Do not delete intermediate files (e.g. *-generated.cc).
629 .SECONDARY:
630
631 # This is the end of "Makefile.in".
This page took 0.04255 seconds and 4 git commands to generate.