From 9637443f852a3abb61c0c8f33c567ff87928e845 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Thu, 16 Jul 2009 18:33:58 +0200 Subject: [PATCH] change ifdefs by obj-$(TARGET_BASE_ARCH) Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- Makefile.target | 181 +++++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 88 deletions(-) diff --git a/Makefile.target b/Makefile.target index 54c3568ed9..1037923831 100644 --- a/Makefile.target +++ b/Makefile.target @@ -519,122 +519,127 @@ obj-y += e1000.o # Generic watchdog support and some watchdog devices obj-y += wdt_ib700.o wdt_i6300esb.o -ifeq ($(TARGET_BASE_ARCH), i386) # Hardware support -obj-y += ide.o pckbd.o vga.o $(sound-obj-y) dma.o -obj-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o -obj-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o -obj-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o -obj-y += device-hotplug.o pci-hotplug.o smbios.o +obj-i386-y = ide.o pckbd.o vga.o $(sound-obj-y) dma.o +obj-i386-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o +obj-i386-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o +obj-i386-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o +obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o + +ifeq ($(TARGET_BASE_ARCH), i386) CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif -ifeq ($(TARGET_BASE_ARCH), ppc) -CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE + # shared objects -obj-y += ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o +obj-ppc-y = ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o # PREP target -obj-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o -obj-y += prep_pci.o ppc_prep.o +obj-ppc-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o +obj-ppc-y += prep_pci.o ppc_prep.o # Mac shared devices -obj-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o +obj-ppc-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o # OldWorld PowerMac -obj-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o +obj-ppc-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o # NewWorld PowerMac -obj-y += unin_pci.o ppc_newworld.o +obj-ppc-y += unin_pci.o ppc_newworld.o # PowerPC 4xx boards -obj-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o -obj-y += ppc440.o ppc440_bamboo.o +obj-ppc-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o +obj-ppc-y += ppc440.o ppc440_bamboo.o # PowerPC E500 boards -obj-y += ppce500_pci.o ppce500_mpc8544ds.o +obj-ppc-y += ppce500_pci.o ppce500_mpc8544ds.o +obj-ppc-$(CONFIG_KVM) += kvm_ppc.o + +ifeq ($(TARGET_BASE_ARCH), ppc) +CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE +endif + ifdef FDT_LIBS -obj-y += device_tree.o +obj-ppc-y += device_tree.o LIBS+= $(FDT_LIBS) endif -obj-$(CONFIG_KVM) += kvm_ppc.o -endif + +obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o +obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o +obj-mips-y += g364fb.o jazz_led.o dp8393x.o +obj-mips-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o +obj-mips-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y) +obj-mips-y += mipsnet.o +obj-mips-y += pflash_cfi01.o +obj-mips-y += vmware_vga.o + ifeq ($(TARGET_BASE_ARCH), mips) -obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o -obj-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o -obj-y += g364fb.o jazz_led.o dp8393x.o -obj-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o -obj-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y) -obj-y += mipsnet.o -obj-y += pflash_cfi01.o -obj-y += vmware_vga.o CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif -ifeq ($(TARGET_BASE_ARCH), microblaze) -obj-y += petalogix_s3adsp1800_mmu.o -obj-y += microblaze_pic_cpu.o -obj-y += xilinx_intc.o -obj-y += xilinx_timer.o -obj-y += xilinx_uartlite.o -obj-y += xilinx_ethlite.o +obj-microblaze-y = petalogix_s3adsp1800_mmu.o + +obj-microblaze-y += microblaze_pic_cpu.o +obj-microblaze-y += xilinx_intc.o +obj-microblaze-y += xilinx_timer.o +obj-microblaze-y += xilinx_uartlite.o +obj-microblaze-y += xilinx_ethlite.o + +obj-microblaze-y += pflash_cfi02.o -obj-y += pflash_cfi02.o ifdef FDT_LIBS -obj-y += device_tree.o +obj-microblaze-y += device_tree.o LIBS+= $(FDT_LIBS) endif -endif -ifeq ($(TARGET_BASE_ARCH), cris) + # Boards -obj-y += cris_pic_cpu.o etraxfs.o axis_dev88.o +obj-cris-y = cris_pic_cpu.o etraxfs.o axis_dev88.o # IO blocks -obj-y += etraxfs_dma.o -obj-y += etraxfs_pic.o -obj-y += etraxfs_eth.o -obj-y += etraxfs_timer.o -obj-y += etraxfs_ser.o +obj-cris-y += etraxfs_dma.o +obj-cris-y += etraxfs_pic.o +obj-cris-y += etraxfs_eth.o +obj-cris-y += etraxfs_timer.o +obj-cris-y += etraxfs_ser.o + +obj-cris-y += pflash_cfi02.o -obj-y += pflash_cfi02.o -endif -ifeq ($(TARGET_BASE_ARCH), sparc) ifeq ($(TARGET_ARCH), sparc64) -obj-y += sun4u.o ide.o pckbd.o vga.o apb_pci.o -obj-y += fdc.o mc146818rtc.o serial.o -obj-y += cirrus_vga.o parallel.o +obj-sparc-y = sun4u.o ide.o pckbd.o vga.o apb_pci.o +obj-sparc-y += fdc.o mc146818rtc.o serial.o +obj-sparc-y += cirrus_vga.o parallel.o else -obj-y += sun4m.o tcx.o iommu.o slavio_intctl.o -obj-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o -obj-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o -endif -endif +obj-sparc-y = sun4m.o tcx.o iommu.o slavio_intctl.o +obj-sparc-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o +obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o +endif + +obj-arm-y = integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o +obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o +obj-arm-y += versatile_pci.o +obj-arm-y += realview_gic.o realview.o arm_sysctl.o mpcore.o +obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o +obj-arm-y += pl061.o +obj-arm-y += arm-semi.o +obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o +obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o +obj-arm-y += pflash_cfi01.o gumstix.o +obj-arm-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o +obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o +obj-arm-y += omap2.o omap_dss.o soc_dma.o +obj-arm-y += omap_sx1.o palm.o tsc210x.o +obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o +obj-arm-y += mst_fpga.o mainstone.o +obj-arm-y += musicpal.o pflash_cfi02.o +obj-arm-y += framebuffer.o +obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o +obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o +obj-arm-y += syborg_virtio.o + ifeq ($(TARGET_BASE_ARCH), arm) -obj-y += integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o -obj-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o -obj-y += versatile_pci.o -obj-y += realview_gic.o realview.o arm_sysctl.o mpcore.o -obj-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o -obj-y += pl061.o -obj-y += arm-semi.o -obj-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o -obj-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o -obj-y += pflash_cfi01.o gumstix.o -obj-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o -obj-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o -obj-y += omap2.o omap_dss.o soc_dma.o -obj-y += omap_sx1.o palm.o tsc210x.o -obj-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o -obj-y += mst_fpga.o mainstone.o -obj-y += musicpal.o pflash_cfi02.o -obj-y += framebuffer.o -obj-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o -obj-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o -obj-y += syborg_virtio.o CPPFLAGS += -DHAS_AUDIO endif -ifeq ($(TARGET_BASE_ARCH), sh4) -obj-y += shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o -obj-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o -obj-y += ide.o -endif -ifeq ($(TARGET_BASE_ARCH), m68k) -obj-y += an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o -obj-y += m68k-semi.o dummy_m68k.o -endif + +obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o +obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o +obj-sh4-y += ide.o + +obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o +obj-m68k-y += m68k-semi.o dummy_m68k.o + ifdef CONFIG_COCOA COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit ifdef CONFIG_COREAUDIO @@ -685,8 +690,8 @@ monitor.o: qemu-monitor.h $(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): $(obj-y) ../libqemu_common.a libqemu.a $(HWLIB) - $(call LINK,$(obj-y)) +$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../libqemu_common.a libqemu.a $(HWLIB) + $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) endif # !CONFIG_USER_ONLY -- 2.34.1