Remove usage of find_inferior in last_thread_of_process_p
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
CommitLineData
61baf725 1# Copyright (C) 1989-2017 Free Software Foundation, Inc.
c906108c
SS
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
32de4b9d 7# the Free Software Foundation; either version 3 of the License, or
c906108c 8# (at your option) any later version.
1b3f6016 9#
c906108c
SS
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.
1b3f6016 14#
c906108c 15# You should have received a copy of the GNU General Public License
32de4b9d 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
c906108c 17
b593ecca
SM
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
d6e9fb05
JK
21prefix = @prefix@
22exec_prefix = @exec_prefix@
c906108c 23
bd885420
YQ
24host_alias = @host_noncanonical@
25target_alias = @target_noncanonical@
d6e9fb05
JK
26program_transform_name = @program_transform_name@
27bindir = @bindir@
28libdir = @libdir@
c906108c
SS
29tooldir = $(libdir)/$(target_alias)
30
96e946ca 31datarootdir = @datarootdir@
d6e9fb05
JK
32datadir = @datadir@
33mandir = @mandir@
c906108c
SS
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
d6e9fb05 43infodir = @infodir@
085dd6e6 44htmldir = $(prefix)/html
d6e9fb05 45includedir = @includedir@
60d6cfc9 46CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@
c906108c 47
a8347a2a 48SHELL = @SHELL@
de7c3b4a 49EXEEXT = @EXEEXT@
c906108c 50
d6e9fb05
JK
51INSTALL = @INSTALL@
52INSTALL_PROGRAM = @INSTALL_PROGRAM@
53INSTALL_DATA = @INSTALL_DATA@
c9a1864a 54RANLIB = @RANLIB@
c906108c 55
84563040 56CC = @CC@
3bc3d82a 57CXX = @CXX@
8629c02c 58CXX_DIALECT = @CXX_DIALECT@
e1d2394b
MS
59AR = @AR@
60AR_FLAGS = rc
c906108c 61
61c125b9
TT
62# Dependency tracking information.
63DEPMODE = @CCDEPMODE@
64DEPDIR = @DEPDIR@
65depcomp = $(SHELL) $(srcdir)/../depcomp
66
67# Note that these are overridden by GNU make-specific code below if
68# GNU make is used. The overrides implement dependency tracking.
cf0dd6f0 69COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
61c125b9
TT
70COMPILE.post = -c -o $@
71COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
72POSTCOMPILE = @true
73
c906108c
SS
74# Directory containing source files. Don't clean up the spacing,
75# this exact string is matched for by the "configure" script.
d6e9fb05 76srcdir = @srcdir@
8629c02c
SM
77abs_top_srcdir = @abs_top_srcdir@
78abs_srcdir = @abs_srcdir@
d6e9fb05 79VPATH = @srcdir@
c906108c
SS
80
81# It is also possible that you will need to add -I/usr/include/sys to the
1b3f6016 82# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
c906108c
SS
83# is where it should be according to Posix).
84
85# Set this up with gcc if you have gnu ld and the loader will print out
86# line numbers for undefinded refs.
8629c02c
SM
87#CC_LD = g++ -static
88CC_LD = $(CXX) $(CXX_DIALECT)
c906108c
SS
89
90# Where is the "include" directory? Traditionally ../include or ./include
8629c02c 91INCLUDE_DIR = ${srcdir}/../../include
c906108c
SS
92INCLUDE_DEP = $$(INCLUDE_DIR)
93
0b04e523
TT
94LIBIBERTY_BUILDDIR = build-libiberty-gdbserver
95LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
96
0fb4aa4b
PA
97# Where is ust? These will be empty if ust was not available.
98ustlibs = @ustlibs@
99ustinc = @ustinc@
100
c9a1864a 101# gnulib
c971b7fa
PA
102GNULIB_BUILDDIR = build-gnulib-gdbserver
103LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
104INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
ecedbe58 105
c9a1864a
YQ
106# Generated headers in the gnulib directory. These must be listed
107# so that they are generated before other files are compiled.
c971b7fa 108GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
c9a1864a 109
c906108c
SS
110# All the includes used for CFLAGS and for lint.
111# -I. for config files.
7ea81414
DJ
112# -I${srcdir} for our headers.
113# -I$(srcdir)/../regformats for regdef.h.
96d7229d
LM
114#
115# We do not include ../target or ../nat in here because headers
116# in those directories should be included with the subdirectory.
117# e.g.: "target/wait.h".
118#
2aecd87f 119INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../common \
66af0f44 120 -I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
57c4b50b 121 $(INCGNU)
c906108c
SS
122
123# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
124# from the config/ directory.
125GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
126#PROFILE_CFLAGS = -pg
127
d4596a3d
PA
128WARN_CFLAGS = @WARN_CFLAGS@
129WERROR_CFLAGS = @WERROR_CFLAGS@
0729219d 130
d3ce09f5
SS
131WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \
132 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
133
a994041d 134# These are specifically reserved for setting from the command line
c906108c 135# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
84563040 136CFLAGS = @CFLAGS@
a994041d 137CXXFLAGS = @CXXFLAGS@
bffc0964 138CPPFLAGS = @CPPFLAGS@
84563040 139
c906108c 140# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
8629c02c 141INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
bffc0964 142 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
8629c02c
SM
143INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
144INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
c906108c
SS
145
146# LDFLAGS is specifically reserved for setting from the command line
147# when running make.
697f7479 148LDFLAGS = @LDFLAGS@
f6de3c42 149INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
c906108c 150
c906108c
SS
151# All source files that go into linking GDB remote server.
152
b593ecca
SM
153SFILES = \
154 $(srcdir)/debug.c \
155 $(srcdir)/dll.c \
156 $(srcdir)/gdbreplay.c \
157 $(srcdir)/hostio.c \
158 $(srcdir)/hostio-errno.c \
159 $(srcdir)/i387-fp.c \
160 $(srcdir)/inferiors.c \
98fc70d6 161 $(srcdir)/linux-aarch64-low.c \
b593ecca
SM
162 $(srcdir)/linux-arm-low.c \
163 $(srcdir)/linux-bfin-low.c \
164 $(srcdir)/linux-cris-low.c \
165 $(srcdir)/linux-crisv32-low.c \
166 $(srcdir)/linux-ia64-low.c \
167 $(srcdir)/linux-low.c \
7cfbc4a0 168 $(srcdir)/linux-m32r-low.c \
b593ecca
SM
169 $(srcdir)/linux-m68k-low.c \
170 $(srcdir)/linux-mips-low.c \
68f5f838 171 $(srcdir)/linux-nios2-low.c \
b593ecca 172 $(srcdir)/linux-ppc-low.c \
eee84df1 173 $(srcdir)/linux-s390-low.c \
b593ecca
SM
174 $(srcdir)/linux-sh-low.c \
175 $(srcdir)/linux-sparc-low.c \
176 $(srcdir)/linux-tile-low.c \
d0722149 177 $(srcdir)/linux-x86-low.c \
1525d545 178 $(srcdir)/linux-xtensa-low.c \
b593ecca
SM
179 $(srcdir)/mem-break.c \
180 $(srcdir)/proc-service.c \
181 $(srcdir)/proc-service.list \
182 $(srcdir)/regcache.c \
183 $(srcdir)/remote-utils.c \
184 $(srcdir)/server.c \
185 $(srcdir)/symbol.c \
186 $(srcdir)/target.c \
187 $(srcdir)/thread-db.c \
188 $(srcdir)/utils.c \
189 $(srcdir)/win32-arm-low.c \
190 $(srcdir)/win32-i386-low.c \
191 $(srcdir)/win32-low.c \
192 $(srcdir)/wincecompat.c \
193 $(srcdir)/x86-low.c \
194 $(srcdir)/arch/arm.c \
195 $(srcdir)/arch/arm-get-next-pcs.c \
196 $(srcdir)/arch/arm-linux.c \
791c0056 197 $(srcdir)/common/btrace-common.c \
b593ecca
SM
198 $(srcdir)/common/buffer.c \
199 $(srcdir)/common/cleanups.c \
200 $(srcdir)/common/common-debug.c \
201 $(srcdir)/common/common-exceptions.c \
202 $(srcdir)/common/common-regcache.c \
203 $(srcdir)/common/common-utils.c \
204 $(srcdir)/common/errors.c \
1672e0d9 205 $(srcdir)/common/environ.c \
b593ecca
SM
206 $(srcdir)/common/fileio.c \
207 $(srcdir)/common/filestuff.c \
15652511 208 $(srcdir)/common/job-control.c \
7da0a886 209 $(srcdir)/common/gdb_tilde_expand.c \
b593ecca
SM
210 $(srcdir)/common/gdb_vecs.c \
211 $(srcdir)/common/new-op.c \
212 $(srcdir)/common/print-utils.c \
213 $(srcdir)/common/ptid.c \
214 $(srcdir)/common/rsp-low.c \
215 $(srcdir)/common/vec.c \
216 $(srcdir)/common/xml-utils.c \
217 $(srcdir)/nat/linux-btrace.c \
218 $(srcdir)/nat/linux-namespaces.c \
219 $(srcdir)/nat/linux-osdata.c \
220 $(srcdir)/nat/linux-personality.c \
221 $(srcdir)/nat/mips-linux-watch.c \
222 $(srcdir)/nat/ppc-linux.c \
2090129c 223 $(srcdir)/nat/fork-inferior.c \
b593ecca 224 $(srcdir)/target/waitstatus.c
c906108c 225
7ea81414 226DEPFILES = @GDBSERVER_DEPFILES@
c906108c 227
e28b3332
DJ
228LIBOBJS = @LIBOBJS@
229
7ea81414 230SOURCES = $(SFILES)
1b3f6016 231TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
c906108c 232
b593ecca
SM
233OBS = \
234 agent.o \
235 ax.o \
236 btrace-common.o \
237 buffer.o \
238 cleanups.o \
239 common-debug.o \
240 common-exceptions.o \
15652511 241 job-control.o \
b593ecca
SM
242 common-regcache.o \
243 common-utils.o \
244 debug.o \
245 dll.o \
246 errors.o \
1672e0d9 247 environ.o \
b593ecca
SM
248 event-loop.o \
249 fileio.o \
250 filestuff.o \
251 format.o \
7da0a886 252 gdb_tilde_expand.o \
b593ecca
SM
253 gdb_vecs.o \
254 hostio.o \
255 inferiors.o \
256 mem-break.o \
257 new-op.o \
258 notif.o \
259 print-utils.o \
260 ptid.o \
261 regcache.o \
262 remote-utils.o \
263 rsp-low.o \
6d580b63 264 selftest.o \
b593ecca
SM
265 server.o \
266 signals.o \
267 signals-state-save-restore.o \
268 symbol.o \
269 target.o \
270 tdesc.o \
271 tracepoint.o \
272 utils.o \
273 vec.o \
274 version.o \
275 waitstatus.o \
276 xml-utils.o \
277 $(DEPFILES) \
278 $(LIBOBJS) \
279 $(XML_BUILTIN)
280
a417dc56 281GDBREPLAY_OBS = gdbreplay.o version.o
0d62e5e8 282GDBSERVER_LIBS = @GDBSERVER_LIBS@
b80864fb 283XM_CLIBS = @LIBS@
f6528abd 284CDEPS = $(srcdir)/proc-service.list
c906108c 285
fb1e4ffc
DJ
286# XML files to compile in to gdbserver, if any.
287XML_DIR = $(srcdir)/../features
fb1e4ffc
DJ
288XML_FILES = @srv_xmlfiles@
289XML_BUILTIN = @srv_xmlbuiltin@
290
fa593d66
PA
291IPA_DEPFILES = @IPA_DEPFILES@
292extra_libraries = @extra_libraries@
293
0b04e523 294SUBDIRS = $(GNULIB_BUILDDIR) $(LIBIBERTY_BUILDDIR)
c971b7fa
PA
295CLEANDIRS = $(SUBDIRS)
296
297# List of subdirectories in the build tree that must exist.
298# This is used to force build failures in existing trees when
299# a new directory is added.
300# The format here is for the `case' shell command.
0b04e523 301REQUIRED_SUBDIRS = $(GNULIB_BUILDDIR) | $(LIBIBERTY_BUILDDIR)
c971b7fa 302
f474844c
JZ
303FLAGS_TO_PASS = \
304 "prefix=$(prefix)" \
305 "exec_prefix=$(exec_prefix)" \
306 "infodir=$(infodir)" \
307 "datarootdir=$(datarootdir)" \
308 "docdir=$(docdir)" \
309 "htmldir=$(htmldir)" \
310 "pdfdir=$(pdfdir)" \
311 "libdir=$(libdir)" \
312 "mandir=$(mandir)" \
313 "datadir=$(datadir)" \
314 "includedir=$(includedir)" \
315 "against=$(against)" \
316 "DESTDIR=$(DESTDIR)" \
317 "AR=$(AR)" \
318 "AR_FLAGS=$(AR_FLAGS)" \
319 "CC=$(CC)" \
320 "CFLAGS=$(CFLAGS)" \
321 "CXX=$(CXX)" \
322 "CXXFLAGS=$(CXXFLAGS)" \
323 "DLLTOOL=$(DLLTOOL)" \
324 "LDFLAGS=$(LDFLAGS)" \
325 "RANLIB=$(RANLIB)" \
326 "MAKEINFO=$(MAKEINFO)" \
327 "MAKEHTML=$(MAKEHTML)" \
328 "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
329 "INSTALL=$(INSTALL)" \
330 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
331 "INSTALL_DATA=$(INSTALL_DATA)" \
332 "RUNTEST=$(RUNTEST)" \
333 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
334
fd9bb8b8
PA
335# All generated files which can be included by another file.
336generated_files = config.h $(GNULIB_H)
337
fa593d66 338all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
c971b7fa 339 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c
SS
340
341# Traditionally "install" depends on "all". But it may be useful
1b3f6016 342# not to; for example, if the user has made some trivial change to a
c906108c
SS
343# source file and doesn't care about rebuilding or just wants to save the
344# time it takes for make to check that all is up to date.
345# install-only is intended to address that need.
f474844c
JZ
346install: all
347 @$(MAKE) $(FLAGS_TO_PASS) install-only
348
1b3f6016 349install-only:
c906108c
SS
350 n=`echo gdbserver | sed '$(program_transform_name)'`; \
351 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
12ac6819 352 if [ x"$(IPA_DEPFILES)" != x ]; then \
fa593d66
PA
353 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir); \
354 $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
355 fi; \
c938e9b0 356 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
480b27bf 357 $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
0b04e523
TT
358 # Note that we run install and not install-only, as the latter
359 # is not part of GNU standards and in particular not provided
360 # in libiberty.
361 @$(MAKE) $(FLAGS_TO_PASS) DO=install "DODIRS=$(SUBDIRS)" subdir_do
c906108c
SS
362
363uninstall: force
364 n=`echo gdbserver | sed '$(program_transform_name)'`; \
365 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
f1048712 366 rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
c971b7fa 367 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c
SS
368
369installcheck:
370check:
9453113a 371info dvi pdf:
c906108c 372install-info:
9453113a 373install-pdf:
085dd6e6
JM
374html:
375install-html:
c9a1864a 376clean-info: force
c971b7fa 377 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c 378
0b04e523 379gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS} $(LIBGNU) $(LIBIBERTY)
68070c10 380 rm -f gdbserver$(EXEEXT)
3bc3d82a 381 $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver$(EXEEXT) $(OBS) \
0b04e523 382 $(LIBGNU) $(LIBIBERTY) $(GDBSERVER_LIBS) $(XM_CLIBS)
c9a1864a 383
0b04e523
TT
384$(LIBGNU) $(LIBIBERTY) $(GNULIB_H): all-lib
385all-lib: $(GNULIB_BUILDDIR)/Makefile $(LIBIBERTY_BUILDDIR)/Makefile
386 @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS="$(SUBDIRS)" subdir_do
c9a1864a 387.PHONY: all-lib
c906108c 388
0b04e523 389gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU) $(LIBIBERTY)
68070c10 390 rm -f gdbreplay$(EXEEXT)
3bc3d82a 391 $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
0b04e523 392 $(XM_CLIBS) $(LIBGNU) $(LIBIBERTY)
c906108c 393
a206891a
SM
394IPA_OBJS = \
395 ax-ipa.o \
396 common-utils-ipa.o \
397 errors-ipa.o \
398 format-ipa.o \
399 print-utils-ipa.o \
400 regcache-ipa.o \
401 remote-utils-ipa.o \
402 rsp-low-ipa.o \
403 tdesc-ipa.o \
404 tracepoint-ipa.o \
405 utils-ipa.o \
f7000548 406 vec-ipa.o \
ef87c8bb 407 ${IPA_DEPFILES}
fa593d66 408
8629c02c 409IPA_LIB = libinproctrace.so
fa593d66
PA
410
411$(IPA_LIB): $(IPA_OBJS) ${ADD_DEPS} ${CDEPS}
412 rm -f $(IPA_LIB)
6e774b13 413 $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) -Wl,--no-undefined $(INTERNAL_CFLAGS) \
0fb4aa4b 414 $(INTERNAL_LDFLAGS) -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread
fa593d66 415
c906108c
SS
416# Put the proper machine-specific files first, so M-. on a machine
417# specific routine gets the one for the correct machine.
418# The xyzzy stuff below deals with empty DEPFILES
419TAGS: ${TAGFILES}
2c0fc042 420 etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
c906108c
SS
421 `find ${srcdir}/../config -name ${XM_FILE} -print` \
422 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
423 `for i in yzzy ${DEPFILES}; do \
424 if [ x$$i != xyzzy ]; then \
425 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
426 fi; \
427 done` \
428 ${TAGFILES}
429tags: TAGS
430
431clean:
432 rm -f *.o ${ADD_FILES} *~
de7c3b4a 433 rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
fa593d66 434 rm -f $(IPA_LIB)
8fa5b777
SM
435 rm -f *-generated.c
436 rm -f stamp-xml
65dd1e59 437 rm -f $(DEPDIR)/*.Po
60d6cfc9
YQ
438 for i in $(CONFIG_SRC_SUBDIR); do \
439 rm -f $$i/*.o; \
440 rm -f $$i/$(DEPDIR)/*; \
441 done
c971b7fa 442 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
c906108c 443
a59d1c82 444maintainer-clean realclean distclean: clean
c971b7fa
PA
445 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
446 rm -rf $(GNULIB_BUILDDIR)
447 rm -f Makefile config.status config.h stamp-h config.log
448 rm -f Makefile
60d6cfc9
YQ
449 for i in $(CONFIG_SRC_SUBDIR); do \
450 rmdir $$i/$(DEPDIR); \
451 done
c971b7fa
PA
452
453subdir_do: force
454 @for i in $(DODIRS); do \
455 case $$i in \
456 $(REQUIRED_SUBDIRS)) \
457 if [ ! -f ./$$i/Makefile ] ; then \
458 echo "Missing $$i/Makefile" >&2 ; \
459 exit 1 ; \
460 fi ;; \
461 esac ; \
462 if [ -f ./$$i/Makefile ] ; then \
463 if (cd ./$$i; \
464 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
465 else exit 1 ; fi ; \
466 else true ; fi ; \
467 done
c906108c 468
c3a3ccc7
DJ
469config.h: stamp-h ; @true
470stamp-h: config.in config.status
e0e76420 471 CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
0729219d 472
7ea81414 473Makefile: Makefile.in config.status
0729219d 474 CONFIG_HEADERS="" $(SHELL) ./config.status
c906108c 475
c971b7fa
PA
476$(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status
477 @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
c9a1864a
YQ
478 CONFIG_COMMANDS="depfiles" \
479 CONFIG_HEADERS= \
480 CONFIG_LINKS= \
c971b7fa 481 $(SHELL) config.status
c9a1864a 482
270c9937 483config.status: configure configure.srv $(srcdir)/../../bfd/development.sh
d6e9fb05
JK
484 $(SHELL) ./config.status --recheck
485
c9a1864a
YQ
486# automatic rebuilding in automake-generated Makefiles requires
487# this rule in the toplevel Makefile, which, with GNU make, causes
488# the desired updates through the implicit regeneration of the Makefile
489# and all of its prerequisites.
490am--refresh:
491 @:
492
c906108c
SS
493force:
494
8fa5b777 495version-generated.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh
01208463 496 $(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \
8fa5b777 497 $(host_alias) $(target_alias) $@
c906108c 498
8fa5b777 499xml-builtin-generated.c: stamp-xml; @true
fb1e4ffc
DJ
500stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
501 rm -f xml-builtin.tmp
502 $(SHELL) $(XML_DIR)/feature_to_c.sh xml-builtin.tmp $(XML_FILES)
8fa5b777 503 $(SHELL) $(srcdir)/../../move-if-change xml-builtin.tmp xml-builtin-generated.c
fb1e4ffc
DJ
504 echo stamp > stamp-xml
505
9b4b61c8 506.PRECIOUS: xml-builtin.c
fb1e4ffc 507
c906108c
SS
508# GNU Make has an annoying habit of putting *all* the Makefile variables
509# into the environment, unless you include this target as a circumvention.
510# Rumor is that this will be fixed (and this target can be removed)
511# in GNU Make 4.0.
512.NOEXPORT:
513
514# GNU Make 3.63 has a different problem: it keeps tacking command line
515# overrides onto the definition of $(MAKE). This variable setting
516# will remove them.
8629c02c 517MAKEOVERRIDES =
c906108c 518
0c74b2a7 519regdat_sh = $(srcdir)/../regformats/regdat.sh
7a60ad40 520
0fb4aa4b
PA
521UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
522
fa593d66
PA
523# Note, we only build the IPA if -fvisibility=hidden is supported in
524# the first place.
bffc0964 525IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
3ba6ad0f 526 -fPIC -DIN_PROCESS_AGENT \
fa593d66
PA
527 -fvisibility=hidden
528
61c125b9
TT
529IPAGENT_COMPILE = $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
530
1a01e7c6
SM
531# Rules for special cases.
532
61c125b9
TT
533ax-ipa.o: ax.c
534 $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
535 $(POSTCOMPILE)
61c125b9
TT
536
537ax.o: ax.c
538 $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
539 $(POSTCOMPILE)
540
60d6cfc9 541arch/%.o: ../arch/%.c
b4570e4b
YQ
542 $(COMPILE) $<
543 $(POSTCOMPILE)
544
a8ebe3d5
SM
545# Rules for objects that go in the in-process agent.
546
8fa5b777
SM
547%-ipa.o: %-generated.c
548 $(IPAGENT_COMPILE) $<
549 $(POSTCOMPILE)
550
a8ebe3d5
SM
551%-ipa.o: %.c
552 $(IPAGENT_COMPILE) $<
553 $(POSTCOMPILE)
554
1a01e7c6
SM
555# Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
556# Therefore, this one needs to be before "%.o: %.c" for it to be considered for
557# files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c.
558#
559# Later versions of GNU Make choose the rule with the shortest stem, so it would
560# work in any order.
561
562%-ipa.o: %-ipa.c
563 $(IPAGENT_COMPILE) $<
564 $(POSTCOMPILE)
565
36bc18a8
SM
566%-ipa.o: ../common/%.c
567 $(IPAGENT_COMPILE) $<
568 $(POSTCOMPILE)
569
a602f924 570arch/%-ipa.o: ../arch/%.c
5f035c07
YQ
571 $(IPAGENT_COMPILE) $<
572 $(POSTCOMPILE)
573
50cfacb7 574# Rules for objects that go in the gdbserver binary.
787749ea 575
8fa5b777
SM
576%.o: %-generated.c
577 $(COMPILE) $<
578 $(POSTCOMPILE)
579
50cfacb7 580%.o: %.c
21122961
SM
581 $(COMPILE) $<
582 $(POSTCOMPILE)
583
6bda016b
SM
584%.o: ../common/%.c
585 $(COMPILE) $<
586 $(POSTCOMPILE)
587
c5a22423
SM
588%.o: ../nat/%.c
589 $(COMPILE) $<
590 $(POSTCOMPILE)
591
21122961
SM
592%.o: ../target/%.c
593 $(COMPILE) $<
594 $(POSTCOMPILE)
595
8fa5b777
SM
596# Rules for register format descriptions. Suffix destination files with
597# -generated to identify and clean them easily.
c362e621 598
8fa5b777 599%-generated.c: ../regformats/%.dat | $(regdat_sh)
c362e621
SM
600 $(SHELL) $(regdat_sh) $< $@
601
8fa5b777 602%-generated.c: ../regformats/arm/%.dat | $(regdat_sh)
c362e621
SM
603 $(SHELL) $(regdat_sh) $< $@
604
8fa5b777 605%-generated.c: ../regformats/i386/%.dat | $(regdat_sh)
c362e621
SM
606 $(SHELL) $(regdat_sh) $< $@
607
8fa5b777 608%-generated.c: ../regformats/rs6000/%.dat | $(regdat_sh)
c362e621 609 $(SHELL) $(regdat_sh) $< $@
61c125b9
TT
610
611#
3b165252 612# Dependency tracking.
61c125b9
TT
613#
614
3b165252 615ifeq ($(DEPMODE),depmode=gcc3)
61c125b9
TT
616# Note that we put the dependencies into a .Tpo file, then move them
617# into place if the compile succeeds. We need this because gcc does
618# not atomically write the dependency output file.
3b165252 619override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
60d6cfc9
YQ
620 -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
621override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
622 $(@D)/$(DEPDIR)/$(basename $(@F)).Po
3b165252
SM
623else
624override COMPILE.pre = source='$<' object='$@' libtool=no \
60d6cfc9
YQ
625 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
626 $(CXX) -x c++ $(CXX_DIALECT)
61c125b9
TT
627# depcomp handles atomicity for us, so we don't need a postcompile
628# step.
3b165252
SM
629override POSTCOMPILE =
630endif
61c125b9
TT
631
632# A list of all the objects we might care about in this build, for
633# dependency tracking.
1798301e 634all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
61c125b9
TT
635
636# Ensure that generated files are created early. Use order-only
637# dependencies if available. They require GNU make 3.80 or newer,
638# and the .VARIABLES variable was introduced at the same time.
3b165252
SM
639ifdef .VARIABLES
640$(all_object_files): | $(generated_files)
641else
61c125b9 642$(all_object_files) : $(generated_files)
3b165252 643endif
61c125b9
TT
644
645# Dependencies.
3b165252 646-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
61c125b9 647
ad02e4fe
SM
648# Disable implicit make rules.
649include $(srcdir)/../disable-implicit-rules.mk
650
50a421ac
SM
651# Do not delete intermediate files (e.g. *-generated.c).
652.SECONDARY:
653
c906108c 654# This is the end of "Makefile.in".
This page took 2.084659 seconds and 4 git commands to generate.