Merge commit 'gnu/master' into test
[qemu] / Makefile.target
index 858ba3d..40a0599 100644 (file)
@@ -128,6 +128,8 @@ kvm.o: CFLAGS+=$(KVM_CFLAGS)
 kvm-all.o: CFLAGS+=$(KVM_CFLAGS)
 
 all: $(PROGS)
+# Dummy command so that make thinks it has done something
+       @true
 
 #########################################################
 # cpu emulator library
@@ -183,6 +185,12 @@ endif
 ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc)
 LIBOBJS+=ppc-dis.o
 endif
+ifeq ($(findstring microblaze, $(TARGET_BASE_ARCH) $(ARCH)),microblaze)
+LIBOBJS+=microblaze-dis.o
+ifndef CONFIG_USER_ONLY
+LIBOBJS+= mmu.o
+endif
+endif
 ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips)
 LIBOBJS+=mips-dis.o
 endif
@@ -319,7 +327,7 @@ CFLAGS+=-p
 endif
 
 OBJS= main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
-      elfload.o linuxload.o uaccess.o envlist.o
+      elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o
 LIBS+= $(PTHREADLIBS)
 LIBS+= $(CLOCKLIBS)
 ifdef TARGET_HAS_BFLT
@@ -342,18 +350,13 @@ ifeq ($(TARGET_ARCH), m68k)
 OBJS+= m68k-sim.o m68k-semi.o
 endif
 
-ifdef CONFIG_GDBSTUB
-OBJS+=gdbstub.o gdbstub-xml.o
-endif
-
-OBJS+= libqemu.a
-
 # Note: this is a workaround. The real fix is to avoid compiling
 # cpu_signal_handler() in cpu-exec.c.
 signal.o: CFLAGS += $(HELPER_CFLAGS)
 
-$(QEMU_PROG): $(OBJS) ../libqemu_user.a
-       $(LINK)
+$(QEMU_PROG): ARLIBS=../libqemu_user.a libqemu.a
+$(QEMU_PROG): $(OBJS) ../libqemu_user.a libqemu.a
+       $(call LINK,$(OBJS))
 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)
@@ -375,20 +378,16 @@ LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
 
 LIBS+=-lmx
 
-OBJS= main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o
-
-OBJS+= libqemu.a
-
-ifdef CONFIG_GDBSTUB
-OBJS+=gdbstub.o gdbstub-xml.o
-endif
+OBJS= main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
+      gdbstub.o gdbstub-xml.o
 
 # Note: this is a workaround. The real fix is to avoid compiling
 # cpu_signal_handler() in cpu-exec.c.
 signal.o: CFLAGS += $(HELPER_CFLAGS)
 
-$(QEMU_PROG): $(OBJS)
-       $(LINK)
+$(QEMU_PROG): ARLIBS=libqemu.a
+$(QEMU_PROG): $(OBJS) libqemu.a
+       $(call LINK,$(OBJS))
 
 endif #CONFIG_DARWIN_USER
 
@@ -478,21 +477,17 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
 endif
 endif
 
-OBJS= main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o
+OBJS= main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \
+      gdbstub.o gdbstub-xml.o
 OBJS+= uaccess.o
 
-OBJS+= libqemu.a
-
-ifdef CONFIG_GDBSTUB
-OBJS+=gdbstub.o
-endif
-
 # Note: this is a workaround. The real fix is to avoid compiling
 # cpu_signal_handler() in cpu-exec.c.
 signal.o: CFLAGS += $(HELPER_CFLAGS)
 
-$(QEMU_PROG): $(OBJS) ../libqemu_user.a
-       $(LINK)
+$(QEMU_PROG): ARLIBS=libqemu.a ../libqemu_user.a
+$(QEMU_PROG): $(OBJS) libqemu.a ../libqemu_user.a
+       $(call LINK,$(OBJS))
 
 endif #CONFIG_BSD_USER
 
@@ -500,22 +495,14 @@ endif #CONFIG_BSD_USER
 # System emulator target
 ifndef CONFIG_USER_ONLY
 
-OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o dma-helpers.o
+OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o \
+     gdbstub.o gdbstub-xml.o
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
-OBJS+=virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
-OBJS+=fw_cfg.o
+OBJS+=virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
 ifdef CONFIG_KVM
 OBJS+=kvm.o kvm-all.o
 endif
-ifdef CONFIG_WIN32
-OBJS+=block-raw-win32.o
-else
-ifdef CONFIG_AIO
-OBJS+=posix-aio-compat.o
-endif
-OBJS+=block-raw-posix.o
-endif
 
 LIBS+=-lz
 ifdef CONFIG_ALSA
@@ -564,16 +551,12 @@ LIBS += $(CONFIG_BLUEZ_LIBS)
 endif
 
 # xen backend driver support
-XEN_OBJS := xen_machine_pv.o xen_backend.o xen_devconfig.o xen_domainbuild.o
-XEN_OBJS += xen_console.o xenfb.o xen_disk.o xen_nic.o
+XEN_OBJS := xen_machine_pv.o xen_domainbuild.o
 ifeq ($(CONFIG_XEN), yes)
   OBJS += $(XEN_OBJS)
   LIBS += $(XEN_LIBS)
 endif
 
