All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 3/5] Introduce rules.mak
Date: Mon, 19 Jan 2009 13:47:21 +0200	[thread overview]
Message-ID: <1232365643-6417-4-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1232365643-6417-1-git-send-email-avi@redhat.com>

Add a file for common makefile rules.

Signed-off-by: Avi Kivity <avi@redhat.com>

(Don't forget to 'svn add')
---
 Makefile        |    8 ++------
 Makefile.target |    7 +------
 rules.mak       |   10 ++++++++++
 3 files changed, 13 insertions(+), 12 deletions(-)
 create mode 100644 rules.mak

diff --git a/Makefile b/Makefile
index 92a77ba..66e61fc 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@ include config-host.mak
 
 VPATH=$(SRC_PATH):$(SRC_PATH)/hw
 
+include rules.mak
+
 CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
 LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
 
@@ -188,12 +190,6 @@ libqemu_user.a: $(USER_OBJS)
 qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS)
 	$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
 
-%.o: %.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-
-%.o: %.m
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-
 qemu-nbd$(EXESUF):  qemu-nbd.o qemu-tool.o osdep.o $(BLOCK_OBJS)
 	$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
 
diff --git a/Makefile.target b/Makefile.target
index 5f41a3d..b6d5590 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -1,4 +1,5 @@
 include config.mak
+include $(SRC_PATH)/rules.mak
 
 TARGET_BASE_ARCH:=$(TARGET_ARCH)
 ifeq ($(TARGET_ARCH), x86_64)
@@ -731,12 +732,6 @@ else
 	$(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)
 endif
 
-%.o: %.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-%.o: %.S
-	$(CC) $(CPPFLAGS) -c -o $@ $<
-
 clean:
 	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
 	rm -f *.d */*.d tcg/*.o
diff --git a/rules.mak b/rules.mak
new file mode 100644
index 0000000..fe06978
--- /dev/null
+++ b/rules.mak
@@ -0,0 +1,10 @@
+
+%.o: %.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+%.o: %.S
+	$(CC) $(CPPFLAGS) -c -o $@ $<
+
+%.o: %.m
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
-- 
1.6.0.6

  parent reply	other threads:[~2009-01-19 11:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 11:47 [Qemu-devel] [PATCH 0/5] Makefile enhancements Avi Kivity
2009-01-19 11:47 ` [Qemu-devel] [PATCH 1/5] Drop OP_CFLAGS Avi Kivity
2009-01-19 11:47 ` [Qemu-devel] [PATCH 2/5] Consolidate compiler invocations Avi Kivity
2009-01-19 11:47 ` Avi Kivity [this message]
2009-01-21 15:57   ` [Qemu-devel] Re: [PATCH 3/5] Introduce rules.mak Anthony Liguori
2009-01-21 17:08     ` Avi Kivity
2009-01-19 11:47 ` [Qemu-devel] [PATCH 4/5] Consolidate linker rules Avi Kivity
2009-01-19 11:47 ` [Qemu-devel] [PATCH 5/5] Make make output quieter Avi Kivity
2009-01-19 16:03 ` [Qemu-devel] Re: [PATCH 0/5] Makefile enhancements Anthony Liguori
2009-01-19 16:14   ` Paul Brook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1232365643-6417-4-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.