6 LDFLAGS_BASE:=$(LDFLAGS)
7 TARGET_BASE_ARCH:=$(TARGET_ARCH)
8 ifeq ($(TARGET_ARCH), x86_64)
11 ifeq ($(TARGET_ARCH), mipsn32)
12 TARGET_BASE_ARCH:=mips
14 ifeq ($(TARGET_ARCH), mips64)
15 TARGET_BASE_ARCH:=mips
17 ifeq ($(TARGET_ARCH), ppc64)
20 ifeq ($(TARGET_ARCH), ppc64h)
23 ifeq ($(TARGET_ARCH), ppcemb)
26 ifeq ($(TARGET_ARCH), sparc64)
27 TARGET_BASE_ARCH:=sparc
29 ifeq ($(TARGET_ARCH), ia64)
30 TARGET_BASE_ARCH:=ia64
32 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
33 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
34 CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
39 TARGET_ARCH2=$(TARGET_ARCH)
41 ifeq ($(TARGET_ARCH),arm)
42 ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
46 ifeq ($(TARGET_ARCH),sh4)
47 ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
51 ifeq ($(TARGET_ARCH),mips)
52 ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
56 ifeq ($(TARGET_ARCH),mipsn32)
57 ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
58 TARGET_ARCH2=mipsn32el
61 ifeq ($(TARGET_ARCH),mips64)
62 ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
67 ifdef CONFIG_USER_ONLY
69 QEMU_PROG=qemu-$(TARGET_ARCH2)
71 # system emulator name
72 ifeq ($(TARGET_ARCH), i386)
73 QEMU_PROG=qemu$(EXESUF)
75 QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
81 # We require -O2 to avoid the stack setup prologue in EXIT_TB
82 OP_CFLAGS := -O2 -g -fno-strict-aliasing
83 OP_CFLAGS += -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
86 # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
88 cc-option = $(shell if $(CC) $(OP_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
89 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
91 OP_CFLAGS+=$(call cc-option, -fno-reorder-blocks, "")
92 OP_CFLAGS+=$(call cc-option, -fno-gcse, "")
93 OP_CFLAGS+=$(call cc-option, -fno-tree-ch, "")
94 OP_CFLAGS+=$(call cc-option, -fno-optimize-sibling-calls, "")
95 OP_CFLAGS+=$(call cc-option, -fno-crossjumping, "")
96 OP_CFLAGS+=$(call cc-option, -fno-align-labels, "")
97 OP_CFLAGS+=$(call cc-option, -fno-align-jumps, "")
98 OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, ""))
99 OP_CFLAGS+=$(call cc-option, -fno-section-anchors, "")
104 HELPER_CFLAGS+=-fomit-frame-pointer
105 OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
109 CFLAGS+=-ffixed-g2 -ffixed-g3
110 OP_CFLAGS+=-fno-delayed-branch -ffixed-i0
111 ifeq ($(CONFIG_SOLARIS),yes)
112 OP_CFLAGS+=-fno-omit-frame-pointer
114 CFLAGS+=-ffixed-g1 -ffixed-g6
115 HELPER_CFLAGS+=-ffixed-i0
119 ifeq ($(ARCH),sparc64)
120 OP_CFLAGS+=-mcpu=ultrasparc -m64 -fno-delayed-branch -ffixed-i0
121 ifneq ($(CONFIG_SOLARIS),yes)
122 CFLAGS+=-ffixed-g5 -ffixed-g6 -ffixed-g7
123 OP_CFLAGS+=-ffixed-g5 -ffixed-g6 -ffixed-g7
125 CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7
130 # -msmall-data is not used for OP_CFLAGS because we want two-instruction
131 # relocations for the constant constructions
132 # Ensure there's only a single GP
137 OP_CFLAGS=-O1 -fno-delayed-branch
138 BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
143 OP_CFLAGS+=-mno-sdata
147 OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointer
151 OP_CFLAGS+=-fomit-frame-pointer
155 OP_CFLAGS+=-mabi=32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0
158 ifeq ($(ARCH),mips64)
159 OP_CFLAGS+=-mabi=n32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0
162 CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)
163 LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)
164 OP_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)
166 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__user=
169 LIBS+=-lwinmm -lws2_32 -liphlpapi
172 LIBS+=-lsocket -lnsl -lresolv
173 ifdef NEEDS_LIBSUNMATH
175 LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
176 OP_CFLAGS+=-I/opt/SUNWspro/prod/include/cc
177 CFLAGS+=-I/opt/SUNWspro/prod/include/cc
181 kvm.o: CFLAGS+=$(KVM_CFLAGS)
182 kvm-all.o: CFLAGS+=$(KVM_CFLAGS)
186 #########################################################
187 # cpu emulator library
188 LIBOBJS=exec.o kqemu.o cpu-exec.o host-utils.o
190 ifeq ($(NO_CPU_EMULATION), 1)
193 LIBOBJS+= translate-all.o translate.o
195 LIBOBJS+= tcg/tcg.o tcg/tcg-runtime.o
196 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
198 ifeq ($(ARCH),sparc64)
199 CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
205 ifdef CONFIG_SOFTFLOAT
206 LIBOBJS+=fpu/softfloat.o
208 LIBOBJS+=fpu/softfloat-native.o
210 CPPFLAGS+=-I$(SRC_PATH)/fpu
211 LIBOBJS+= op_helper.o helper.o
213 ifeq ($(TARGET_ARCH), i386)
216 LIBOBJS+=qemu-kvm-x86.o kvm-tpr-opt.o
217 LIBOBJS+=qemu-kvm-helper.o
221 ifeq ($(TARGET_ARCH), x86_64)
224 LIBOBJS+=qemu-kvm-x86.o kvm-tpr-opt.o
225 LIBOBJS+=qemu-kvm-helper.o
229 LIBOBJS+= op_helper.o
231 ifneq ($(TARGET_ARCH), ia64)
235 ifeq ($(TARGET_BASE_ARCH), arm)
236 LIBOBJS+= neon_helper.o iwmmxt_helper.o
239 ifeq ($(TARGET_BASE_ARCH), alpha)
240 LIBOBJS+= alpha_palcode.o
243 ifeq ($(TARGET_BASE_ARCH), ia64)
244 LIBOBJS+=op_helper.o firmware.o
246 LIBOBJS+=qemu-kvm-ia64.o
250 ifeq ($(TARGET_BASE_ARCH), cris)
253 ifndef CONFIG_USER_ONLY
259 # NOTE: the disassembler code is only needed for debugging
261 ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
264 ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
270 ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha)
273 ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc)
276 ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips)
279 ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc)
282 ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
285 ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k)
288 ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4)
291 ifeq ($(findstring hppa, $(TARGET_BASE_ARCH) $(ARCH)),hppa)
294 ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390)
300 libqemu.a: $(LIBOBJS)
302 $(AR) rcs $@ $(LIBOBJS)
304 translate.o: translate.c cpu.h
306 translate-all.o: translate-all.c cpu.h
311 $(CC) $(OP_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
313 # HELPER_CFLAGS is used for all the code compiled with static register
315 op_helper.o: op_helper.c
316 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(I386_CFLAGS) -c -o $@ $<
318 cpu-exec.o: cpu-exec.c
319 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
321 qemu-kvm-helper.o: qemu-kvm-helper.c
322 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
324 #########################################################
325 # Linux user emulator target
327 ifdef CONFIG_LINUX_USER
329 ifndef TARGET_ABI_DIR
330 TARGET_ABI_DIR=$(TARGET_ARCH)
332 VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
333 CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
347 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
349 # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
350 # that the kernel ELF loader considers as an executable. I think this
351 # is the simplest way to make it self virtualizable!
356 ifeq ($(ARCH),x86_64)
357 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
361 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
365 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
369 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
373 # -static is used to avoid g1/g3 usage by the dynamic linker
374 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
377 ifeq ($(ARCH),sparc64)
378 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
382 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
386 LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
390 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
394 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
398 ifeq ($(WORDS_BIGENDIAN),yes)
399 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
401 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
405 ifeq ($(ARCH),mips64)
406 ifeq ($(WORDS_BIGENDIAN),yes)
407 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
409 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
419 OBJS= main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
420 elfload.o linuxload.o uaccess.o
422 ifdef TARGET_HAS_BFLT
425 ifdef TARGET_HAS_ELFLOAD32
427 elfload32.o: elfload.c
430 ifeq ($(TARGET_ARCH), i386)
433 ifeq ($(TARGET_ARCH), arm)
434 OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \
435 nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \
436 nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o
438 ifeq ($(TARGET_ARCH), m68k)
439 OBJS+= m68k-sim.o m68k-semi.o
443 OBJS+=gdbstub.o gdbstub-xml.o
448 # Note: this is a workaround. The real fix is to avoid compiling
449 # cpu_signal_handler() in cpu-exec.c.
451 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
453 $(QEMU_PROG): $(OBJS) ../libqemu_user.a
454 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
456 # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
457 # the address space (31 bit so sign extending doesn't matter)
458 echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc
461 endif #CONFIG_LINUX_USER
463 #########################################################
464 # Darwin user emulator target
466 ifdef CONFIG_DARWIN_USER
468 VPATH+=:$(SRC_PATH)/darwin-user
469 CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
471 # Leave some space for the regular program loading zone
472 LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
476 OBJS= main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o
481 OBJS+=gdbstub.o gdbstub-xml.o
484 # Note: this is a workaround. The real fix is to avoid compiling
485 # cpu_signal_handler() in cpu-exec.c.
487 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
489 $(QEMU_PROG): $(OBJS)
490 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
492 endif #CONFIG_DARWIN_USER
494 #########################################################
495 # BSD user emulator target
497 ifdef CONFIG_BSD_USER
499 VPATH+=:$(SRC_PATH)/bsd-user
500 CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
514 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
516 # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
517 # that the kernel ELF loader considers as an executable. I think this
518 # is the simplest way to make it self virtualizable!
523 ifeq ($(ARCH),x86_64)
524 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
528 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
532 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
536 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
540 # -static is used to avoid g1/g3 usage by the dynamic linker
541 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
544 ifeq ($(ARCH),sparc64)
545 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
549 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
553 LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
557 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
561 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
565 ifeq ($(WORDS_BIGENDIAN),yes)
566 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
568 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
572 ifeq ($(ARCH),mips64)
573 ifeq ($(WORDS_BIGENDIAN),yes)
574 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
576 LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
580 OBJS= main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o
589 # Note: this is a workaround. The real fix is to avoid compiling
590 # cpu_signal_handler() in cpu-exec.c.
592 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
594 $(QEMU_PROG): $(OBJS) ../libqemu_user.a
595 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
597 endif #CONFIG_BSD_USER
599 #########################################################
600 # System emulator target
601 ifndef CONFIG_USER_ONLY
603 OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o
604 # virtio has to be here due to weird dependency between PCI and virtio-net.
605 # need to fix this properly
606 OBJS+=virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
609 OBJS+=kvm.o kvm-all.o
612 OBJS+=block-raw-win32.o
615 OBJS+=posix-aio-compat.o
617 OBJS+=block-raw-posix.o
632 LIBS += -lpulse-simple
635 LIBS += -lole32 -ldxguid
638 LIBS += $(CONFIG_FMOD_LIB)
641 LIBS += $(CONFIG_OSS_LIB)
644 SOUND_HW = sb16.o es1370.o ac97.o
646 SOUND_HW += fmopl.o adlib.o
647 adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
650 SOUND_HW += gus.o gusemu_hal.o gusemu_mixer.o
653 SOUND_HW += cs4231a.o
656 ifdef CONFIG_KVM_KERNEL_INC
657 CFLAGS += -I $(CONFIG_KVM_KERNEL_INC)
659 DEPLIBS += ../libkvm/libkvm.a
663 CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
664 LIBS += $(CONFIG_VNC_TLS_LIBS)
668 LIBS += $(CONFIG_BLUEZ_LIBS)
672 OBJS+= lsi53c895a.o esp.o
687 OBJS += device-hotplug.o
689 ifeq ($(USE_KVM_DEVICE_ASSIGNMENT), 1)
690 OBJS+= device-assignment.o
693 ifeq ($(TARGET_BASE_ARCH), i386)
695 OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o
696 OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
697 OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
698 OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
701 OBJS+= virtio.o virtio-blk.o virtio-balloon.o
703 ifeq ($(USE_KVM_PIT), 1)
706 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
708 ifeq ($(TARGET_BASE_ARCH), ia64)
710 OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
711 OBJS+= fdc.o mc146818rtc.o serial.o i8259.o ipf.o
712 OBJS+= cirrus_vga.o parallel.o acpi.o piix_pci.o
713 OBJS+= usb-uhci.o smbus_eeprom.o
715 OBJS+= virtio.o virtio-blk.o virtio-balloon.o
718 ifeq ($(TARGET_BASE_ARCH), ppc)
719 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
721 OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o
724 OBJS+= pckbd.o ps2.o serial.o i8259.o i8254.o fdc.o m48t59.o mc146818rtc.o
725 OBJS+= prep_pci.o ppc_prep.o
727 OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o escc.o
729 OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
731 OBJS+= unin_pci.o ppc_chrp.o
733 OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
734 OBJS+= ppc440.o ppc440_bamboo.o
743 ifeq ($(TARGET_BASE_ARCH), mips)
744 OBJS+= mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
745 OBJS+= mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o
746 OBJS+= g364fb.o jazz_led.o
747 OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
748 OBJS+= piix_pci.o parallel.o cirrus_vga.o pcspk.o $(SOUND_HW)
750 OBJS+= pflash_cfi01.o
751 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
753 ifeq ($(TARGET_BASE_ARCH), cris)
755 OBJS+= etraxfs.o axis_dev88.o
761 OBJS+= etraxfs_timer.o
765 OBJS+= pflash_cfi02.o nand.o
767 ifeq ($(TARGET_BASE_ARCH), sparc)
768 ifeq ($(TARGET_ARCH), sparc64)
769 OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o
770 OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o
771 OBJS+= cirrus_vga.o parallel.o ptimer.o
773 OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o
774 OBJS+= slavio_timer.o escc.o slavio_misc.o fdc.o sparc32_dma.o
775 OBJS+= cs4231.o ptimer.o eccmemctl.o sbi.o sun4c_intctl.o
778 ifeq ($(TARGET_BASE_ARCH), arm)
779 OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o
780 OBJS+= arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
781 OBJS+= versatile_pci.o ptimer.o
782 OBJS+= realview_gic.o realview.o arm_sysctl.o mpcore.o
783 OBJS+= armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
786 OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
787 OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
788 OBJS+= pflash_cfi01.o gumstix.o
789 OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o
790 OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o
791 OBJS+= omap2.o omap_dss.o soc_dma.o
792 OBJS+= omap_sx1.o palm.o tsc210x.o
793 OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
794 OBJS+= tsc2005.o bt-hci-csr.o
795 OBJS+= mst_fpga.o mainstone.o
796 OBJS+= musicpal.o pflash_cfi02.o
797 CPPFLAGS += -DHAS_AUDIO
799 ifeq ($(TARGET_BASE_ARCH), sh4)
800 OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
801 OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
804 ifeq ($(TARGET_BASE_ARCH), m68k)
805 OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
806 OBJS+= m68k-semi.o dummy_m68k.o
809 OBJS+=gdbstub.o gdbstub-xml.o
812 COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
813 ifdef CONFIG_COREAUDIO
814 COCOA_LIBS+=-framework CoreAudio
818 CPPFLAGS+=-I$(SRC_PATH)/slirp
822 # specific flags are needed for non soft mmu emulator
828 ifndef CONFIG_SOLARIS
841 LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
845 SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
853 ifeq ($(TARGET_ARCH), ia64)
854 firmware.o: firmware.c
855 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
858 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a $(DEPLIBS)
859 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
861 endif # !CONFIG_USER_ONLY
863 gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh
865 ifeq ($(TARGET_XML_FILES),)
868 $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)
872 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
875 $(CC) $(CPPFLAGS) -c -o $@ $<
878 rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
879 rm -f *.d */*.d tcg/*.o
883 $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
886 # Include automatically generated dependency files
887 -include $(wildcard *.d */*.d)