Commit 9637443f852a3abb61c0c8f33c567ff87928e845

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent d2917a47

change ifdefs by obj-$(TARGET_BASE_ARCH)

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 93 additions and 88 deletions
Makefile.target
... ... @@ -519,122 +519,127 @@ obj-y += e1000.o
519 519 # Generic watchdog support and some watchdog devices
520 520 obj-y += wdt_ib700.o wdt_i6300esb.o
521 521  
522   -ifeq ($(TARGET_BASE_ARCH), i386)
523 522 # Hardware support
524   -obj-y += ide.o pckbd.o vga.o $(sound-obj-y) dma.o
525   -obj-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
526   -obj-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
527   -obj-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
528   -obj-y += device-hotplug.o pci-hotplug.o smbios.o
  523 +obj-i386-y = ide.o pckbd.o vga.o $(sound-obj-y) dma.o
  524 +obj-i386-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
  525 +obj-i386-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
  526 +obj-i386-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
  527 +obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o
  528 +
  529 +ifeq ($(TARGET_BASE_ARCH), i386)
529 530 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
530 531 endif
531   -ifeq ($(TARGET_BASE_ARCH), ppc)
532   -CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
  532 +
533 533 # shared objects
534   -obj-y += ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o
  534 +obj-ppc-y = ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o
535 535 # PREP target
536   -obj-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o
537   -obj-y += prep_pci.o ppc_prep.o
  536 +obj-ppc-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o
  537 +obj-ppc-y += prep_pci.o ppc_prep.o
538 538 # Mac shared devices
539   -obj-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o
  539 +obj-ppc-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o
540 540 # OldWorld PowerMac
541   -obj-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o
  541 +obj-ppc-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o
542 542 # NewWorld PowerMac
543   -obj-y += unin_pci.o ppc_newworld.o
  543 +obj-ppc-y += unin_pci.o ppc_newworld.o
544 544 # PowerPC 4xx boards
545   -obj-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
546   -obj-y += ppc440.o ppc440_bamboo.o
  545 +obj-ppc-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
  546 +obj-ppc-y += ppc440.o ppc440_bamboo.o
547 547 # PowerPC E500 boards
548   -obj-y += ppce500_pci.o ppce500_mpc8544ds.o
  548 +obj-ppc-y += ppce500_pci.o ppce500_mpc8544ds.o
  549 +obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
  550 +
  551 +ifeq ($(TARGET_BASE_ARCH), ppc)
  552 +CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
  553 +endif
  554 +
549 555 ifdef FDT_LIBS
550   -obj-y += device_tree.o
  556 +obj-ppc-y += device_tree.o
551 557 LIBS+= $(FDT_LIBS)
552 558 endif
553   -obj-$(CONFIG_KVM) += kvm_ppc.o
554   -endif
  559 +
  560 +obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
  561 +obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o
  562 +obj-mips-y += g364fb.o jazz_led.o dp8393x.o
  563 +obj-mips-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
  564 +obj-mips-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y)
  565 +obj-mips-y += mipsnet.o
  566 +obj-mips-y += pflash_cfi01.o
  567 +obj-mips-y += vmware_vga.o
  568 +
555 569 ifeq ($(TARGET_BASE_ARCH), mips)
556   -obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
557   -obj-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o
558   -obj-y += g364fb.o jazz_led.o dp8393x.o
559   -obj-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
560   -obj-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y)
561   -obj-y += mipsnet.o
562   -obj-y += pflash_cfi01.o
563   -obj-y += vmware_vga.o
564 570 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
565 571 endif
566   -ifeq ($(TARGET_BASE_ARCH), microblaze)
567   -obj-y += petalogix_s3adsp1800_mmu.o
568 572  
569   -obj-y += microblaze_pic_cpu.o
570   -obj-y += xilinx_intc.o
571   -obj-y += xilinx_timer.o
572   -obj-y += xilinx_uartlite.o
573   -obj-y += xilinx_ethlite.o
  573 +obj-microblaze-y = petalogix_s3adsp1800_mmu.o
  574 +
  575 +obj-microblaze-y += microblaze_pic_cpu.o
  576 +obj-microblaze-y += xilinx_intc.o
  577 +obj-microblaze-y += xilinx_timer.o
  578 +obj-microblaze-y += xilinx_uartlite.o
  579 +obj-microblaze-y += xilinx_ethlite.o
  580 +
  581 +obj-microblaze-y += pflash_cfi02.o
574 582  
575   -obj-y += pflash_cfi02.o
576 583 ifdef FDT_LIBS
577   -obj-y += device_tree.o
  584 +obj-microblaze-y += device_tree.o
578 585 LIBS+= $(FDT_LIBS)
579 586 endif
580   -endif
581   -ifeq ($(TARGET_BASE_ARCH), cris)
  587 +
582 588 # Boards
583   -obj-y += cris_pic_cpu.o etraxfs.o axis_dev88.o
  589 +obj-cris-y = cris_pic_cpu.o etraxfs.o axis_dev88.o
