This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 2/8] gdbserver: Use pattern rule for objects from target/
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Fri, 10 Mar 2017 16:23:17 -0500
- Subject: [PATCH 2/8] gdbserver: Use pattern rule for objects from target/
- Authentication-results: sourceware.org; auth=none
- References: <20170310212323.15369-1-simon.marchi@polymtl.ca>
gdb/gdbserver/ChangeLog:
* Makefile.in (%.o: ../target/%.c): New rule.
(waitstatus.o: ../target/waitstatus.c): Remove.
---
gdb/gdbserver/Makefile.in | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 85138e09c5..f814366a01 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -328,10 +328,6 @@ FLAGS_TO_PASS = \
# All generated files which can be included by another file.
generated_files = config.h $(GNULIB_H)
-%.o: %.c
- $(COMPILE) $<
- $(POSTCOMPILE)
-
all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries)
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
@@ -796,9 +792,6 @@ cleanups.o: ../common/cleanups.c
common-exceptions.o: ../common/common-exceptions.c
$(COMPILE) $<
$(POSTCOMPILE)
-waitstatus.o: ../target/waitstatus.c
- $(COMPILE) $<
- $(POSTCOMPILE)
fileio.o: ../common/fileio.c
$(COMPILE) $<
$(POSTCOMPILE)
@@ -881,6 +874,16 @@ aarch64-insn.o: ../arch/aarch64-insn.c
$(COMPILE) $<
$(POSTCOMPILE)
+# Rules for objects that go in the gdbserver binary.
+
+%.o: %.c
+ $(COMPILE) $<
+ $(POSTCOMPILE)
+
+%.o: ../target/%.c
+ $(COMPILE) $<
+ $(POSTCOMPILE)
+
# Rules for register format descriptions.
%.c: ../regformats/%.dat | $(regdat_sh)
--
2.12.0