-# SCSI layer
-OBJS+= lsi53c895a.o esp.o
-
 # USB layer
 OBJS+= usb-ohci.o
 
@@ -585,7 +568,6 @@ OBJS += rtl8139.o
 OBJS += e1000.o
 
 # Generic watchdog support and some watchdog devices
-OBJS += watchdog.o
 OBJS += wdt_ib700.o wdt_i6300esb.o
 
 ifeq ($(TARGET_BASE_ARCH), i386)
@@ -602,10 +584,10 @@ CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
 # shared objects
 OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o
 # PREP target
-OBJS+= pckbd.o serial.o i8259.o i8254.o fdc.o m48t59.o mc146818rtc.o
+OBJS+= pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o
 OBJS+= prep_pci.o ppc_prep.o
 # Mac shared devices
-OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o escc.o
+OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o
 # OldWorld PowerMac
 OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
 # NewWorld PowerMac
@@ -634,9 +616,24 @@ OBJS+= pflash_cfi01.o
 OBJS+= vmware_vga.o
 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
 endif
+ifeq ($(TARGET_BASE_ARCH), microblaze)
+OBJS+= petalogix_s3adsp1800_mmu.o
+
+OBJS+= microblaze_pic_cpu.o
+OBJS+= xilinx_intc.o
+OBJS+= xilinx_timer.o
+OBJS+= xilinx_uartlite.o
+OBJS+= xilinx_ethlite.o
+
+OBJS+= pflash_cfi02.o
+ifdef FDT_LIBS
+OBJS+= device_tree.o
+LIBS+= $(FDT_LIBS)
+endif
+endif
 ifeq ($(TARGET_BASE_ARCH), cris)
 # Boards
-OBJS+= etraxfs.o axis_dev88.o
+OBJS+= cris_pic_cpu.o etraxfs.o axis_dev88.o
 
 # IO blocks
 OBJS+= etraxfs_dma.o
@@ -645,16 +642,16 @@ OBJS+= etraxfs_eth.o
 OBJS+= etraxfs_timer.o
 OBJS+= etraxfs_ser.o
 
-OBJS+= pflash_cfi02.o nand.o
+OBJS+= pflash_cfi02.o
 endif
 ifeq ($(TARGET_BASE_ARCH), sparc)
 ifeq ($(TARGET_ARCH), sparc64)
 OBJS+= sun4u.o ide.o pckbd.o vga.o apb_pci.o
-OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o
+OBJS+= fdc.o mc146818rtc.o serial.o
 OBJS+= cirrus_vga.o parallel.o
 else
-OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o
-OBJS+= slavio_timer.o escc.o slavio_misc.o fdc.o sparc32_dma.o
+OBJS+= sun4m.o tcx.o iommu.o slavio_intctl.o
+OBJS+= slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o
 OBJS+= cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
 endif
 endif
@@ -669,7 +666,7 @@ OBJS+= arm-semi.o
 OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
 OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
 OBJS+= pflash_cfi01.o gumstix.o
-OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o
+OBJS+= zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o
 OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o
 OBJS+= omap2.o omap_dss.o soc_dma.o omap_spi.o
 OBJS+= omap3.o omap3_boot.o omap3_mmc.o omap3_usb.o beagle.o twl4030.o
@@ -678,6 +675,9 @@ OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
 OBJS+= mst_fpga.o mainstone.o
 OBJS+= musicpal.o pflash_cfi02.o
 OBJS+= framebuffer.o
+OBJS+= syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
+OBJS+= syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
+OBJS+= syborg_virtio.o
 CPPFLAGS += -DHAS_AUDIO
 endif
 ifeq ($(TARGET_BASE_ARCH), sh4)
@@ -689,9 +689,6 @@ ifeq ($(TARGET_BASE_ARCH), m68k)
 OBJS+= an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
 OBJS+= m68k-semi.o dummy_m68k.o
 endif
-ifdef CONFIG_GDBSTUB
-OBJS+=gdbstub.o gdbstub-xml.o
-endif
 ifdef CONFIG_COCOA
 COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
 ifdef CONFIG_COREAUDIO
@@ -738,10 +735,12 @@ endif
 
 vl.o: qemu-options.h
 
-$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
+monitor.o: qemu-monitor.h
 
-$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
-       $(LINK)
+$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS)
+$(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
+$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a $(HWLIB)
+       $(call LINK,$(OBJS))
 
 endif # !CONFIG_USER_ONLY
 
@@ -755,9 +754,13 @@ endif
 qemu-options.h: $(SRC_PATH)/qemu-options.hx
        $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
 
+qemu-monitor.h: $(SRC_PATH)/qemu-monitor.hx
+       $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
+
 clean:
-       rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o qemu-options.h gdbstub-xml.c
+       rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
        rm -f *.d */*.d tcg/*.o
+       rm -f qemu-options.h qemu-monitor.h gdbstub-xml.c
 
 install: all
 ifneq ($(PROGS),)