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