qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 6/6] Consolidate library creation


From: Avi Kivity
Subject: [Qemu-devel] [PATCH 6/6] Consolidate library creation
Date: Wed, 21 Jan 2009 19:10:09 +0200

Put archive utility (ar) invocations into a rule, and have it generate
quiet output by default.

Signed-off-by: Avi Kivity <address@hidden>
---
 Makefile        |    4 ----
 Makefile.target |    2 --
 rules.mak       |    3 +++
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index ac15ca5..ff6a009 100644
--- a/Makefile
+++ b/Makefile
@@ -174,16 +174,12 @@ curses.o: curses.c keymaps.c curses_keys.h
 bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS)
 
 libqemu_common.a: $(OBJS)
-       rm -f $@ 
-       $(AR) rcs $@ $(OBJS)
 
 #######################################################################
 # USER_OBJS is code used by qemu userspace emulation
 USER_OBJS=cutils.o  cache-utils.o
 
 libqemu_user.a: $(USER_OBJS)
-       rm -f $@ 
-       $(AR) rcs $@ $(USER_OBJS)
 
 ######################################################################
 
diff --git a/Makefile.target b/Makefile.target
index 1a02451..a091ce9 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -211,8 +211,6 @@ endif
 # libqemu
 
 libqemu.a: $(LIBOBJS)
-       rm -f $@
-       $(AR) rcs $@ $(LIBOBJS)
 
 translate.o: translate.c cpu.h
 
diff --git a/rules.mak b/rules.mak
index 818c5ef..a4955da 100644
--- a/rules.mak
+++ b/rules.mak
@@ -13,4 +13,7 @@ LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ 
$(LIBS),LINK $@)
 %$(EXESUF): %.o
        $(LINK)
 
+%.a:
+       $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,AR $@)
+
 quiet-command = $(if $(V),$1,@echo $2 && $1)
-- 
1.6.0.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]