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