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