584 590  
585 591 # IO blocks
586   -obj-y += etraxfs_dma.o
587   -obj-y += etraxfs_pic.o
588   -obj-y += etraxfs_eth.o
589   -obj-y += etraxfs_timer.o
590   -obj-y += etraxfs_ser.o
  592 +obj-cris-y += etraxfs_dma.o
  593 +obj-cris-y += etraxfs_pic.o
  594 +obj-cris-y += etraxfs_eth.o
  595 +obj-cris-y += etraxfs_timer.o
  596 +obj-cris-y += etraxfs_ser.o
  597 +
  598 +obj-cris-y += pflash_cfi02.o
591 599  
592   -obj-y += pflash_cfi02.o
593   -endif
594   -ifeq ($(TARGET_BASE_ARCH), sparc)
595 600 ifeq ($(TARGET_ARCH), sparc64)
596   -obj-y += sun4u.o ide.o pckbd.o vga.o apb_pci.o
597   -obj-y += fdc.o mc146818rtc.o serial.o
598   -obj-y += cirrus_vga.o parallel.o
  601 +obj-sparc-y = sun4u.o ide.o pckbd.o vga.o apb_pci.o
  602 +obj-sparc-y += fdc.o mc146818rtc.o serial.o
  603 +obj-sparc-y += cirrus_vga.o parallel.o
599 604 else
600   -obj-y += sun4m.o tcx.o iommu.o slavio_intctl.o
601   -obj-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o
602   -obj-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
603   -endif
604   -endif
  605 +obj-sparc-y = sun4m.o tcx.o iommu.o slavio_intctl.o
  606 +obj-sparc-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o
  607 +obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
  608 +endif
  609 +
  610 +obj-arm-y = integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o
  611 +obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
  612 +obj-arm-y += versatile_pci.o
  613 +obj-arm-y += realview_gic.o realview.o arm_sysctl.o mpcore.o
  614 +obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
  615 +obj-arm-y += pl061.o
  616 +obj-arm-y += arm-semi.o
  617 +obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
  618 +obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
  619 +obj-arm-y += pflash_cfi01.o gumstix.o
  620 +obj-arm-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o
  621 +obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o
  622 +obj-arm-y += omap2.o omap_dss.o soc_dma.o
  623 +obj-arm-y += omap_sx1.o palm.o tsc210x.o
  624 +obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
  625 +obj-arm-y += mst_fpga.o mainstone.o
  626 +obj-arm-y += musicpal.o pflash_cfi02.o
  627 +obj-arm-y += framebuffer.o
  628 +obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
  629 +obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
  630 +obj-arm-y += syborg_virtio.o
  631 +
605 632 ifeq ($(TARGET_BASE_ARCH), arm)
606   -obj-y += integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o
607   -obj-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
608   -obj-y += versatile_pci.o
609   -obj-y += realview_gic.o realview.o arm_sysctl.o mpcore.o
610   -obj-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
611   -obj-y += pl061.o
612   -obj-y += arm-semi.o
613   -obj-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
614   -obj-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
615   -obj-y += pflash_cfi01.o gumstix.o
616   -obj-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o
617   -obj-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o
618   -obj-y += omap2.o omap_dss.o soc_dma.o
619   -obj-y += omap_sx1.o palm.o tsc210x.o
620   -obj-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
621   -obj-y += mst_fpga.o mainstone.o
622   -obj-y += musicpal.o pflash_cfi02.o
623   -obj-y += framebuffer.o
624   -obj-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
625   -obj-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
626   -obj-y += syborg_virtio.o
627 633 CPPFLAGS += -DHAS_AUDIO
628 634 endif
629   -ifeq ($(TARGET_BASE_ARCH), sh4)
630   -obj-y += shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
631   -obj-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
632   -obj-y += ide.o
633   -endif
634   -ifeq ($(TARGET_BASE_ARCH), m68k)
635   -obj-y += an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
636   -obj-y += m68k-semi.o dummy_m68k.o
637   -endif
  635 +
  636 +obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
  637 +obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
  638 +obj-sh4-y += ide.o
  639 +
  640 +obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
  641 +obj-m68k-y += m68k-semi.o dummy_m68k.o
  642 +
638 643 ifdef CONFIG_COCOA
639 644 COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
640 645 ifdef CONFIG_COREAUDIO
... ... @@ -685,8 +690,8 @@ monitor.o: qemu-monitor.h
685 690  
686 691 $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS)
687 692 $(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
688   -$(QEMU_PROG): $(obj-y) ../libqemu_common.a libqemu.a $(HWLIB)
689   - $(call LINK,$(obj-y))
  693 +$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ../libqemu_common.a libqemu.a $(HWLIB)
  694 + $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
690 695  
691 696 endif # !CONFIG_USER_ONLY
692 697  
... ...