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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6379 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
17759187b6
commit
3aa892d75f
4
Makefile
4
Makefile
@ -188,10 +188,10 @@ libqemu_user.a: $(USER_OBJS)
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS)
|
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)
|
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:
|
clean:
|
||||||
# avoid old build problems by removing potentially incorrect old files
|
# avoid old build problems by removing potentially incorrect old files
|
||||||
|
@ -355,7 +355,7 @@ OBJS+= libqemu.a
|
|||||||
signal.o: CFLAGS += $(HELPER_CFLAGS)
|
signal.o: CFLAGS += $(HELPER_CFLAGS)
|
||||||
|
|
||||||
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
|
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
$(LINK)
|
||||||
ifeq ($(ARCH),alpha)
|
ifeq ($(ARCH),alpha)
|
||||||
# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
|
# 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)
|
# the address space (31 bit so sign extending doesn't matter)
|
||||||
@ -390,7 +390,7 @@ endif
|
|||||||
signal.o: CFLAGS += $(HELPER_CFLAGS)
|
signal.o: CFLAGS += $(HELPER_CFLAGS)
|
||||||
|
|
||||||
$(QEMU_PROG): $(OBJS)
|
$(QEMU_PROG): $(OBJS)
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
$(LINK)
|
||||||
|
|
||||||
endif #CONFIG_DARWIN_USER
|
endif #CONFIG_DARWIN_USER
|
||||||
|
|
||||||
@ -494,7 +494,7 @@ endif
|
|||||||
signal.o: CFLAGS += $(HELPER_CFLAGS)
|
signal.o: CFLAGS += $(HELPER_CFLAGS)
|
||||||
|
|
||||||
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
|
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
$(LINK)
|
||||||
|
|
||||||
endif #CONFIG_BSD_USER
|
endif #CONFIG_BSD_USER
|
||||||
|
|
||||||
@ -719,8 +719,10 @@ LDFLAGS+=-p
|
|||||||
main.o: CFLAGS+=-p
|
main.o: CFLAGS+=-p
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
|
||||||
|
|
||||||
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
|
$(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
|
endif # !CONFIG_USER_ONLY
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user