Commit 16394485414cba50b9cd357fcab7d7bf3c584c46

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent 1c872672

Refactor a single rule to generate all qemu-* executables

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 9 additions and 13 deletions
Makefile.target
@@ -300,9 +300,7 @@ obj-m68k-y += m68k-sim.o m68k-semi.o @@ -300,9 +300,7 @@ obj-m68k-y += m68k-sim.o m68k-semi.o
300 # cpu_signal_handler() in cpu-exec.c. 300 # cpu_signal_handler() in cpu-exec.c.
301 signal.o: CFLAGS += $(HELPER_CFLAGS) 301 signal.o: CFLAGS += $(HELPER_CFLAGS)
302 302
303 -$(QEMU_PROG): ARLIBS=../libqemu_user.a libqemu.a  
304 -$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../libqemu_user.a libqemu.a  
305 - $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) 303 +ARLIBS=../libqemu_user.a libqemu.a
306 304
307 ifeq ($(ARCH),alpha) 305 ifeq ($(ARCH),alpha)
308 # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of 306 # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
@@ -332,9 +330,7 @@ obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \ @@ -332,9 +330,7 @@ obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
332 # cpu_signal_handler() in cpu-exec.c. 330 # cpu_signal_handler() in cpu-exec.c.
333 signal.o: CFLAGS += $(HELPER_CFLAGS) 331 signal.o: CFLAGS += $(HELPER_CFLAGS)
334 332
335 -$(QEMU_PROG): ARLIBS=libqemu.a  
336 -$(QEMU_PROG): $(obj-y) libqemu.a  
337 - $(call LINK,$(obj-y)) 333 +ARLIBS=libqemu.a
338 334
339 endif #CONFIG_DARWIN_USER 335 endif #CONFIG_DARWIN_USER
340 336
@@ -432,9 +428,7 @@ obj-y += uaccess.o @@ -432,9 +428,7 @@ obj-y += uaccess.o
432 # cpu_signal_handler() in cpu-exec.c. 428 # cpu_signal_handler() in cpu-exec.c.
433 signal.o: CFLAGS += $(HELPER_CFLAGS) 429 signal.o: CFLAGS += $(HELPER_CFLAGS)
434 430
435 -$(QEMU_PROG): ARLIBS=libqemu.a ../libqemu_user.a  
436 -$(QEMU_PROG): $(obj-y) libqemu.a ../libqemu_user.a  
437 - $(call LINK,$(obj-y)) 431 +ARLIBS=libqemu.a ../libqemu_user.a
438 432
439 endif #CONFIG_BSD_USER 433 endif #CONFIG_BSD_USER
440 434
@@ -683,13 +677,15 @@ vl.o: qemu-options.h @@ -683,13 +677,15 @@ vl.o: qemu-options.h
683 677
684 monitor.o: qemu-monitor.h 678 monitor.o: qemu-monitor.h
685 679
686 -$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS)  
687 -$(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)  
688 -$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../libqemu_common.a libqemu.a $(HWLIB)  
689 - $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) 680 +LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS)
  681 +ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
690 682
691 endif # !CONFIG_USER_ONLY 683 endif # !CONFIG_USER_ONLY
692 684
  685 +$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) $(ARLIBS)
  686 + $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
  687 +
  688 +
693 gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh 689 gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh
694 ifeq ($(TARGET_XML_FILES),) 690 ifeq ($(TARGET_XML_FILES),)
695 $(call quiet-command,rm -f $@ && echo > $@," GEN $(TARGET_DIR)$@") 691 $(call quiet-command,rm -f $@ && echo > $@," GEN $(TARGET_DIR)$@")