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