1 # Copyright (C) 1989-2020 Free Software Foundation, Inc.
3 # This file is part of GDB.
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.
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.
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/>.
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.
22 exec_prefix = @
exec_prefix@
24 host_alias
= @host_noncanonical@
25 target_alias
= @target_noncanonical@
26 program_transform_name
= @program_transform_name@
29 tooldir
= $(libdir)/$(target_alias
)
31 datarootdir
= @datarootdir@
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
44 htmldir
= $(prefix)/html
45 includedir = @
includedir@
46 CONFIG_SRC_SUBDIR
= @CONFIG_SRC_SUBDIR@
52 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
53 INSTALL_DATA
= @INSTALL_DATA@
58 CXX_DIALECT
= @CXX_DIALECT@
62 # Dependency tracking information.
65 depcomp
= $(SHELL
) $(srcdir)/..
/..
/depcomp
67 # Directory containing source files. Don't clean up the spacing,
68 # this exact string is matched for by the "configure" script.
70 abs_top_srcdir
= @abs_top_srcdir@
71 abs_srcdir
= @abs_srcdir@
74 include $(srcdir)/..
/silent-rules.mk
76 # Note that these are overridden by GNU make-specific code below if
77 # GNU make is used. The overrides implement dependency tracking.
78 COMPILE.pre
= $(CXX
) -x c
++ $(CXX_DIALECT
)
79 COMPILE.post
= -c
-o
$@
80 COMPILE
= $(ECHO_CXX
) $(COMPILE.pre
) $(INTERNAL_CFLAGS
) $(COMPILE.post
)
83 # It is also possible that you will need to add -I/usr/include/sys to the
84 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
85 # is where it should be according to Posix).
87 # Set this up with gcc if you have gnu ld and the loader will print out
88 # line numbers for undefinded refs.
90 CC_LD
= $(CXX
) $(CXX_DIALECT
)
92 # Where is the "include" directory? Traditionally ../include or ./include
93 INCLUDE_DIR
= ${srcdir}/..
/..
/include
94 INCLUDE_DEP
= $$(INCLUDE_DIR
)
96 LIBIBERTY_BUILDDIR
= build-libiberty-gdbserver
97 LIBIBERTY
= $(LIBIBERTY_BUILDDIR
)/libiberty.a
99 # Where is ust? These will be empty if ust was not available.
104 GNULIB_BUILDDIR
= build-gnulib-gdbserver
105 LIBGNU
= $(GNULIB_BUILDDIR
)/import
/libgnu.a
106 INCGNU
= -I
$(srcdir)/..
/..
/gnulib
/import
-I
$(GNULIB_BUILDDIR
)/import
108 # Generated headers in the gnulib directory. These must be listed
109 # so that they are generated before other files are compiled.
110 GNULIB_H
= $(GNULIB_BUILDDIR
)/import
/string.h @GNULIB_STDINT_H@
112 INCSUPPORT
= -I
$(srcdir)/..
/..
-I..
/..
114 # All the includes used for CFLAGS and for lint.
115 # -I. for config files.
116 # -I${srcdir} for our headers.
117 # -I$(srcdir)/../regformats for regdef.h.
119 # We do not include ../target or ../nat in here because headers
120 # in those directories should be included with the subdirectory.
121 # e.g.: "target/wait.h".
123 INCLUDE_CFLAGS
= -I.
-I
${srcdir} \
124 -I
$(srcdir)/..
/regformats
-I
$(srcdir)/..
-I
$(INCLUDE_DIR
) \
125 $(INCGNU
) $(INCSUPPORT
)
127 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
128 # from the config/ directory.
129 GLOBAL_CFLAGS
= ${MT_CFLAGS} ${MH_CFLAGS}
130 #PROFILE_CFLAGS = -pg
132 WARN_CFLAGS
= @WARN_CFLAGS@
133 WERROR_CFLAGS
= @WERROR_CFLAGS@
135 WARN_CFLAGS_NO_FORMAT
= `echo " $(WARN_CFLAGS) " \
136 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
138 # These are specifically reserved for setting from the command line
139 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
141 CXXFLAGS
= @CXXFLAGS@
142 CPPFLAGS
= @CPPFLAGS@
144 PTHREAD_CFLAGS
= @PTHREAD_CFLAGS@
145 PTHREAD_LIBS
= @PTHREAD_LIBS@
147 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
148 INTERNAL_CFLAGS_BASE
= ${CXXFLAGS} ${GLOBAL_CFLAGS} \
149 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS
)
150 INTERNAL_WARN_CFLAGS
= ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS
)
151 INTERNAL_CFLAGS
= ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS
) -DGDBSERVER
153 # LDFLAGS is specifically reserved for setting from the command line
156 INTERNAL_LDFLAGS
= $(LDFLAGS
) @RDYNAMIC@
158 # All source files that go into linking GDB remote server.
163 $(srcdir)/gdbreplay.c \
165 $(srcdir)/hostio-errno.c \
166 $(srcdir)/i387-fp.c \
167 $(srcdir)/inferiors.c \
168 $(srcdir)/linux-aarch64-low.c \
169 $(srcdir)/linux-arm-low.c \
170 $(srcdir)/linux-bfin-low.c \
171 $(srcdir)/linux-cris-low.c \
172 $(srcdir)/linux-crisv32-low.c \
173 $(srcdir)/linux-ia64-low.c \
174 $(srcdir)/linux-low.c \
175 $(srcdir)/linux-m32r-low.c \
176 $(srcdir)/linux-m68k-low.c \
177 $(srcdir)/linux-mips-low.c \
178 $(srcdir)/linux-nios2-low.c \
179 $(srcdir)/linux-ppc-low.c \
180 $(srcdir)/linux-s390-low.c \
181 $(srcdir)/linux-sh-low.c \
182 $(srcdir)/linux-sparc-low.c \
183 $(srcdir)/linux-tile-low.c \
184 $(srcdir)/linux-x86-low.c \
185 $(srcdir)/linux-xtensa-low.c \
186 $(srcdir)/mem-break.c \
187 $(srcdir)/proc-service.c \
188 $(srcdir)/proc-service.list \
189 $(srcdir)/regcache.c \
190 $(srcdir)/remote-utils.c \
194 $(srcdir)/thread-db.c \
196 $(srcdir)/win32-arm-low.c \
197 $(srcdir)/win32-i386-low.c \
198 $(srcdir)/win32-low.c \
199 $(srcdir)/wincecompat.c \
200 $(srcdir)/x86-low.c \
201 $(srcdir)/arch
/arm.c \
202 $(srcdir)/arch
/arm-get-next-pcs.c \
203 $(srcdir)/arch
/arm-linux.c \
204 $(srcdir)/arch
/ppc-linux-common.c \
205 $(srcdir)/..
/alloc.c \
206 $(srcdir)/..
/..
/gdbsupport
/btrace-common.c \
207 $(srcdir)/..
/..
/gdbsupport
/buffer.c \
208 $(srcdir)/..
/..
/gdbsupport
/cleanups.c \
209 $(srcdir)/..
/..
/gdbsupport
/common-debug.c \
210 $(srcdir)/..
/..
/gdbsupport
/common-exceptions.c \
211 $(srcdir)/..
/..
/gdbsupport
/common-inferior.c \
212 $(srcdir)/..
/..
/gdbsupport
/common-regcache.c \
213 $(srcdir)/..
/..
/gdbsupport
/common-utils.c \
214 $(srcdir)/..
/..
/gdbsupport
/errors.c \
215 $(srcdir)/..
/..
/gdbsupport
/environ.c \
216 $(srcdir)/..
/..
/gdbsupport
/fileio.c \
217 $(srcdir)/..
/..
/gdbsupport
/filestuff.c \
218 $(srcdir)/..
/..
/gdbsupport
/job-control.c \
219 $(srcdir)/..
/..
/gdbsupport
/gdb-dlfcn.c \
220 $(srcdir)/..
/..
/gdbsupport
/gdb_tilde_expand.c \
221 $(srcdir)/..
/..
/gdbsupport
/gdb_vecs.c \
222 $(srcdir)/..
/..
/gdbsupport
/gdb_wait.c \
223 $(srcdir)/..
/..
/gdbsupport
/netstuff.c \
224 $(srcdir)/..
/..
/gdbsupport
/new-op.c \
225 $(srcdir)/..
/..
/gdbsupport
/pathstuff.c \
226 $(srcdir)/..
/..
/gdbsupport
/print-utils.c \
227 $(srcdir)/..
/..
/gdbsupport
/ptid.c \
228 $(srcdir)/..
/..
/gdbsupport
/rsp-low.c \
229 $(srcdir)/..
/..
/gdbsupport
/safe-strerror.c \
230 $(srcdir)/..
/..
/gdbsupport
/tdesc.c \
231 $(srcdir)/..
/..
/gdbsupport
/xml-utils.c \
232 $(srcdir)/nat
/aarch64-sve-linux-ptrace.c \
233 $(srcdir)/nat
/linux-btrace.c \
234 $(srcdir)/nat
/linux-namespaces.c \
235 $(srcdir)/nat
/linux-osdata.c \
236 $(srcdir)/nat
/linux-personality.c \
237 $(srcdir)/nat
/mips-linux-watch.c \
238 $(srcdir)/nat
/ppc-linux.c \
239 $(srcdir)/nat
/fork-inferior.c \
240 $(srcdir)/target
/waitstatus.c
242 DEPFILES
= @GDBSERVER_DEPFILES@
247 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
253 gdbsupport
/btrace-common.o \
254 gdbsupport
/buffer.o \
255 gdbsupport
/cleanups.o \
256 gdbsupport
/common-debug.o \
257 gdbsupport
/common-exceptions.o \
258 gdbsupport
/common-inferior.o \
259 gdbsupport
/job-control.o \
260 gdbsupport
/common-regcache.o \
261 gdbsupport
/common-utils.o \
262 gdbsupport
/errors.o \
263 gdbsupport
/environ.o \
264 gdbsupport
/fileio.o \
265 gdbsupport
/filestuff.o \
266 gdbsupport
/format.o \
267 gdbsupport
/gdb-dlfcn.o \
268 gdbsupport
/gdb_tilde_expand.o \
269 gdbsupport
/gdb_vecs.o \
270 gdbsupport
/gdb_wait.o \
271 gdbsupport
/netstuff.o \
272 gdbsupport
/new-op.o \
273 gdbsupport
/pathstuff.o \
274 gdbsupport
/print-utils.o \
276 gdbsupport
/rsp-low.o \
277 gdbsupport
/safe-strerror.o \
278 gdbsupport
/signals.o \
279 gdbsupport
/signals-state-save-restore.o \
281 gdbsupport
/xml-utils.o \
304 gdbsupport
/cleanups.o \
305 gdbsupport
/common-exceptions.o \
306 gdbsupport
/common-utils.o \
307 gdbsupport
/rsp-low.o \
308 gdbsupport
/errors.o \
309 gdbsupport
/netstuff.o \
310 gdbsupport
/print-utils.o \
311 gdbsupport
/safe-strerror.o \
316 GDBSERVER_LIBS
= @GDBSERVER_LIBS@
$(PTHREAD_LIBS
)
318 CDEPS
= $(srcdir)/proc-service.list
320 # XML files to compile in to gdbserver, if any.
321 XML_DIR
= $(srcdir)/..
/features
322 XML_FILES
= @srv_xmlfiles@
323 XML_BUILTIN
= @srv_xmlbuiltin@
325 IPA_DEPFILES
= @IPA_DEPFILES@
326 extra_libraries
= @extra_libraries@
328 SUBDIRS
= $(GNULIB_BUILDDIR
) $(LIBIBERTY_BUILDDIR
)
329 CLEANDIRS
= $(SUBDIRS
)
331 # List of subdirectories in the build tree that must exist.
332 # This is used to force build failures in existing trees when
333 # a new directory is added.
334 # The format here is for the `case' shell command.
335 REQUIRED_SUBDIRS
= $(GNULIB_BUILDDIR
) |
$(LIBIBERTY_BUILDDIR
)
339 "exec_prefix=$(exec_prefix)" \
340 "infodir=$(infodir)" \
341 "datarootdir=$(datarootdir)" \
343 "htmldir=$(htmldir)" \
347 "datadir=$(datadir)" \
348 "includedir=$(includedir)" \
349 "against=$(against)" \
350 "DESTDIR=$(DESTDIR)" \
352 "AR_FLAGS=$(AR_FLAGS)" \
356 "CXXFLAGS=$(CXXFLAGS)" \
357 "DLLTOOL=$(DLLTOOL)" \
358 "LDFLAGS=$(LDFLAGS)" \
360 "MAKEINFO=$(MAKEINFO)" \
361 "MAKEHTML=$(MAKEHTML)" \
362 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
363 "INSTALL=$(INSTALL)" \
364 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
365 "INSTALL_DATA=$(INSTALL_DATA)" \
366 "RUNTEST=$(RUNTEST)" \
367 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
369 # All generated files which can be included by another file.
370 generated_files
= config.h
$(GNULIB_H
)
372 all: gdbserver
$(EXEEXT
) gdbreplay
$(EXEEXT
) $(extra_libraries
)
373 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
375 # Traditionally "install" depends on "all". But it may be useful
376 # not to; for example, if the user has made some trivial change to a
377 # source file and doesn't care about rebuilding or just wants to save the
378 # time it takes for make to check that all is up to date.
379 # install-only is intended to address that need.
381 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
384 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
385 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
386 if
[ x
"$(IPA_DEPFILES)" != x
]; then \
387 $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
$(DESTDIR
)$(libdir); \
388 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) $(IPA_LIB
) $(DESTDIR
)$(libdir)/$(IPA_LIB
); \
390 $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
391 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) gdbserver
$(EXEEXT
) $(DESTDIR
)$(bindir)/$$n$(EXEEXT
)
392 # Note that we run install and not install-only, as the latter
393 # is not part of GNU standards and in particular not provided
395 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=install "DODIRS=$(SUBDIRS)" subdir_do
398 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
399 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
400 rm -f
$(DESTDIR
)/$(bindir)/$$n$(EXEEXT
) $(DESTDIR
)$(man1dir)/$$n.1
401 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
411 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
413 gdbserver
$(EXEEXT
): $(sort $(OBS
)) ${CDEPS} $(LIBGNU
) $(LIBIBERTY
)
414 $(SILENCE
) rm -f gdbserver
$(EXEEXT
)
415 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) \
416 -o gdbserver
$(EXEEXT
) $(OBS
) $(LIBGNU
) $(LIBIBERTY
) \
417 $(GDBSERVER_LIBS
) $(XM_CLIBS
)
419 $(LIBGNU
) $(LIBIBERTY
) $(GNULIB_H
): all-lib
420 all-lib
: $(GNULIB_BUILDDIR
)/Makefile
$(LIBIBERTY_BUILDDIR
)/Makefile
421 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all DODIRS
="$(SUBDIRS)" subdir_do
424 gdbreplay
$(EXEEXT
): $(sort $(GDBREPLAY_OBS
)) $(LIBGNU
) $(LIBIBERTY
)
425 $(SILENCE
) rm -f gdbreplay
$(EXEEXT
)
426 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) \
427 -o gdbreplay
$(EXEEXT
) $(GDBREPLAY_OBS
) $(XM_CLIBS
) $(LIBGNU
) \
433 gdbsupport
/common-utils-ipa.o \
434 gdbsupport
/errors-ipa.o \
435 gdbsupport
/format-ipa.o \
436 gdbsupport
/print-utils-ipa.o \
437 gdbsupport
/rsp-low-ipa.o \
438 gdbsupport
/safe-strerror-ipa.o \
439 gdbsupport
/tdesc-ipa.o \
447 IPA_LIB
= libinproctrace.so
449 $(IPA_LIB
): $(sort $(IPA_OBJS
)) ${CDEPS}
450 $(SILENCE
) rm -f
$(IPA_LIB
)
451 $(ECHO_CXXLD
) $(CC_LD
) -shared
-fPIC
-Wl
,--soname
=$(IPA_LIB
) \
452 -Wl
,--no-undefined
$(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) \
453 -o
$(IPA_LIB
) ${IPA_OBJS} -ldl
-pthread
455 # Put the proper machine-specific files first, so M-. on a machine
456 # specific routine gets the one for the correct machine.
457 # The xyzzy stuff below deals with empty DEPFILES
459 etags
`find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
460 `find ${srcdir}/../config -name ${XM_FILE} -print` \
461 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
462 `for i in yzzy ${DEPFILES}; do \
463 if [ x$$i != xyzzy ]; then \
464 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
471 rm -f
*.o
${ADD_FILES} *~
472 rm -f gdbserver
$(EXEEXT
) gdbreplay
$(EXEEXT
) core make.log
477 for i in
$(CONFIG_SRC_SUBDIR
); do \
479 rm -f
$$i/$(DEPDIR
)/*; \
481 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
483 maintainer-clean
realclean distclean: clean
484 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
485 rm -rf
$(GNULIB_BUILDDIR
)
486 rm -f Makefile config.status config.h stamp-h config.log
488 for i in
$(CONFIG_SRC_SUBDIR
); do \
489 rmdir
$$i/$(DEPDIR
); \
493 @for i in
$(DODIRS
); do \
495 $(REQUIRED_SUBDIRS
)) \
496 if
[ ! -f .
/$$i/Makefile
] ; then \
497 echo
"Missing $$i/Makefile" >&2 ; \
501 if
[ -f .
/$$i/Makefile
] ; then \
503 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
508 config.h
: stamp-h
; @true
509 stamp-h
: config.in config.status
510 $(SHELL
) .
/config.status config.h
512 Makefile
: Makefile.in config.status
513 $(SHELL
) .
/config.status
$@
515 $(GNULIB_BUILDDIR
)/Makefile
: $(srcdir)/..
/..
/gnulib
/Makefile.in config.status
516 @cd
$(GNULIB_BUILDDIR
); CONFIG_FILES
="Makefile" \
517 CONFIG_COMMANDS
="depfiles" \
520 $(SHELL
) config.status
522 config.status
: configure configure.srv
$(srcdir)/..
/..
/bfd
/development.sh
523 $(SHELL
) .
/config.status
--recheck
525 # automatic rebuilding in automake-generated Makefiles requires
526 # this rule in the toplevel Makefile, which, with GNU make, causes
527 # the desired updates through the implicit regeneration of the Makefile
528 # and all of its prerequisites.
534 version-generated.c
: Makefile
$(srcdir)/..
/version.in
$(srcdir)/..
/..
/bfd
/version.h
$(srcdir)/..
/..
/gdbsupport
/create-version.sh
535 $(ECHO_GEN
) $(SHELL
) $(srcdir)/..
/..
/gdbsupport
/create-version.sh
$(srcdir)/.. \
536 $(host_alias
) $(target_alias
) $@
538 xml-builtin-generated.c
: stamp-xml
; @true
539 stamp-xml
: $(XML_DIR
)/feature_to_c.sh Makefile
$(XML_FILES
)
540 $(SILENCE
) rm -f xml-builtin.tmp
541 $(ECHO_GEN_XML_BUILTIN_GENERATED
) $(SHELL
) $(XML_DIR
)/feature_to_c.sh \
542 xml-builtin.tmp
$(XML_FILES
)
543 $(SILENCE
) $(SHELL
) $(srcdir)/..
/..
/move-if-change xml-builtin.tmp xml-builtin-generated.c
544 $(SILENCE
) echo stamp
> stamp-xml
546 .PRECIOUS
: xml-builtin.c
548 # GNU Make has an annoying habit of putting *all* the Makefile variables
549 # into the environment, unless you include this target as a circumvention.
550 # Rumor is that this will be fixed (and this target can be removed)
554 # GNU Make 3.63 has a different problem: it keeps tacking command line
555 # overrides onto the definition of $(MAKE). This variable setting
559 regdat_sh
= $(srcdir)/..
/regformats
/regdat.sh
561 UST_CFLAGS
= $(ustinc
) -DCONFIG_UST_GDB_INTEGRATION
563 # Undo gnulib replacements for the IPA shared library build.
564 # The gnulib headers are still needed, but gnulib is not linked
565 # into the IPA lib so replacement apis don't work.
566 UNDO_GNULIB_CFLAGS
= -Drpl_strerror_r
=strerror_r
568 # Note, we only build the IPA if -fvisibility=hidden is supported in
570 IPAGENT_CFLAGS
= $(INTERNAL_CFLAGS
) $(UST_CFLAGS
) \
571 $(UNDO_GNULIB_CFLAGS
) \
572 -fPIC
-DIN_PROCESS_AGENT \
575 IPAGENT_COMPILE
= $(ECHO_CXX
) $(COMPILE.pre
) $(IPAGENT_CFLAGS
) $(COMPILE.post
)
577 # Rules for special cases.
580 $(IPAGENT_COMPILE
) $(WARN_CFLAGS_NO_FORMAT
) $<
584 $(COMPILE
) $(WARN_CFLAGS_NO_FORMAT
) $<
587 # Rules for objects that go in the in-process agent.
589 arch
/%-ipa.o
: ..
/arch
/%.c
590 $(IPAGENT_COMPILE
) $<
593 gdbsupport
/%-ipa.o
: ..
/..
/gdbsupport
/%.c
594 $(IPAGENT_COMPILE
) $<
597 %-ipa.o
: %-generated.c
598 $(IPAGENT_COMPILE
) $<
602 $(IPAGENT_COMPILE
) $<
606 $(IPAGENT_COMPILE
) $<
609 # Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
610 # Therefore, this one needs to be before "%.o: %.c" for it to be considered for
611 # files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c.
613 # Later versions of GNU Make choose the rule with the shortest stem, so it would
617 $(IPAGENT_COMPILE
) $<
620 # Rules for objects that go in the gdbserver binary.
622 arch
/%.o
: ..
/arch
/%.c
626 gdbsupport
/%.o
: ..
/..
/gdbsupport
/%.c
650 # Rules for register format descriptions. Suffix destination files with
651 # -generated to identify and clean them easily.
653 %-generated.c
: ..
/regformats
/%.dat
$(regdat_sh
)
654 $(ECHO_REGDAT
) $(SHELL
) $(regdat_sh
) $< $@
656 %-generated.c
: ..
/regformats
/arm
/%.dat
$(regdat_sh
)
657 $(ECHO_REGDAT
) $(SHELL
) $(regdat_sh
) $< $@
659 %-generated.c
: ..
/regformats
/rs6000
/%.dat
$(regdat_sh
)
660 $(ECHO_REGDAT
) $(SHELL
) $(regdat_sh
) $< $@
663 # Dependency tracking.
666 ifeq ($(DEPMODE
),depmode
=gcc3
)
667 # Note that we put the dependencies into a .Tpo file, then move them
668 # into place if the compile succeeds. We need this because gcc does
669 # not atomically write the dependency output file.
670 override COMPILE.post
= -c
-o
$@
-MT
$@
-MMD
-MP \
671 -MF
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo
672 override POSTCOMPILE
= @mv
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo \
673 $(@D
)/$(DEPDIR
)/$(basename $(@F
)).Po
675 override COMPILE.pre
= source
='$<' object
='$@' libtool
=no \
676 DEPDIR
=$(DEPDIR
) $(DEPMODE
) $(depcomp
) \
677 $(CXX
) -x c
++ $(CXX_DIALECT
)
678 # depcomp handles atomicity for us, so we don't need a postcompile
680 override POSTCOMPILE
=
683 # A list of all the objects we might care about in this build, for
684 # dependency tracking.
685 all_object_files
= $(OBS
) $(GDBREPLAY_OBS
) $(IPA_OBJS
)
687 # Ensure that generated files are created early. Use order-only
688 # dependencies if available. They require GNU make 3.80 or newer,
689 # and the .VARIABLES variable was introduced at the same time.
691 $(all_object_files
): |
$(generated_files
)
693 $(all_object_files
) : $(generated_files
)
696 # All the .deps files to include.
697 all_deps_files
= $(foreach dep
,$(patsubst %.o
,%.Po
,$(all_object_files
)),\
698 $(dir $(dep
))/$(DEPDIR
)/$(notdir $(dep
)))
701 -include $(all_deps_files
)
703 # Disable implicit make rules.
704 include $(srcdir)/..
/disable-implicit-rules.mk
706 # Do not delete intermediate files (e.g. *-generated.c).
709 # This is the end of "Makefile.in".