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@
48 install_sh
= @install_sh@
54 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
55 INSTALL_STRIP_PROGRAM
= @INSTALL_STRIP_PROGRAM@
56 INSTALL_DATA
= @INSTALL_DATA@
61 CXX_DIALECT
= @CXX_DIALECT@
66 # Dependency tracking information.
69 depcomp
= $(SHELL
) $(srcdir)/..
/depcomp
71 # Directory containing source files. Don't clean up the spacing,
72 # this exact string is matched for by the "configure" script.
74 abs_top_srcdir
= @abs_top_srcdir@
75 abs_srcdir
= @abs_srcdir@
78 include $(srcdir)/..
/gdb
/silent-rules.mk
80 # Note that these are overridden by GNU make-specific code below if
81 # GNU make is used. The overrides implement dependency tracking.
82 COMPILE.pre
= $(CXX
) -x c
++ $(CXX_DIALECT
)
83 COMPILE.post
= -c
-o
$@
84 COMPILE
= $(ECHO_CXX
) $(COMPILE.pre
) $(INTERNAL_CFLAGS
) $(COMPILE.post
)
87 # It is also possible that you will need to add -I/usr/include/sys to the
88 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
89 # is where it should be according to Posix).
91 # Set this up with gcc if you have gnu ld and the loader will print out
92 # line numbers for undefinded refs.
94 CC_LD
= $(CXX
) $(CXX_DIALECT
)
96 # Where is the "include" directory? Traditionally ../include or ./include
97 INCLUDE_DIR
= ${srcdir}/..
/include
98 INCLUDE_DEP
= $$(INCLUDE_DIR
)
100 LIBIBERTY_BUILDDIR
= build-libiberty-gdbserver
101 LIBIBERTY
= $(LIBIBERTY_BUILDDIR
)/libiberty.a
103 # Where is ust? These will be empty if ust was not available.
108 GNULIB_BUILDDIR
= build-gnulib-gdbserver
109 LIBGNU
= $(GNULIB_BUILDDIR
)/import
/libgnu.a
110 INCGNU
= -I
$(srcdir)/..
/gnulib
/import
-I
$(GNULIB_BUILDDIR
)/import
112 # Generated headers in the gnulib directory. These must be listed
113 # so that they are generated before other files are compiled.
114 GNULIB_H
= $(GNULIB_BUILDDIR
)/import
/string.h @GNULIB_STDINT_H@
116 INCSUPPORT
= -I
$(srcdir)/..
-I..
118 # All the includes used for CFLAGS and for lint.
119 # -I. for config files.
120 # -I${srcdir} for our headers.
121 # -I$(srcdir)/../gdb/regformats for regdef.h.
123 # We do not include ../target or ../nat in here because headers
124 # in those directories should be included with the subdirectory.
125 # e.g.: "target/wait.h".
127 INCLUDE_CFLAGS
= -I.
-I
${srcdir} \
128 -I
$(srcdir)/..
/gdb
/regformats
-I
$(srcdir)/..
-I
$(INCLUDE_DIR
) \
129 -I
$(srcdir)/..
/gdb
$(INCGNU
) $(INCSUPPORT
)
131 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
132 # from the config/ directory.
133 GLOBAL_CFLAGS
= ${MT_CFLAGS} ${MH_CFLAGS}
134 #PROFILE_CFLAGS = -pg
136 WARN_CFLAGS
= @WARN_CFLAGS@
137 WERROR_CFLAGS
= @WERROR_CFLAGS@
139 WARN_CFLAGS_NO_FORMAT
= `echo " $(WARN_CFLAGS) " \
140 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
142 # These are specifically reserved for setting from the command line
143 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
145 CXXFLAGS
= @CXXFLAGS@
146 CPPFLAGS
= @CPPFLAGS@
148 PTHREAD_CFLAGS
= @PTHREAD_CFLAGS@
149 PTHREAD_LIBS
= @PTHREAD_LIBS@
151 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
152 INTERNAL_CFLAGS_BASE
= ${CXXFLAGS} ${GLOBAL_CFLAGS} \
153 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS
)
154 INTERNAL_WARN_CFLAGS
= ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS
)
155 INTERNAL_CFLAGS
= ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS
) -DGDBSERVER
157 # LDFLAGS is specifically reserved for setting from the command line
160 INTERNAL_LDFLAGS
= $(LDFLAGS
) @RDYNAMIC@
162 # All source files that go into linking GDB remote server.
167 $(srcdir)/gdbreplay.c \
169 $(srcdir)/hostio-errno.c \
170 $(srcdir)/i387-fp.c \
171 $(srcdir)/inferiors.c \
172 $(srcdir)/linux-aarch64-low.c \
173 $(srcdir)/linux-arm-low.c \
174 $(srcdir)/linux-bfin-low.c \
175 $(srcdir)/linux-cris-low.c \
176 $(srcdir)/linux-crisv32-low.c \
177 $(srcdir)/linux-ia64-low.c \
178 $(srcdir)/linux-low.c \
179 $(srcdir)/linux-m32r-low.c \
180 $(srcdir)/linux-m68k-low.c \
181 $(srcdir)/linux-mips-low.c \
182 $(srcdir)/linux-nios2-low.c \
183 $(srcdir)/linux-ppc-low.c \
184 $(srcdir)/linux-s390-low.c \
185 $(srcdir)/linux-sh-low.c \
186 $(srcdir)/linux-sparc-low.c \
187 $(srcdir)/linux-tile-low.c \
188 $(srcdir)/linux-x86-low.c \
189 $(srcdir)/linux-xtensa-low.c \
190 $(srcdir)/mem-break.c \
191 $(srcdir)/proc-service.c \
192 $(srcdir)/proc-service.list \
193 $(srcdir)/regcache.c \
194 $(srcdir)/remote-utils.c \
198 $(srcdir)/thread-db.c \
200 $(srcdir)/win32-arm-low.c \
201 $(srcdir)/win32-i386-low.c \
202 $(srcdir)/win32-low.c \
203 $(srcdir)/wincecompat.c \
204 $(srcdir)/x86-low.c \
205 $(srcdir)/..
/gdb
/alloc.c \
206 $(srcdir)/..
/gdb
/arch
/arm.c \
207 $(srcdir)/..
/gdb
/arch
/arm-get-next-pcs.c \
208 $(srcdir)/..
/gdb
/arch
/arm-linux.c \
209 $(srcdir)/..
/gdb
/arch
/ppc-linux-common.c \
210 $(srcdir)/..
/gdbsupport
/btrace-common.
cc \
211 $(srcdir)/..
/gdbsupport
/buffer.
cc \
212 $(srcdir)/..
/gdbsupport
/cleanups.
cc \
213 $(srcdir)/..
/gdbsupport
/common-debug.
cc \
214 $(srcdir)/..
/gdbsupport
/common-exceptions.
cc \
215 $(srcdir)/..
/gdbsupport
/common-inferior.
cc \
216 $(srcdir)/..
/gdbsupport
/common-regcache.
cc \
217 $(srcdir)/..
/gdbsupport
/common-utils.
cc \
218 $(srcdir)/..
/gdbsupport
/errors.
cc \
219 $(srcdir)/..
/gdbsupport
/environ.
cc \
220 $(srcdir)/..
/gdbsupport
/fileio.
cc \
221 $(srcdir)/..
/gdbsupport
/filestuff.
cc \
222 $(srcdir)/..
/gdbsupport
/job-control.
cc \
223 $(srcdir)/..
/gdbsupport
/gdb-dlfcn.
cc \
224 $(srcdir)/..
/gdbsupport
/gdb_tilde_expand.
cc \
225 $(srcdir)/..
/gdbsupport
/gdb_vecs.
cc \
226 $(srcdir)/..
/gdbsupport
/gdb_wait.
cc \
227 $(srcdir)/..
/gdbsupport
/netstuff.
cc \
228 $(srcdir)/..
/gdbsupport
/new-op.
cc \
229 $(srcdir)/..
/gdbsupport
/pathstuff.
cc \
230 $(srcdir)/..
/gdbsupport
/print-utils.
cc \
231 $(srcdir)/..
/gdbsupport
/ptid.
cc \
232 $(srcdir)/..
/gdbsupport
/rsp-low.
cc \
233 $(srcdir)/..
/gdbsupport
/safe-strerror.
cc \
234 $(srcdir)/..
/gdbsupport
/tdesc.
cc \
235 $(srcdir)/..
/gdbsupport
/xml-utils.
cc \
236 $(srcdir)/..
/gdb
/nat
/aarch64-sve-linux-ptrace.c \
237 $(srcdir)/..
/gdb
/nat
/linux-btrace.c \
238 $(srcdir)/..
/gdb
/nat
/linux-namespaces.c \
239 $(srcdir)/..
/gdb
/nat
/linux-osdata.c \
240 $(srcdir)/..
/gdb
/nat
/linux-personality.c \
241 $(srcdir)/..
/gdb
/nat
/mips-linux-watch.c \
242 $(srcdir)/..
/gdb
/nat
/ppc-linux.c \
243 $(srcdir)/..
/gdb
/nat
/fork-inferior.c \
244 $(srcdir)/..
/gdb
/target
/waitstatus.c
246 DEPFILES
= @GDBSERVER_DEPFILES@
251 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
257 gdbsupport
/btrace-common.o \
258 gdbsupport
/buffer.o \
259 gdbsupport
/cleanups.o \
260 gdbsupport
/common-debug.o \
261 gdbsupport
/common-exceptions.o \
262 gdbsupport
/common-inferior.o \
263 gdbsupport
/job-control.o \
264 gdbsupport
/common-regcache.o \
265 gdbsupport
/common-utils.o \
266 gdbsupport
/errors.o \
267 gdbsupport
/environ.o \
268 gdbsupport
/fileio.o \
269 gdbsupport
/filestuff.o \
270 gdbsupport
/format.o \
271 gdbsupport
/gdb-dlfcn.o \
272 gdbsupport
/gdb_tilde_expand.o \
273 gdbsupport
/gdb_vecs.o \
274 gdbsupport
/gdb_wait.o \
275 gdbsupport
/netstuff.o \
276 gdbsupport
/new-op.o \
277 gdbsupport
/pathstuff.o \
278 gdbsupport
/print-utils.o \
280 gdbsupport
/rsp-low.o \
281 gdbsupport
/safe-strerror.o \
282 gdbsupport
/signals.o \
283 gdbsupport
/signals-state-save-restore.o \
285 gdbsupport
/xml-utils.o \
302 target
/waitstatus.o \
308 gdbsupport
/cleanups.o \
309 gdbsupport
/common-exceptions.o \
310 gdbsupport
/common-utils.o \
311 gdbsupport
/rsp-low.o \
312 gdbsupport
/errors.o \
313 gdbsupport
/netstuff.o \
314 gdbsupport
/print-utils.o \
315 gdbsupport
/safe-strerror.o \
320 GDBSERVER_LIBS
= @GDBSERVER_LIBS@
$(PTHREAD_LIBS
)
322 CDEPS
= $(srcdir)/proc-service.list
324 # XML files to compile in to gdbserver, if any.
325 XML_DIR
= $(srcdir)/..
/gdb
/features
326 XML_FILES
= @srv_xmlfiles@
327 XML_BUILTIN
= @srv_xmlbuiltin@
329 IPA_DEPFILES
= @IPA_DEPFILES@
330 extra_libraries
= @extra_libraries@
332 SUBDIRS
= $(GNULIB_BUILDDIR
) $(LIBIBERTY_BUILDDIR
)
333 CLEANDIRS
= $(SUBDIRS
)
335 # List of subdirectories in the build tree that must exist.
336 # This is used to force build failures in existing trees when
337 # a new directory is added.
338 # The format here is for the `case' shell command.
339 REQUIRED_SUBDIRS
= $(GNULIB_BUILDDIR
) |
$(LIBIBERTY_BUILDDIR
)
343 "exec_prefix=$(exec_prefix)" \
344 "infodir=$(infodir)" \
345 "datarootdir=$(datarootdir)" \
347 "htmldir=$(htmldir)" \
351 "datadir=$(datadir)" \
352 "includedir=$(includedir)" \
353 "against=$(against)" \
354 "DESTDIR=$(DESTDIR)" \
356 "AR_FLAGS=$(AR_FLAGS)" \
360 "CXXFLAGS=$(CXXFLAGS)" \
361 "DLLTOOL=$(DLLTOOL)" \
362 "LDFLAGS=$(LDFLAGS)" \
364 "MAKEINFO=$(MAKEINFO)" \
365 "MAKEHTML=$(MAKEHTML)" \
366 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
367 "INSTALL=$(INSTALL)" \
368 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
369 "INSTALL_DATA=$(INSTALL_DATA)" \
370 "RUNTEST=$(RUNTEST)" \
371 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
373 # All generated files which can be included by another file.
374 generated_files
= config.h
$(GNULIB_H
)
376 all: gdbserver
$(EXEEXT
) gdbreplay
$(EXEEXT
) $(extra_libraries
)
377 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
379 # Traditionally "install" depends on "all". But it may be useful
380 # not to; for example, if the user has made some trivial change to a
381 # source file and doesn't care about rebuilding or just wants to save the
382 # time it takes for make to check that all is up to date.
383 # install-only is intended to address that need.
385 @
$(MAKE
) $(FLAGS_TO_PASS
) install-only
388 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
389 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
390 if
[ x
"$(IPA_DEPFILES)" != x
]; then \
391 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(libdir); \
392 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) $(IPA_LIB
) $(DESTDIR
)$(libdir)/$(IPA_LIB
); \
394 $(SHELL
) $(srcdir)/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
395 $(INSTALL_PROGRAM_ENV
) $(INSTALL_PROGRAM
) gdbserver
$(EXEEXT
) $(DESTDIR
)$(bindir)/$$n$(EXEEXT
)
396 # Note that we run install and not install-only, as the latter
397 # is not part of GNU standards and in particular not provided
399 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=install "DODIRS=$(SUBDIRS)" subdir_do
402 $(MAKE
) $(FLAGS_TO_PASS
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" \
403 install_sh_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG
=-s \
404 `test -z '$(STRIP)' || \
405 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
408 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
409 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
410 rm -f
$(DESTDIR
)/$(bindir)/$$n$(EXEEXT
) $(DESTDIR
)$(man1dir)/$$n.1
411 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
421 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
423 gdbserver
$(EXEEXT
): $(sort $(OBS
)) ${CDEPS} $(LIBGNU
) $(LIBIBERTY
)
424 $(SILENCE
) rm -f gdbserver
$(EXEEXT
)
425 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) \
426 -o gdbserver
$(EXEEXT
) $(OBS
) $(LIBGNU
) $(LIBIBERTY
) \
427 $(GDBSERVER_LIBS
) $(XM_CLIBS
)
429 $(LIBGNU
) $(LIBIBERTY
) $(GNULIB_H
): all-lib
430 all-lib
: $(GNULIB_BUILDDIR
)/Makefile
$(LIBIBERTY_BUILDDIR
)/Makefile
431 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=all DODIRS
="$(SUBDIRS)" subdir_do
434 gdbreplay
$(EXEEXT
): $(sort $(GDBREPLAY_OBS
)) $(LIBGNU
) $(LIBIBERTY
)
435 $(SILENCE
) rm -f gdbreplay
$(EXEEXT
)
436 $(ECHO_CXXLD
) $(CC_LD
) $(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) \
437 -o gdbreplay
$(EXEEXT
) $(GDBREPLAY_OBS
) $(XM_CLIBS
) $(LIBGNU
) \
443 gdbsupport
/common-utils-ipa.o \
444 gdbsupport
/errors-ipa.o \
445 gdbsupport
/format-ipa.o \
446 gdbsupport
/print-utils-ipa.o \
447 gdbsupport
/rsp-low-ipa.o \
448 gdbsupport
/safe-strerror-ipa.o \
449 gdbsupport
/tdesc-ipa.o \
457 IPA_LIB
= libinproctrace.so
459 $(IPA_LIB
): $(sort $(IPA_OBJS
)) ${CDEPS}
460 $(SILENCE
) rm -f
$(IPA_LIB
)
461 $(ECHO_CXXLD
) $(CC_LD
) -shared
-fPIC
-Wl
,--soname
=$(IPA_LIB
) \
462 -Wl
,--no-undefined
$(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) \
463 -o
$(IPA_LIB
) ${IPA_OBJS} -ldl
-pthread
465 # Put the proper machine-specific files first, so M-. on a machine
466 # specific routine gets the one for the correct machine.
467 # The xyzzy stuff below deals with empty DEPFILES
470 `for i in yzzy ${DEPFILES}; do \
471 if [ x$$i != xyzzy ]; then \
472 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' \
473 -e 's,/\(arch\|nat\|target\)/,/../\1/,' \
474 -e 's,/\(gdbsupport\)/,/../../\1/,'; \
481 rm -f
*.o
${ADD_FILES} *~
482 rm -f gdbserver
$(EXEEXT
) gdbreplay
$(EXEEXT
) core make.log
487 for i in
$(CONFIG_SRC_SUBDIR
); do \
489 rm -f
$$i/$(DEPDIR
)/*; \
491 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
493 maintainer-clean
realclean distclean: clean
494 @
$(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
495 rm -rf
$(GNULIB_BUILDDIR
)
496 rm -f Makefile config.status config.h stamp-h config.log
498 for i in
$(CONFIG_SRC_SUBDIR
); do \
499 rmdir
$$i/$(DEPDIR
); \
503 @for i in
$(DODIRS
); do \
505 $(REQUIRED_SUBDIRS
)) \
506 if
[ ! -f .
/$$i/Makefile
] ; then \
507 echo
"Missing $$i/Makefile" >&2 ; \
511 if
[ -f .
/$$i/Makefile
] ; then \
513 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
518 config.h
: stamp-h
; @true
519 stamp-h
: config.in config.status
520 $(SHELL
) .
/config.status config.h
522 Makefile
: Makefile.in config.status
523 $(SHELL
) .
/config.status
$@
525 $(GNULIB_BUILDDIR
)/Makefile
: $(srcdir)/..
/gnulib
/Makefile.in config.status
526 @cd
$(GNULIB_BUILDDIR
); CONFIG_FILES
="Makefile" \
527 CONFIG_COMMANDS
="depfiles" \
530 $(SHELL
) config.status
532 config.status
: configure configure.srv
$(srcdir)/..
/bfd
/development.sh
533 $(SHELL
) .
/config.status
--recheck
535 # automatic rebuilding in automake-generated Makefiles requires
536 # this rule in the toplevel Makefile, which, with GNU make, causes
537 # the desired updates through the implicit regeneration of the Makefile
538 # and all of its prerequisites.
544 version-generated.c
: Makefile
$(srcdir)/..
/gdb
/version.in
$(srcdir)/..
/bfd
/version.h
$(srcdir)/..
/gdbsupport
/create-version.sh
545 $(ECHO_GEN
) $(SHELL
) $(srcdir)/..
/gdbsupport
/create-version.sh
$(srcdir)/..
/gdb \
546 $(host_alias
) $(target_alias
) $@
548 xml-builtin-generated.c
: stamp-xml
; @true
549 stamp-xml
: $(XML_DIR
)/feature_to_c.sh Makefile
$(XML_FILES
)
550 $(SILENCE
) rm -f xml-builtin.tmp
551 $(ECHO_GEN_XML_BUILTIN_GENERATED
) $(SHELL
) $(XML_DIR
)/feature_to_c.sh \
552 xml-builtin.tmp
$(XML_FILES
)
553 $(SILENCE
) $(SHELL
) $(srcdir)/..
/move-if-change xml-builtin.tmp xml-builtin-generated.c
554 $(SILENCE
) echo stamp
> stamp-xml
556 .PRECIOUS
: xml-builtin.c
558 # GNU Make has an annoying habit of putting *all* the Makefile variables
559 # into the environment, unless you include this target as a circumvention.
560 # Rumor is that this will be fixed (and this target can be removed)
564 # GNU Make 3.63 has a different problem: it keeps tacking command line
565 # overrides onto the definition of $(MAKE). This variable setting
569 regdat_sh
= $(srcdir)/..
/gdb
/regformats
/regdat.sh
571 UST_CFLAGS
= $(ustinc
) -DCONFIG_UST_GDB_INTEGRATION
573 # Undo gnulib replacements for the IPA shared library build.
574 # The gnulib headers are still needed, but gnulib is not linked
575 # into the IPA lib so replacement apis don't work.
576 UNDO_GNULIB_CFLAGS
= -Drpl_strerror_r
=strerror_r
578 # Note, we only build the IPA if -fvisibility=hidden is supported in
580 IPAGENT_CFLAGS
= $(INTERNAL_CFLAGS
) $(UST_CFLAGS
) \
581 $(UNDO_GNULIB_CFLAGS
) \
582 -fPIC
-DIN_PROCESS_AGENT \
585 IPAGENT_COMPILE
= $(ECHO_CXX
) $(COMPILE.pre
) $(IPAGENT_CFLAGS
) $(COMPILE.post
)
587 # Rules for special cases.
590 $(IPAGENT_COMPILE
) $(WARN_CFLAGS_NO_FORMAT
) $<
594 $(COMPILE
) $(WARN_CFLAGS_NO_FORMAT
) $<
597 # Rules for objects that go in the in-process agent.
599 arch
/%-ipa.o
: ..
/gdb
/arch
/%.c
600 $(IPAGENT_COMPILE
) $<
603 gdbsupport
/%-ipa.o
: ..
/gdbsupport
/%.
cc
604 $(IPAGENT_COMPILE
) $<
607 %-ipa.o
: %-generated.c
608 $(IPAGENT_COMPILE
) $<
612 $(IPAGENT_COMPILE
) $<
616 $(IPAGENT_COMPILE
) $<
619 # Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
620 # Therefore, this one needs to be before "%.o: %.c" for it to be considered for
621 # files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c.
623 # Later versions of GNU Make choose the rule with the shortest stem, so it would
627 $(IPAGENT_COMPILE
) $<
630 # Rules for objects that go in the gdbserver binary.
632 arch
/%.o
: ..
/gdb
/arch
/%.c
636 gdbsupport
/%.o
: ..
/gdbsupport
/%.
cc
648 nat
/%.o
: ..
/gdb
/nat
/%.c
652 target
/%.o
: ..
/gdb
/target
/%.c
660 # Rules for register format descriptions. Suffix destination files with
661 # -generated to identify and clean them easily.
663 %-generated.c
: ..
/gdb
/regformats
/%.dat
$(regdat_sh
)
664 $(ECHO_REGDAT
) $(SHELL
) $(regdat_sh
) $< $@
666 %-generated.c
: ..
/gdb
/regformats
/arm
/%.dat
$(regdat_sh
)
667 $(ECHO_REGDAT
) $(SHELL
) $(regdat_sh
) $< $@
669 %-generated.c
: ..
/gdb
/regformats
/rs6000
/%.dat
$(regdat_sh
)
670 $(ECHO_REGDAT
) $(SHELL
) $(regdat_sh
) $< $@
673 # Dependency tracking.
676 ifeq ($(DEPMODE
),depmode
=gcc3
)
677 # Note that we put the dependencies into a .Tpo file, then move them
678 # into place if the compile succeeds. We need this because gcc does
679 # not atomically write the dependency output file.
680 override COMPILE.post
= -c
-o
$@
-MT
$@
-MMD
-MP \
681 -MF
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo
682 override POSTCOMPILE
= @mv
$(@D
)/$(DEPDIR
)/$(basename $(@F
)).Tpo \
683 $(@D
)/$(DEPDIR
)/$(basename $(@F
)).Po
685 override COMPILE.pre
= source
='$<' object
='$@' libtool
=no \
686 DEPDIR
=$(DEPDIR
) $(DEPMODE
) $(depcomp
) \
687 $(CXX
) -x c
++ $(CXX_DIALECT
)
688 # depcomp handles atomicity for us, so we don't need a postcompile
690 override POSTCOMPILE
=
693 # A list of all the objects we might care about in this build, for
694 # dependency tracking.
695 all_object_files
= $(OBS
) $(GDBREPLAY_OBS
) $(IPA_OBJS
)
697 # Ensure that generated files are created early. Use order-only
698 # dependencies if available. They require GNU make 3.80 or newer,
699 # and the .VARIABLES variable was introduced at the same time.
701 $(all_object_files
): |
$(generated_files
)
703 $(all_object_files
) : $(generated_files
)
706 # All the .deps files to include.
707 all_deps_files
= $(foreach dep
,$(patsubst %.o
,%.Po
,$(all_object_files
)),\
708 $(dir $(dep
))/$(DEPDIR
)/$(notdir $(dep
)))
711 -include $(all_deps_files
)
713 # Disable implicit make rules.
714 include $(srcdir)/..
/gdb
/disable-implicit-rules.mk
716 # Do not delete intermediate files (e.g. *-generated.c).
719 # This is the end of "Makefile.in".