gdbserver: Suffix generated C files with -generated
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
... / ...
CommitLineData
1# Copyright (C) 1989-2017 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@
46
47SHELL = @SHELL@
48EXEEXT = @EXEEXT@
49
50INSTALL = @INSTALL@
51INSTALL_PROGRAM = @INSTALL_PROGRAM@
52INSTALL_DATA = @INSTALL_DATA@
53RANLIB = @RANLIB@
54
55CC = @CC@
56CXX = @CXX@
57CXX_DIALECT = @CXX_DIALECT@
58AR = @AR@
59AR_FLAGS = rc
60
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.
68COMPILE.pre = $(CXX) $(CXX_DIALECT)
69COMPILE.post = -c -o $@
70COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
71POSTCOMPILE = @true
72
73# Directory containing source files. Don't clean up the spacing,
74# this exact string is matched for by the "configure" script.
75srcdir = @srcdir@
76abs_top_srcdir = @abs_top_srcdir@
77abs_srcdir = @abs_srcdir@
78VPATH = @srcdir@
79
80# It is also possible that you will need to add -I/usr/include/sys to the
81# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
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.
86#CC_LD = g++ -static
87CC_LD = $(CXX) $(CXX_DIALECT)
88
89# Where is the "include" directory? Traditionally ../include or ./include
90INCLUDE_DIR = ${srcdir}/../../include
91INCLUDE_DEP = $$(INCLUDE_DIR)
92
93LIBIBERTY_BUILDDIR = build-libiberty-gdbserver
94LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a
95
96# Where is ust? These will be empty if ust was not available.
97ustlibs = @ustlibs@
98ustinc = @ustinc@
99
100# gnulib
101GNULIB_BUILDDIR = build-gnulib-gdbserver
102LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
103INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
104
105# Generated headers in the gnulib directory. These must be listed
106# so that they are generated before other files are compiled.
107GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
108
109# All the includes used for CFLAGS and for lint.
110# -I. for config files.
111# -I${srcdir} for our headers.
112# -I$(srcdir)/../regformats for regdef.h.
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#
118INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../common \
119 -I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
120 $(INCGNU)
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
127WARN_CFLAGS = @WARN_CFLAGS@
128WERROR_CFLAGS = @WERROR_CFLAGS@
129
130WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \
131 | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
132
133# These are specifically reserved for setting from the command line
134# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
135CFLAGS = @CFLAGS@
136CXXFLAGS = @CXXFLAGS@
137CPPFLAGS = @CPPFLAGS@
138
139# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
140INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
141 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
142INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
143INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
144
145# LDFLAGS is specifically reserved for setting from the command line
146# when running make.
147LDFLAGS = @LDFLAGS@
148INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
149
150# All source files that go into linking GDB remote server.
151
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 \
160 $(srcdir)/linux-aarch64-low.c \
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 \
167 $(srcdir)/linux-m32r-low.c \
168 $(srcdir)/linux-m68k-low.c \
169 $(srcdir)/linux-mips-low.c \
170 $(srcdir)/linux-nios2-low.c \
171 $(srcdir)/linux-ppc-low.c \
172 $(srcdir)/linux-s390-low.c \
173 $(srcdir)/linux-sh-low.c \
174 $(srcdir)/linux-sparc-low.c \
175 $(srcdir)/linux-tile-low.c \
176 $(srcdir)/linux-x86-low.c \
177 $(srcdir)/linux-xtensa-low.c \
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 \
196 $(srcdir)/common/btrace-common.c \
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 \
204 $(srcdir)/common/environ.c \
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
221
222DEPFILES = @GDBSERVER_DEPFILES@
223
224LIBOBJS = @LIBOBJS@
225
226SOURCES = $(SFILES)
227TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
228
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 \
242 environ.o \
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
274GDBREPLAY_OBS = gdbreplay.o version.o
275GDBSERVER_LIBS = @GDBSERVER_LIBS@
276XM_CLIBS = @LIBS@
277CDEPS = $(srcdir)/proc-service.list
278
279# XML files to compile in to gdbserver, if any.
280XML_DIR = $(srcdir)/../features
281XML_FILES = @srv_xmlfiles@
282XML_BUILTIN = @srv_xmlbuiltin@
283
284IPA_DEPFILES = @IPA_DEPFILES@
285extra_libraries = @extra_libraries@
286
287SUBDIRS = $(GNULIB_BUILDDIR) $(LIBIBERTY_BUILDDIR)
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.
294REQUIRED_SUBDIRS = $(GNULIB_BUILDDIR) | $(LIBIBERTY_BUILDDIR)
295
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
328# All generated files which can be included by another file.
329generated_files = config.h $(GNULIB_H)
330
331all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
332 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
333
334# Traditionally "install" depends on "all". But it may be useful
335# not to; for example, if the user has made some trivial change to a
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.
339install: all
340 @$(MAKE) $(FLAGS_TO_PASS) install-only
341
342install-only:
343 n=`echo gdbserver | sed '$(program_transform_name)'`; \
344 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
345 if [ x"$(IPA_DEPFILES)" != x ]; then \
346 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir); \
347 $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
348 fi; \
349 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
350 $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
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
355
356uninstall: force
357 n=`echo gdbserver | sed '$(program_transform_name)'`; \
358 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
359 rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
360 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
361
362installcheck:
363check:
364info dvi pdf:
365install-info:
366install-pdf:
367html:
368install-html:
369clean-info: force
370 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
371
372gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS} $(LIBGNU) $(LIBIBERTY)
373 rm -f gdbserver$(EXEEXT)
374 $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver$(EXEEXT) $(OBS) \
375 $(LIBGNU) $(LIBIBERTY) $(GDBSERVER_LIBS) $(XM_CLIBS)
376
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
380.PHONY: all-lib
381
382gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU) $(LIBIBERTY)
383 rm -f gdbreplay$(EXEEXT)
384 $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
385 $(XM_CLIBS) $(LIBGNU) $(LIBIBERTY)
386
387IPA_OBJS = ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o \
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}
391
392IPA_LIB = libinproctrace.so
393
394$(IPA_LIB): $(IPA_OBJS) ${ADD_DEPS} ${CDEPS}
395 rm -f $(IPA_LIB)
396 $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) -Wl,--no-undefined $(INTERNAL_CFLAGS) \
397 $(INTERNAL_LDFLAGS) -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread
398
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}
403 etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
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} *~
416 rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
417 rm -f $(IPA_LIB)
418 rm -f *-generated.c
419 rm -f stamp-xml
420 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
421
422maintainer-clean realclean distclean: clean
423 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
424 rm -rf $(GNULIB_BUILDDIR)
425 rm -f Makefile config.status config.h stamp-h config.log
426 rm -f Makefile
427
428subdir_do: force
429 @for i in $(DODIRS); do \
430 case $$i in \
431 $(REQUIRED_SUBDIRS)) \
432 if [ ! -f ./$$i/Makefile ] ; then \
433 echo "Missing $$i/Makefile" >&2 ; \
434 exit 1 ; \
435 fi ;; \
436 esac ; \
437 if [ -f ./$$i/Makefile ] ; then \
438 if (cd ./$$i; \
439 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
440 else exit 1 ; fi ; \
441 else true ; fi ; \
442 done
443
444config.h: stamp-h ; @true
445stamp-h: config.in config.status
446 CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
447
448Makefile: Makefile.in config.status
449 CONFIG_HEADERS="" $(SHELL) ./config.status
450
451$(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status
452 @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \
453 CONFIG_COMMANDS="depfiles" \
454 CONFIG_HEADERS= \
455 CONFIG_LINKS= \
456 $(SHELL) config.status
457
458config.status: configure configure.srv $(srcdir)/../../bfd/development.sh
459 $(SHELL) ./config.status --recheck
460
461# automatic rebuilding in automake-generated Makefiles requires
462# this rule in the toplevel Makefile, which, with GNU make, causes
463# the desired updates through the implicit regeneration of the Makefile
464# and all of its prerequisites.
465am--refresh:
466 @:
467
468force:
469
470version-generated.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh
471 $(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \
472 $(host_alias) $(target_alias) $@
473
474xml-builtin-generated.c: stamp-xml; @true
475stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
476 rm -f xml-builtin.tmp
477 $(SHELL) $(XML_DIR)/feature_to_c.sh xml-builtin.tmp $(XML_FILES)
478 $(SHELL) $(srcdir)/../../move-if-change xml-builtin.tmp xml-builtin-generated.c
479 echo stamp > stamp-xml
480
481.PRECIOUS: xml-builtin.c
482
483# GNU Make has an annoying habit of putting *all* the Makefile variables
484# into the environment, unless you include this target as a circumvention.
485# Rumor is that this will be fixed (and this target can be removed)
486# in GNU Make 4.0.
487.NOEXPORT:
488
489# GNU Make 3.63 has a different problem: it keeps tacking command line
490# overrides onto the definition of $(MAKE). This variable setting
491# will remove them.
492MAKEOVERRIDES =
493
494regdat_sh = $(srcdir)/../regformats/regdat.sh
495
496UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
497
498# Note, we only build the IPA if -fvisibility=hidden is supported in
499# the first place.
500IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
501 -fPIC -DIN_PROCESS_AGENT \
502 -fvisibility=hidden
503
504IPAGENT_COMPILE = $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
505
506# Rules for special cases.
507
508ax-ipa.o: ax.c
509 $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
510 $(POSTCOMPILE)
511
512ax.o: ax.c
513 $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
514 $(POSTCOMPILE)
515
516# Rules for objects that go in the in-process agent.
517
518%-ipa.o: %-generated.c
519 $(IPAGENT_COMPILE) $<
520 $(POSTCOMPILE)
521
522%-ipa.o: %.c
523 $(IPAGENT_COMPILE) $<
524 $(POSTCOMPILE)
525
526# Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
527# Therefore, this one needs to be before "%.o: %.c" for it to be considered for
528# files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c.
529#
530# Later versions of GNU Make choose the rule with the shortest stem, so it would
531# work in any order.
532
533%-ipa.o: %-ipa.c
534 $(IPAGENT_COMPILE) $<
535 $(POSTCOMPILE)
536
537%-ipa.o: ../common/%.c
538 $(IPAGENT_COMPILE) $<
539 $(POSTCOMPILE)
540
541# Rules for objects that go in the gdbserver binary.
542
543%.o: %-generated.c
544 $(COMPILE) $<
545 $(POSTCOMPILE)
546
547%.o: %.c
548 $(COMPILE) $<
549 $(POSTCOMPILE)
550
551%.o: ../arch/%.c
552 $(COMPILE) $<
553 $(POSTCOMPILE)
554
555%.o: ../common/%.c
556 $(COMPILE) $<
557 $(POSTCOMPILE)
558
559%.o: ../nat/%.c
560 $(COMPILE) $<
561 $(POSTCOMPILE)
562
563%.o: ../target/%.c
564 $(COMPILE) $<
565 $(POSTCOMPILE)
566
567# Rules for register format descriptions. Suffix destination files with
568# -generated to identify and clean them easily.
569
570%-generated.c: ../regformats/%.dat | $(regdat_sh)
571 $(SHELL) $(regdat_sh) $< $@
572
573%-generated.c: ../regformats/arm/%.dat | $(regdat_sh)
574 $(SHELL) $(regdat_sh) $< $@
575
576%-generated.c: ../regformats/i386/%.dat | $(regdat_sh)
577 $(SHELL) $(regdat_sh) $< $@
578
579%-generated.c: ../regformats/rs6000/%.dat | $(regdat_sh)
580 $(SHELL) $(regdat_sh) $< $@
581
582#
583# Dependency tracking.
584#
585
586ifeq ($(DEPMODE),depmode=gcc3)
587# Note that we put the dependencies into a .Tpo file, then move them
588# into place if the compile succeeds. We need this because gcc does
589# not atomically write the dependency output file.
590override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
591 -MF $(DEPDIR)/$(basename $(@F)).Tpo
592override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
593 $(DEPDIR)/$(basename $(@F)).Po
594else
595override COMPILE.pre = source='$<' object='$@' libtool=no \
596 DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
597# depcomp handles atomicity for us, so we don't need a postcompile
598# step.
599override POSTCOMPILE =
600endif
601
602# A list of all the objects we might care about in this build, for
603# dependency tracking.
604all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS)
605
606# Ensure that generated files are created early. Use order-only
607# dependencies if available. They require GNU make 3.80 or newer,
608# and the .VARIABLES variable was introduced at the same time.
609ifdef .VARIABLES
610$(all_object_files): | $(generated_files)
611else
612$(all_object_files) : $(generated_files)
613endif
614
615# Dependencies.
616-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
617
618# Disable implicit make rules.
619include $(srcdir)/../disable-implicit-rules.mk
620
621# This is the end of "Makefile.in".
This page took 0.024926 seconds and 4 git commands to generate.