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