Don't pass -m64 to libcc1 on aarch64-linux.
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
index 834425dc44ef8566901a48233ea0cfe2331703b5..3ce086d70f23df445b174c49c489ec8415d7614a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1989-2017 Free Software Foundation, Inc.
+# Copyright (C) 1989-2018 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -43,6 +43,7 @@ man9dir = $(mandir)/man9
 infodir = @infodir@
 htmldir = $(prefix)/html
 includedir = @includedir@
+CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@
 
 SHELL = @SHELL@
 EXEEXT = @EXEEXT@
@@ -65,7 +66,7 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
 
 # Note that these are overridden by GNU make-specific code below if
 # GNU make is used.  The overrides implement dependency tracking.
-COMPILE.pre = $(CXX) $(CXX_DIALECT)
+COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
 COMPILE.post = -c -o $@
 COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
 POSTCOMPILE = @true
@@ -205,6 +206,7 @@ SFILES = \
        $(srcdir)/common/fileio.c \
        $(srcdir)/common/filestuff.c \
        $(srcdir)/common/job-control.c \
+       $(srcdir)/common/gdb_tilde_expand.c \
        $(srcdir)/common/gdb_vecs.c \
        $(srcdir)/common/new-op.c \
        $(srcdir)/common/print-utils.c \
@@ -247,6 +249,7 @@ OBS = \
        fileio.o \
        filestuff.o \
        format.o \
+       gdb_tilde_expand.o \
        gdb_vecs.o \
        hostio.o \
        inferiors.o \
@@ -387,9 +390,19 @@ gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU) $(LIBIBERTY)
        $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
          $(XM_CLIBS) $(LIBGNU) $(LIBIBERTY)
 
-IPA_OBJS = ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o \
-       regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o \
-       tdesc-ipa.o print-utils-ipa.o rsp-low-ipa.o errors-ipa.o \
+IPA_OBJS = \
+       ax-ipa.o \
+       common-utils-ipa.o \
+       errors-ipa.o \
+       format-ipa.o \
+       print-utils-ipa.o \
+       regcache-ipa.o \
+       remote-utils-ipa.o \
+       rsp-low-ipa.o \
+       tdesc-ipa.o \
+       tracepoint-ipa.o \
+       utils-ipa.o \
+       vec-ipa.o \
        ${IPA_DEPFILES}
 
 IPA_LIB = libinproctrace.so
@@ -421,6 +434,10 @@ clean:
        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
@@ -428,6 +445,9 @@ 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 \
@@ -517,6 +537,10 @@ ax.o: ax.c
        $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
        $(POSTCOMPILE)
 
+arch/%.o: ../arch/%.c
+       $(COMPILE) $<
+       $(POSTCOMPILE)
+
 # Rules for objects that go in the in-process agent.
 
 %-ipa.o: %-generated.c
@@ -542,6 +566,10 @@ ax.o: ax.c
        $(IPAGENT_COMPILE) $<
        $(POSTCOMPILE)
 
+arch/%-ipa.o: ../arch/%.c
+       $(IPAGENT_COMPILE) $<
+       $(POSTCOMPILE)
+
 # Rules for objects that go in the gdbserver binary.
 
 %.o: %-generated.c
@@ -552,10 +580,6 @@ ax.o: ax.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
-%.o: ../arch/%.c
-       $(COMPILE) $<
-       $(POSTCOMPILE)
-
 %.o: ../common/%.c
        $(COMPILE) $<
        $(POSTCOMPILE)
@@ -592,12 +616,13 @@ ifeq ($(DEPMODE),depmode=gcc3)
 # 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 =
@@ -622,4 +647,7 @@ endif
 # Disable implicit make rules.
 include $(srcdir)/../disable-implicit-rules.mk
 
+# Do not delete intermediate files (e.g. *-generated.c).
+.SECONDARY:
+
 # This is the end of "Makefile.in".
This page took 0.026649 seconds and 4 git commands to generate.