Commit 93a0dba7ea7968ad558b225fce8d4b6527308b3f
1 parent
4f188f88
Consolidate library creation (Avi Kivity)
Put archive utility (ar) invocations into a rule, and have it generate quiet output by default. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6381 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
3 additions
and
6 deletions
Makefile
| @@ -174,16 +174,12 @@ curses.o: curses.c keymaps.c curses_keys.h | @@ -174,16 +174,12 @@ curses.o: curses.c keymaps.c curses_keys.h | ||
| 174 | bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS) | 174 | bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS) |
| 175 | 175 | ||
| 176 | libqemu_common.a: $(OBJS) | 176 | libqemu_common.a: $(OBJS) |
| 177 | - rm -f $@ | ||
| 178 | - $(AR) rcs $@ $(OBJS) | ||
| 179 | 177 | ||
| 180 | ####################################################################### | 178 | ####################################################################### |
| 181 | # USER_OBJS is code used by qemu userspace emulation | 179 | # USER_OBJS is code used by qemu userspace emulation |
| 182 | USER_OBJS=cutils.o cache-utils.o | 180 | USER_OBJS=cutils.o cache-utils.o |
| 183 | 181 | ||
| 184 | libqemu_user.a: $(USER_OBJS) | 182 | libqemu_user.a: $(USER_OBJS) |
| 185 | - rm -f $@ | ||
| 186 | - $(AR) rcs $@ $(USER_OBJS) | ||
| 187 | 183 | ||
| 188 | ###################################################################### | 184 | ###################################################################### |
| 189 | 185 |
Makefile.target
rules.mak
| @@ -13,4 +13,7 @@ LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS),LINK $@) | @@ -13,4 +13,7 @@ LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS),LINK $@) | ||
| 13 | %$(EXESUF): %.o | 13 | %$(EXESUF): %.o |
| 14 | $(LINK) | 14 | $(LINK) |
| 15 | 15 | ||
| 16 | +%.a: | ||
| 17 | + $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,AR $@) | ||
| 18 | + | ||
| 16 | quiet-command = $(if $(V),$1,@echo $2 && $1) | 19 | quiet-command = $(if $(V),$1,@echo $2 && $1) |