From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 3/6] Introduce rules.mak
Date: Wed, 21 Jan 2009 19:10:06 +0200 [thread overview]
Message-ID: <1232557809-12860-4-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1232557809-12860-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..ea76b69 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,14 @@
# Makefile for QEMU.
include config-host.mak
+include $(SRC_PATH)/rules.mak
.PHONY: all clean cscope distclean dvi html info install install-doc \
recurse-all speed tar tarbin test
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
+
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
next prev parent reply other threads:[~2009-01-21 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 17:10 [Qemu-devel] [PATCH 0/6] Makefile enhancements (v2) Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 1/6] Drop OP_CFLAGS Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 2/6] Consolidate compiler invocations Avi Kivity
2009-01-21 17:10 ` Avi Kivity [this message]
2009-01-21 17:10 ` [Qemu-devel] [PATCH 4/6] Consolidate linker rules Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 5/6] Make make output quieter Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 6/6] Consolidate library creation Avi Kivity
2009-01-21 18:13 ` [Qemu-devel] Re: [PATCH 0/6] Makefile enhancements (v2) Anthony Liguori
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=1232557809-12860-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.