From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6379] Consolidate linker rules (Avi Kivity)
Date: Wed, 21 Jan 2009 18:13:02 +0000 [thread overview]
Message-ID: <E1LPhZW-0002lC-AT@cvs.savannah.gnu.org> (raw)
Revision: 6379
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6379
Author: aliguori
Date: 2009-01-21 18:13:02 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
Consolidate linker rules (Avi Kivity)
Use generic rules where posssible, and a LINK macro where not.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/Makefile
trunk/Makefile.target
trunk/rules.mak
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2009-01-21 18:12:52 UTC (rev 6378)
+++ trunk/Makefile 2009-01-21 18:13:02 UTC (rev 6379)
@@ -188,11 +188,11 @@
######################################################################
qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS)
- $(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o osdep.o $(BLOCK_OBJS)
- $(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
+qemu-img$(EXESUF) qemu-nbd$(EXESUF): LIBS += -lz
+
clean:
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
Modified: trunk/Makefile.target
===================================================================
--- trunk/Makefile.target 2009-01-21 18:12:52 UTC (rev 6378)
+++ trunk/Makefile.target 2009-01-21 18:13:02 UTC (rev 6379)
@@ -355,7 +355,7 @@
signal.o: CFLAGS += $(HELPER_CFLAGS)
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ $(LINK)
ifeq ($(ARCH),alpha)
# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
# the address space (31 bit so sign extending doesn't matter)
@@ -390,7 +390,7 @@
signal.o: CFLAGS += $(HELPER_CFLAGS)
$(QEMU_PROG): $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ $(LINK)
endif #CONFIG_DARWIN_USER
@@ -494,7 +494,7 @@
signal.o: CFLAGS += $(HELPER_CFLAGS)
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ $(LINK)
endif #CONFIG_BSD_USER
@@ -719,8 +719,10 @@
main.o: CFLAGS+=-p
endif
+$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
+
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
+ $(LINK)
endif # !CONFIG_USER_ONLY
Modified: trunk/rules.mak
===================================================================
--- trunk/rules.mak 2009-01-21 18:12:52 UTC (rev 6378)
+++ trunk/rules.mak 2009-01-21 18:13:02 UTC (rev 6379)
@@ -8,3 +8,7 @@
%.o: %.m
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+LINK = $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+%$(EXESUF): %.o
+ $(LINK)
reply other threads:[~2009-01-21 18:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1LPhZW-0002lC-AT@cvs.savannah.gnu.org \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).