diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 3baa96f4a9..20486112a6 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -544,174 +544,27 @@ IPAGENT_COMPILE = $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
 ax-ipa.o: ax.c
 	$(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
 	$(POSTCOMPILE)
-tracepoint-ipa.o: tracepoint.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-utils-ipa.o: utils.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
 format-ipa.o: ../common/format.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
 common-utils-ipa.o: ../common/common-utils.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
-remote-utils-ipa.o: remote-utils.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-regcache-ipa.o: regcache.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-i386-linux-ipa.o: i386-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-i386-mmx-linux-ipa.o: i386-mmx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-i386-avx-linux-ipa.o: i386-avx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-i386-mpx-linux-ipa.o: i386-mpx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
 linux-i386-ipa.o: linux-i386-ipa.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
 linux-amd64-ipa.o: linux-amd64-ipa.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
-amd64-linux-ipa.o: amd64-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-amd64-avx-linux-ipa.o: amd64-avx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-amd64-mpx-linux-ipa.o: amd64-mpx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
 linux-aarch64-ipa.o: linux-aarch64-ipa.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
-aarch64-ipa.o: aarch64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
 linux-s390-ipa.o: linux-s390-ipa.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
-s390-linux32-ipa.o: s390-linux32.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-linux32v1-ipa.o: s390-linux32v1.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-linux32v2-ipa.o: s390-linux32v2.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-linux64-ipa.o: s390-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-linux64v1-ipa.o: s390-linux64v1.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-linux64v2-ipa.o: s390-linux64v2.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-te-linux64-ipa.o: s390-te-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-vx-linux64-ipa.o: s390-vx-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390-tevx-linux64-ipa.o: s390-tevx-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390x-linux64-ipa.o: s390x-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390x-linux64v1-ipa.o: s390x-linux64v1.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390x-linux64v2-ipa.o: s390x-linux64v2.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390x-te-linux64-ipa.o: s390x-te-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390x-vx-linux64-ipa.o: s390x-vx-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
 linux-ppc-ipa.o: linux-ppc-ipa.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
-powerpc-32l-ipa.o: powerpc-32l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-altivec32l-ipa.o: powerpc-altivec32l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-cell32l-ipa.o: powerpc-cell32l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-vsx32l-ipa.o: powerpc-vsx32l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-e500l-ipa.o: powerpc-e500l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-64l-ipa.o: powerpc-64l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-altivec64l-ipa.o: powerpc-altivec64l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-cell64l-ipa.o: powerpc-cell64l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-vsx64l-ipa.o: powerpc-vsx64l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-tdesc-ipa.o: tdesc.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
 print-utils-ipa.o: ../common/print-utils.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
@@ -721,20 +574,17 @@ rsp-low-ipa.o: ../common/rsp-low.c
 errors-ipa.o: ../common/errors.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
-x32-linux-ipa.o: x32-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-x32-avx-linux-ipa.o: x32-avx-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-x32-avx512-linux-ipa.o: x32-avx512-linux.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
 
 ax.o: ax.c
 	$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
 	$(POSTCOMPILE)
 
+# Rules for objects that go in the in-process agent.
+
+%-ipa.o: %.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+
 # Rules for objects that go in the gdbserver binary.
 
 %.o: %.c
