[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6379] Consolidate linker rules (Avi Kivity)
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [6379] Consolidate linker rules (Avi Kivity) |
Date: |
Wed, 21 Jan 2009 18:13:02 +0000 |
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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6379] Consolidate linker rules (Avi Kivity),
Anthony Liguori <=