-# Copyright (C) 1989-2017 Free Software Foundation, Inc.
+# Copyright (C) 1989-2018 Free Software Foundation, Inc.
# This file is part of GDB.
infodir = @infodir@
htmldir = $(prefix)/html
includedir = @includedir@
+CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@
SHELL = @SHELL@
EXEEXT = @EXEEXT@
regcache.o \
remote-utils.o \
rsp-low.o \
- selftest.o \
server.o \
signals.o \
signals-state-save-restore.o \
rm -f *-generated.c
rm -f stamp-xml
rm -f $(DEPDIR)/*.Po
+ for i in $(CONFIG_SRC_SUBDIR); do \
+ rm -f $$i/*.o; \
+ rm -f $$i/$(DEPDIR)/*; \
+ done
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
maintainer-clean realclean distclean: clean
rm -rf $(GNULIB_BUILDDIR)
rm -f Makefile config.status config.h stamp-h config.log
rm -f Makefile
+ for i in $(CONFIG_SRC_SUBDIR); do \
+ rmdir $$i/$(DEPDIR); \
+ done
subdir_do: force
@for i in $(DODIRS); do \
$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
$(POSTCOMPILE)
-arch-i386.o: ../arch/i386.c
- $(COMPILE) $<
- $(POSTCOMPILE)
-
-arch-amd64.o: ../arch/amd64.c
+arch/%.o: ../arch/%.c
$(COMPILE) $<
$(POSTCOMPILE)
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)
-%-ipa.o: ../arch/%.c
+arch/%-ipa.o: ../arch/%.c
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)
$(COMPILE) $<
$(POSTCOMPILE)
-%.o: ../arch/%.c
- $(COMPILE) $<
- $(POSTCOMPILE)
-
%.o: ../common/%.c
$(COMPILE) $<
$(POSTCOMPILE)
# into place if the compile succeeds. We need this because gcc does
# not atomically write the dependency output file.
override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
- -MF $(DEPDIR)/$(basename $(@F)).Tpo
-override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
- $(DEPDIR)/$(basename $(@F)).Po
+ -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
+override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
+ $(@D)/$(DEPDIR)/$(basename $(@F)).Po
else
override COMPILE.pre = source='$<' object='$@' libtool=no \
- DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
+ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
+ $(CXX) -x c++ $(CXX_DIALECT)
# depcomp handles atomicity for us, so we don't need a postcompile
# step.
override POSTCOMPILE =