5 include $(SRC_PATH)/rules.mak
7 LDFLAGS_BASE:=$(LDFLAGS)
8 TARGET_BASE_ARCH:=$(TARGET_ARCH)
9 ifeq ($(TARGET_ARCH), x86_64)
10 TARGET_BASE_ARCH:=i386
12 ifeq ($(TARGET_ARCH), mipsn32)
13 TARGET_BASE_ARCH:=mips
15 ifeq ($(TARGET_ARCH), mips64)
16 TARGET_BASE_ARCH:=mips
18 ifeq ($(TARGET_ARCH), ppc64)
21 ifeq ($(TARGET_ARCH), ppc64h)
24 ifeq ($(TARGET_ARCH), ppcemb)
27 ifeq ($(TARGET_ARCH), sparc64)
28 TARGET_BASE_ARCH:=sparc
30 ifeq ($(TARGET_ARCH), ia64)
31 TARGET_BASE_ARCH:=ia64
33 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
34 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
35 CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
40 TARGET_ARCH2=$(TARGET_ARCH)
42 ifeq ($(TARGET_ARCH),arm)
43 ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
47 ifeq ($(TARGET_ARCH),sh4)
48 ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
52 ifeq ($(TARGET_ARCH),mips)
53 ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
57 ifeq ($(TARGET_ARCH),mipsn32)
58 ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
59 TARGET_ARCH2=mipsn32el
62 ifeq ($(TARGET_ARCH),mips64)
63 ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
68 ifdef CONFIG_USER_ONLY
70 QEMU_PROG=qemu-$(TARGET_ARCH2)
72 # system emulator name
73 ifeq ($(TARGET_ARCH), i386)
74 QEMU_PROG=qemu$(EXESUF)
76 QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
83 # Usage: CFLAGS+=$(call cc-option, $(CFLAGS), -falign-functions=0, -malign-functions=0)
85 cc-option = $(shell if $(CC) $(1) $(2) -S -o /dev/null -xc /dev/null \
86 > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi ;)
91 HELPER_CFLAGS+=-fomit-frame-pointer
94 ifeq ($(subst ppc64,ppc,$(ARCH))$(TARGET_BASE_ARCH),ppcppc)
95 translate.o: CFLAGS := $(CFLAGS) $(call cc-option, $(CFLAGS), -fno-unit-at-a-time,)
99 ifneq ($(CONFIG_SOLARIS),yes)
100 HELPER_CFLAGS+=-ffixed-i0
105 # Ensure there's only a single GP
110 BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
117 CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)
118 LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)
120 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
121 CPPFLAGS+=-U_FORTIFY_SOURCE
125 LIBS+=-lwinmm -lws2_32 -liphlpapi
128 LIBS+=-lsocket -lnsl -lresolv
129 ifdef NEEDS_LIBSUNMATH
131 LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
132 CFLAGS+=-I/opt/SUNWspro/prod/include/cc
136 kvm.o: CFLAGS+=$(KVM_CFLAGS)
137 kvm-all.o: CFLAGS+=$(KVM_CFLAGS)
139 CFLAGS += $(KVM_CFLAGS)
142 # Dummy command so that make thinks it has done something
145 #########################################################
146 # cpu emulator library
147 libobj-y = exec.o cpu-exec.o host-utils.o
148 ifeq ($(NO_CPU_EMULATION), 1)
149 libobj-y += fack-exec.o
151 libobj-y += translate-all.o translate.o
153 libobj-$(CONFIG_KQEMU) += kqemu.o
155 ifneq ($(NO_CPU_EMULATION), 1)
156 libobj-y += tcg/tcg.o tcg/tcg-runtime.o
157 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
159 ifeq ($(ARCH),sparc64)
160 CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
164 libobj-y += qemu-kvm.o
166 ifdef CONFIG_SOFTFLOAT
167 libobj-y += fpu/softfloat.o
169 libobj-y += fpu/softfloat-native.o
171 CPPFLAGS+=-I$(SRC_PATH)/fpu
172 libobj-y += op_helper.o helper.o
174 ifeq ($(TARGET_ARCH), i386)
177 libobj-y += qemu-kvm-x86.o kvm-tpr-opt.o
178 libobj-y += qemu-kvm-helper.o
182 ifeq ($(TARGET_ARCH), x86_64)
185 libobj-y += qemu-kvm-x86.o kvm-tpr-opt.o
186 libobj-y += qemu-kvm-helper.o
190 libobj-y += op_helper.o
192 ifneq ($(TARGET_ARCH), ia64)
196 ifeq ($(TARGET_BASE_ARCH), arm)
197 libobj-y += neon_helper.o iwmmxt_helper.o
200 ifeq ($(TARGET_BASE_ARCH), alpha)
201 libobj-y += alpha_palcode.o
204 ifeq ($(TARGET_BASE_ARCH), ia64)
205 libobj-y += op_helper.o firmware.o
207 libobj-y += qemu-kvm-ia64.o
211 ifeq ($(TARGET_BASE_ARCH), cris)
212 libobj-y += cris-dis.o
214 ifndef CONFIG_USER_ONLY
220 # NOTE: the disassembler code is only needed for debugging
222 ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
225 ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
228 libobj-$(USE_I386_DIS) += i386-dis.o
229 ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha)
230 libobj-y += alpha-dis.o
232 ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc)
233 libobj-y += ppc-dis.o
235 ifeq ($(findstring microblaze, $(TARGET_BASE_ARCH) $(ARCH)),microblaze)
236 libobj-y += microblaze-dis.o
237 ifndef CONFIG_USER_ONLY
241 ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips)
242 libobj-y += mips-dis.o
244 ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc)
245 libobj-y += sparc-dis.o
247 ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
248 libobj-y += arm-dis.o
250 ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k)
251 libobj-y += m68k-dis.o
253 ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4)
254 libobj-y += sh4-dis.o
256 ifeq ($(findstring hppa, $(TARGET_BASE_ARCH) $(ARCH)),hppa)
257 libobj-y += hppa-dis.o
259 ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390)
260 libobj-y += s390-dis.o
265 libqemu.a: $(libobj-y)
267 translate.o: translate.c cpu.h
269 translate-all.o: translate-all.c cpu.h
273 # HELPER_CFLAGS is used for all the code compiled with static register
275 op_helper.o: CFLAGS += $(HELPER_CFLAGS) $(I386_CFLAGS)
277 cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
279 qemu-kvm-helper.o: qemu-kvm-helper.c
280 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
282 #########################################################
283 # Linux user emulator target
285 ifdef CONFIG_LINUX_USER
287 ifndef TARGET_ABI_DIR
288 TARGET_ABI_DIR=$(TARGET_ARCH)
290 VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
291 CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
305 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
307 # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
308 # that the kernel ELF loader considers as an executable. I think this
309 # is the simplest way to make it self virtualizable!
314 ifeq ($(ARCH),x86_64)
315 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
319 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
323 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
327 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
331 # -static is used to avoid g1/g3 usage by the dynamic linker
332 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
335 ifeq ($(ARCH),sparc64)
336 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
340 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
344 LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
348 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
352 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
356 ifeq ($(WORDS_BIGENDIAN),yes)
357 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
359 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
363 ifeq ($(ARCH),mips64)
364 ifeq ($(WORDS_BIGENDIAN),yes)
365 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
367 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
377 obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
378 elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o
379 LIBS+= $(PTHREADLIBS)
381 obj-$(TARGET_HAS_BFLT) += flatload.o
383 ifdef TARGET_HAS_ELFLOAD32
384 elfload32.o: elfload.c
386 obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o
388 ifeq ($(TARGET_ARCH), i386)
391 ifeq ($(TARGET_ARCH), arm)
392 obj-y += nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \
393 nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \
394 nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o
396 ifeq ($(TARGET_ARCH), m68k)
397 obj-y += m68k-sim.o m68k-semi.o
400 # Note: this is a workaround. The real fix is to avoid compiling
401 # cpu_signal_handler() in cpu-exec.c.
402 signal.o: CFLAGS += $(HELPER_CFLAGS)
404 $(QEMU_PROG): ARLIBS=../libqemu_user.a libqemu.a
405 $(QEMU_PROG): $(obj-y) ../libqemu_user.a libqemu.a
406 $(call LINK,$(obj-y))
408 # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
409 # the address space (31 bit so sign extending doesn't matter)
410 echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc
413 endif #CONFIG_LINUX_USER
415 #########################################################
416 # Darwin user emulator target
418 ifdef CONFIG_DARWIN_USER
420 VPATH+=:$(SRC_PATH)/darwin-user
421 CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
423 # Leave some space for the regular program loading zone
424 LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
428 obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
429 gdbstub.o gdbstub-xml.o
431 # Note: this is a workaround. The real fix is to avoid compiling
432 # cpu_signal_handler() in cpu-exec.c.
433 signal.o: CFLAGS += $(HELPER_CFLAGS)
435 $(QEMU_PROG): ARLIBS=libqemu.a
436 $(QEMU_PROG): $(obj-y) libqemu.a
437 $(call LINK,$(obj-y))
439 endif #CONFIG_DARWIN_USER
441 #########################################################
442 # BSD user emulator target
444 ifdef CONFIG_BSD_USER
446 VPATH+=:$(SRC_PATH)/bsd-user
447 CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
461 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
463 # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
464 # that the kernel ELF loader considers as an executable. I think this
465 # is the simplest way to make it self virtualizable!
470 ifeq ($(ARCH),x86_64)
471 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
475 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
479 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
483 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
487 # -static is used to avoid g1/g3 usage by the dynamic linker
488 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
491 ifeq ($(ARCH),sparc64)
492 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
496 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
500 LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
504 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
508 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
512 ifeq ($(WORDS_BIGENDIAN),yes)
513 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
515 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
519 ifeq ($(ARCH),mips64)
520 ifeq ($(WORDS_BIGENDIAN),yes)
521 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
523 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
527 obj-y = main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \
528 gdbstub.o gdbstub-xml.o
531 # Note: this is a workaround. The real fix is to avoid compiling
532 # cpu_signal_handler() in cpu-exec.c.
533 signal.o: CFLAGS += $(HELPER_CFLAGS)
535 $(QEMU_PROG): ARLIBS=libqemu.a ../libqemu_user.a
536 $(QEMU_PROG): $(obj-y) libqemu.a ../libqemu_user.a
537 $(call LINK,$(obj-y))
539 endif #CONFIG_BSD_USER
541 #########################################################
542 # System emulator target
543 ifndef CONFIG_USER_ONLY
545 obj-y = vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o \
546 gdbstub.o gdbstub-xml.o msix.o
547 # virtio has to be here due to weird dependency between PCI and virtio-net.
548 # need to fix this properly
549 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
550 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
560 LIBS += -lpulse-simple
563 LIBS += -lole32 -ldxguid
566 LIBS += $(CONFIG_FMOD_LIB)
569 LIBS += $(CONFIG_OSS_LIB)
572 sound-obj-y = sb16.o es1370.o ac97.o
574 sound-obj-y += fmopl.o adlib.o
575 adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
578 sound-obj-y += gus.o gusemu_hal.o gusemu_mixer.o
581 sound-obj-y += cs4231a.o
585 CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
586 LIBS += $(CONFIG_VNC_TLS_LIBS)
589 ifdef CONFIG_VNC_SASL
590 CPPFLAGS += $(CONFIG_VNC_SASL_CFLAGS)
591 LIBS += $(CONFIG_VNC_SASL_LIBS)
595 LIBS += $(CONFIG_BLUEZ_LIBS)
598 # xen backend driver support
599 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
600 ifeq ($(CONFIG_XEN), yes)
614 # Generic watchdog support and some watchdog devices
615 obj-y += wdt_ib700.o wdt_i6300esb.o
617 ifeq ($(USE_KVM_DEVICE_ASSIGNMENT), 1)
618 obj-y += device-assignment.o
622 ifeq ($(TARGET_BASE_ARCH), i386)
624 obj-y += ide.o pckbd.o vga.o $(sound-obj-y) dma.o
625 obj-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
626 obj-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
627 obj-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
628 obj-y += device-hotplug.o pci-hotplug.o smbios.o
630 ifeq ($(USE_KVM_PIT), 1)
633 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
635 ifeq ($(TARGET_BASE_ARCH), ia64)
637 obj-y += ide.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
638 obj-y += fdc.o mc146818rtc.o serial.o i8259.o ipf.o
639 obj-y += cirrus_vga.o parallel.o acpi.o piix_pci.o
642 ifeq ($(TARGET_BASE_ARCH), ppc)
643 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
645 obj-y += ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o
646 obj-y += cirrus_vga.o
648 obj-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o
649 obj-y += prep_pci.o ppc_prep.o
651 obj-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o
653 obj-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o
655 obj-y += unin_pci.o ppc_newworld.o
657 obj-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
658 obj-y += ppc440.o ppc440_bamboo.o
659 # PowerPC E500 boards
660 obj-y += ppce500_pci.o ppce500_mpc8544ds.o
662 obj-y += device_tree.o
665 obj-$(CONFIG_KVM) += kvm_ppc.o
667 ifeq ($(TARGET_BASE_ARCH), mips)
668 obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
669 obj-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o
670 obj-y += g364fb.o jazz_led.o dp8393x.o
671 obj-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
672 obj-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y)
674 obj-y += pflash_cfi01.o
675 obj-y += vmware_vga.o
676 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
678 ifeq ($(TARGET_BASE_ARCH), microblaze)
679 obj-y += petalogix_s3adsp1800_mmu.o
681 obj-y += microblaze_pic_cpu.o
682 obj-y += xilinx_intc.o
683 obj-y += xilinx_timer.o
684 obj-y += xilinx_uartlite.o
685 obj-y += xilinx_ethlite.o
687 obj-y += pflash_cfi02.o
689 obj-y += device_tree.o
693 ifeq ($(TARGET_BASE_ARCH), cris)
695 obj-y += cris_pic_cpu.o etraxfs.o axis_dev88.o
698 obj-y += etraxfs_dma.o
699 obj-y += etraxfs_pic.o
700 obj-y += etraxfs_eth.o
701 obj-y += etraxfs_timer.o
702 obj-y += etraxfs_ser.o
704 obj-y += pflash_cfi02.o
706 ifeq ($(TARGET_BASE_ARCH), sparc)
707 ifeq ($(TARGET_ARCH), sparc64)
708 obj-y += sun4u.o ide.o pckbd.o vga.o apb_pci.o
709 obj-y += fdc.o mc146818rtc.o serial.o
710 obj-y += cirrus_vga.o parallel.o
712 obj-y += sun4m.o tcx.o iommu.o slavio_intctl.o
713 obj-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o
714 obj-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
717 ifeq ($(TARGET_BASE_ARCH), arm)
718 obj-y += integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o
719 obj-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
720 obj-y += versatile_pci.o
721 obj-y += realview_gic.o realview.o arm_sysctl.o mpcore.o
722 obj-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
725 obj-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
726 obj-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
727 obj-y += pflash_cfi01.o gumstix.o
728 obj-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o
729 obj-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o
730 obj-y += omap2.o omap_dss.o soc_dma.o
731 obj-y += omap_sx1.o palm.o tsc210x.o
732 obj-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
733 obj-y += mst_fpga.o mainstone.o
734 obj-y += musicpal.o pflash_cfi02.o
735 obj-y += framebuffer.o
736 obj-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
737 obj-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
738 obj-y += syborg_virtio.o
739 CPPFLAGS += -DHAS_AUDIO
741 ifeq ($(TARGET_BASE_ARCH), sh4)
742 obj-y += shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
743 obj-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
746 ifeq ($(TARGET_BASE_ARCH), m68k)
747 obj-y += an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
748 obj-y += m68k-semi.o dummy_m68k.o
751 COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
752 ifdef CONFIG_COREAUDIO
753 COCOA_LIBS+=-framework CoreAudio
757 CPPFLAGS+=-I$(SRC_PATH)/slirp
762 # specific flags are needed for non soft mmu emulator
768 ifndef CONFIG_SOLARIS
781 LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
785 SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
793 ifeq ($(TARGET_ARCH), ia64)
794 firmware.o: firmware.c
795 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
798 vl.o: CFLAGS+=$(SDL_CFLAGS)
802 monitor.o: qemu-monitor.h
804 $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS)
805 $(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
806 $(QEMU_PROG): $(obj-y) ../libqemu_common.a libqemu.a $(HWLIB)
807 $(call LINK,$(obj-y))
809 $(QEMU_PROG): ARLIBS += $(DEPLIBS)
810 $(QEMU_PROG): $(DEPLIBS)
812 endif # !CONFIG_USER_ONLY
814 gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh
815 ifeq ($(TARGET_XML_FILES),)
816 $(call quiet-command,rm -f $@ && echo > $@," GEN $(TARGET_DIR)$@")
818 $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
821 qemu-options.h: $(SRC_PATH)/qemu-options.hx
822 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
824 qemu-monitor.h: $(SRC_PATH)/qemu-monitor.hx
825 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
828 rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
829 rm -f *.d */*.d tcg/*.o
830 rm -f qemu-options.h qemu-monitor.h gdbstub-xml.c
834 $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
837 # Include automatically generated dependency files
838 -include $(wildcard *.d */*.d)