blob: 2800f473b7fdbaad16c0c5e7fd71597f4c83eede [file] [log] [blame]
Anthony Liguori562593a2009-08-04 08:24:23 -05001# -*- Mode: makefile -*-
2
Paul Brooka992fe32009-11-22 16:25:30 +00003GENERATED_HEADERS = config-target.h
Paolo Bonzini98c85732010-04-19 18:59:30 +00004CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
Juan Quintelaf527c572009-11-05 17:19:57 +01005
Juan Quinteladeed3cc2009-10-07 02:40:57 +02006include ../config-host.mak
Juan Quintela1f3d3c82009-10-07 02:41:02 +02007include config-devices.mak
Juan Quintela25be210f2009-10-07 02:41:00 +02008include config-target.mak
aliguori17759182009-01-21 18:12:52 +00009include $(SRC_PATH)/rules.mak
Andreas Färber0e8c9212010-01-06 20:24:05 +010010ifneq ($(HWDIR),)
11include $(HWDIR)/config.mak
12endif
bellard626df762003-08-10 21:39:31 +000013
bellard0b0babc2005-01-03 23:38:40 +000014TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
Paolo Bonzini076d2472009-12-21 10:06:55 +010015$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
Juan Quintela6c903612009-08-03 14:46:23 +020016QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H
bellard1e43adf2003-09-30 20:54:24 +000017
Andreas Färber0e8c9212010-01-06 20:24:05 +010018include $(SRC_PATH)/Makefile.objs
19
bellard16e9b7d2003-10-27 21:09:52 +000020ifdef CONFIG_USER_ONLY
bellard40293e52008-01-31 11:32:10 +000021# user emulator name
22QEMU_PROG=qemu-$(TARGET_ARCH2)
bellard16e9b7d2003-10-27 21:09:52 +000023else
bellard40293e52008-01-31 11:32:10 +000024# system emulator name
25ifeq ($(TARGET_ARCH), i386)
26QEMU_PROG=qemu$(EXESUF)
27else
28QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
bellardde5eaa62003-11-16 23:18:17 +000029endif
bellard40293e52008-01-31 11:32:10 +000030endif
bellard728c9fd2004-01-05 00:08:14 +000031
bellard40293e52008-01-31 11:32:10 +000032PROGS=$(QEMU_PROG)
Peter Maydellb8841702010-11-16 20:07:07 +000033STPFILES=
bellard626df762003-08-10 21:39:31 +000034
Andreas Färberaff447c2010-09-20 00:50:45 +020035ifndef CONFIG_HAIKU
bellard626df762003-08-10 21:39:31 +000036LIBS+=-lm
Andreas Färberaff447c2010-09-20 00:50:45 +020037endif
bellard626df762003-08-10 21:39:31 +000038
Jan Kiszka0e1a2752010-04-06 13:31:29 +020039kvm.o kvm-all.o vhost.o vhost_net.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
aliguori7ba1e612008-11-05 16:04:33 +000040
Juan Quintela91880d92009-10-07 02:41:01 +020041config-target.h: config-target.h-timestamp
42config-target.h-timestamp: config-target.mak
43
Daniel P. Berrangec276b172010-11-12 13:20:25 +000044ifdef CONFIG_SYSTEMTAP_TRACE
45stap: $(QEMU_PROG).stp
46
47ifdef CONFIG_USER_ONLY
48TARGET_TYPE=user
49else
50TARGET_TYPE=system
51endif
52
53$(QEMU_PROG).stp:
54 $(call quiet-command,sh $(SRC_PATH)/tracetool \
55 --$(TRACE_BACKEND) \
56 --binary $(bindir)/$(QEMU_PROG) \
57 --target-arch $(TARGET_ARCH) \
58 --target-type $(TARGET_TYPE) \
59 --stap < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp")
60else
61stap:
62endif
63
64all: $(PROGS) stap
Juan Quintela91880d92009-10-07 02:41:01 +020065
Paul Brookc2fb2632009-05-25 18:54:53 +010066# Dummy command so that make thinks it has done something
67 @true
bellard626df762003-08-10 21:39:31 +000068
bellard40293e52008-01-31 11:32:10 +000069#########################################################
bellard626df762003-08-10 21:39:31 +000070# cpu emulator library
Blue Swirlc2b023b2009-09-20 19:20:05 +000071libobj-y = exec.o translate-all.o cpu-exec.o translate.o
Blue Swirl96e132e2009-09-20 19:06:34 +000072libobj-y += tcg/tcg.o
Juan Quintelad6b38932009-08-03 14:46:42 +020073libobj-$(CONFIG_SOFTFLOAT) += fpu/softfloat.o
74libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
Juan Quintelac9e0df72009-06-25 00:08:00 +020075libobj-y += op_helper.o helper.o
Andre Przywarac6dc6f62010-03-11 14:38:55 +010076ifeq ($(TARGET_BASE_ARCH), i386)
77libobj-y += cpuid.o
78endif
Juan Quintela471857d2009-08-03 14:46:52 +020079libobj-$(CONFIG_NEED_MMU) += mmu.o
Juan Quintelae18ea862009-08-03 14:47:04 +020080libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
j_mayercf6c1b12007-04-05 20:46:02 +000081
Juan Quintelac9e0df72009-06-25 00:08:00 +020082libobj-y += disas.o
bellard626df762003-08-10 21:39:31 +000083
Andreas Färber0e8c9212010-01-06 20:24:05 +010084$(libobj-y): $(GENERATED_HEADERS)
bellard40293e52008-01-31 11:32:10 +000085
Andreas Färber0e8c9212010-01-06 20:24:05 +010086# libqemu
bellard40293e52008-01-31 11:32:10 +000087
aurel3286e840e2008-12-07 15:21:23 +000088translate.o: translate.c cpu.h
bellard40293e52008-01-31 11:32:10 +000089
aurel3286e840e2008-12-07 15:21:23 +000090translate-all.o: translate-all.c cpu.h
bellard40293e52008-01-31 11:32:10 +000091
aurel3286e840e2008-12-07 15:21:23 +000092tcg/tcg.o: cpu.h
bellard40293e52008-01-31 11:32:10 +000093
94# HELPER_CFLAGS is used for all the code compiled with static register
95# variables
Juan Quintela864de242009-08-03 14:46:55 +020096op_helper.o cpu-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
bellard40293e52008-01-31 11:32:10 +000097
Juan Quintelac81da562009-08-03 14:46:24 +020098# Note: this is a workaround. The real fix is to avoid compiling
99# cpu_signal_handler() in cpu-exec.c.
100signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
101
bellard40293e52008-01-31 11:32:10 +0000102#########################################################
103# Linux user emulator target
104
105ifdef CONFIG_LINUX_USER
106
Paolo Bonzini076d2472009-12-21 10:06:55 +0100107$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
108
Juan Quintelaa558ee12009-08-03 14:46:21 +0200109QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
Blue Swirl37022082009-08-15 07:51:59 +0000110obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
Richard Henderson680c8772010-05-21 10:37:52 -0700111 elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \
Jes Sorensenb152aa82010-10-26 10:39:26 +0200112 qemu-malloc.o $(oslib-obj-y)
Blue Swirl5ba65312009-08-15 07:52:19 +0000113
Juan Quintela943e0a32009-06-25 00:08:10 +0200114obj-$(TARGET_HAS_BFLT) += flatload.o
bellard40293e52008-01-31 11:32:10 +0000115
Juan Quintelae18ea862009-08-03 14:47:04 +0200116obj-$(TARGET_I386) += vm86.o
Juan Quintela1c872672009-07-16 18:34:03 +0200117
Blue Swirle27b27b2009-08-16 07:39:33 +0000118obj-i386-y += ioport-user.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000119
Juan Quintelaed69c302009-08-03 14:47:01 +0200120nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
Juan Quintela9c1dd992009-07-16 17:57:04 +0200121nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
Juan Quintela1c872672009-07-16 18:34:03 +0200122obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y))
123obj-arm-y += arm-semi.o
124
125obj-m68k-y += m68k-sim.o m68k-semi.o
bellard40293e52008-01-31 11:32:10 +0000126
Andreas Färber0e8c9212010-01-06 20:24:05 +0100127$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
128
129obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000130obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100131obj-y += $(libobj-y)
Blue Swirladd16152009-09-27 16:26:02 +0000132
bellard40293e52008-01-31 11:32:10 +0000133endif #CONFIG_LINUX_USER
134
135#########################################################
136# Darwin user emulator target
137
138ifdef CONFIG_DARWIN_USER
139
Paolo Bonzini076d2472009-12-21 10:06:55 +0100140$(call set-vpath, $(SRC_PATH)/darwin-user)
141
Juan Quintelaa558ee12009-08-03 14:46:21 +0200142QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
bellard40293e52008-01-31 11:32:10 +0000143
144# Leave some space for the regular program loading zone
145LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
146
147LIBS+=-lmx
148
Juan Quintelaa8e492c2009-06-25 00:08:01 +0200149obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
Juan Quintela3d0f1512009-10-07 02:41:04 +0200150 gdbstub.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000151
Blue Swirle27b27b2009-08-16 07:39:33 +0000152obj-i386-y += ioport-user.o
bellard40293e52008-01-31 11:32:10 +0000153
Andreas Färber0e8c9212010-01-06 20:24:05 +0100154$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
155
156obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000157obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100158obj-y += $(libobj-y)
bellard40293e52008-01-31 11:32:10 +0000159
160endif #CONFIG_DARWIN_USER
161
162#########################################################
blueswir184778502008-10-26 20:33:16 +0000163# BSD user emulator target
164
165ifdef CONFIG_BSD_USER
166
Paolo Bonzini076d2472009-12-21 10:06:55 +0100167$(call set-vpath, $(SRC_PATH)/bsd-user)
168
Juan Quintelaa558ee12009-08-03 14:46:21 +0200169QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
blueswir184778502008-10-26 20:33:16 +0000170
Blue Swirl37022082009-08-15 07:51:59 +0000171obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
Juan Quintela3d0f1512009-10-07 02:41:04 +0200172 gdbstub.o uaccess.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000173
Blue Swirle27b27b2009-08-16 07:39:33 +0000174obj-i386-y += ioport-user.o
blueswir184778502008-10-26 20:33:16 +0000175
Andreas Färber0e8c9212010-01-06 20:24:05 +0100176$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
177
178obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000179obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100180obj-y += $(libobj-y)
blueswir184778502008-10-26 20:33:16 +0000181
182endif #CONFIG_BSD_USER
183
184#########################################################
bellard40293e52008-01-31 11:32:10 +0000185# System emulator target
Juan Quintela76dfdd22009-08-03 14:46:41 +0200186ifdef CONFIG_SOFTMMU
bellard40293e52008-01-31 11:32:10 +0000187
Blue Swirl04c9a0c2010-04-19 19:46:13 +0000188obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o
aliguori1fd31ad2008-12-18 01:56:22 +0000189# virtio has to be here due to weird dependency between PCI and virtio-net.
190# need to fix this properly
Alexander Grafe9d0fc72010-04-06 12:11:43 +0200191obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
192obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
Michael S. Tsirkind5970052010-03-17 13:08:17 +0200193obj-y += vhost_net.o
194obj-$(CONFIG_VHOST_NET) += vhost.o
Venkateswararao Jujjuri (JV)758e8e32010-06-14 13:34:41 -0700195obj-$(CONFIG_VIRTFS) += virtio-9p.o
Blue Swirl51464fa2010-02-20 09:27:38 +0000196obj-y += rwhandler.o
Juan Quintelaa8e492c2009-06-25 00:08:01 +0200197obj-$(CONFIG_KVM) += kvm.o kvm-all.o
Paolo Bonzini98c85732010-04-19 18:59:30 +0000198obj-$(CONFIG_NO_KVM) += kvm-stub.o
bellard40293e52008-01-31 11:32:10 +0000199LIBS+=-lz
bellard4fb240a2007-11-07 19:24:02 +0000200
Juan Quintelaa558ee12009-08-03 14:46:21 +0200201QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
Juan Quintelaa558ee12009-08-03 14:46:21 +0200202QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
Corentin Chary2f6f5c72010-07-07 20:57:49 +0200203QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)
Corentin Charyefe556a2010-07-07 20:57:56 +0200204QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
aliguori2f9606b2009-03-06 20:27:28 +0000205
aliguorie37630c2009-04-22 15:19:10 +0000206# xen backend driver support
Juan Quintela943e0a32009-06-25 00:08:10 +0200207obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
aliguorie37630c2009-04-22 15:19:10 +0000208
Paul Brooka67ba3b2010-04-04 21:18:26 +0100209# USB layer
210obj-$(CONFIG_USB_OHCI) += usb-ohci.o
211
pbrooka41b2ff2006-02-05 04:14:41 +0000212# PCI network cards
Juan Quintelaa8e492c2009-06-25 00:08:01 +0200213obj-y += rtl8139.o
214obj-y += e1000.o
pbrooka41b2ff2006-02-05 04:14:41 +0000215
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600216# Inter-VM PCI shared memory
Cam Macdonell3dcbf8f2010-08-14 17:47:31 -0600217obj-$(CONFIG_KVM) += ivshmem.o
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600218
bellarda541f292004-04-12 20:39:29 +0000219# Hardware support
Blue Swirl7f55c7c2010-03-21 19:47:03 +0000220obj-i386-y += vga.o
Blue Swirl2d483772010-03-21 19:47:11 +0000221obj-i386-y += mc146818rtc.o i8259.o pc.o
Blue Swirl53b67b32010-03-29 19:23:52 +0000222obj-i386-y += cirrus_vga.o apic.o ioapic.o piix_pci.o
Alexander Graf1ddda5c2010-06-30 10:41:12 +0200223obj-i386-y += vmmouse.o vmport.o hpet.o applesmc.o
Markus Armbruster09aaa162009-08-21 10:31:34 +0200224obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
Blue Swirld3ffc7a2010-03-21 19:47:10 +0000225obj-i386-y += debugcon.o multiboot.o
Blue Swirlc69ea0d2010-05-17 19:32:37 +0000226obj-i386-y += pc_piix.o
Juan Quintela96374432009-07-16 18:33:58 +0200227
Juan Quintela96374432009-07-16 18:33:58 +0200228# shared objects
Blue Swirl02c7c992010-03-29 19:23:57 +0000229obj-ppc-y = ppc.o
Blue Swirl4556bd82010-05-22 08:00:52 +0000230obj-ppc-y += vga.o
Juan Quintela96374432009-07-16 18:33:58 +0200231# PREP target
Blue Swirl956a3e62010-05-22 07:59:01 +0000232obj-ppc-y += i8259.o mc146818rtc.o
Blue Swirladd85a72010-03-29 19:24:04 +0000233obj-ppc-y += ppc_prep.o
Juan Quintela96374432009-07-16 18:33:58 +0200234# OldWorld PowerMac
Blue Swirl2b5eb372010-03-30 17:36:23 +0000235obj-ppc-y += ppc_oldworld.o
Juan Quintela96374432009-07-16 18:33:58 +0200236# NewWorld PowerMac
Blue Swirl2b5eb372010-03-30 17:36:23 +0000237obj-ppc-y += ppc_newworld.o
Juan Quintela96374432009-07-16 18:33:58 +0200238# PowerPC 4xx boards
Blue Swirl5f9fc5a2010-03-29 19:23:55 +0000239obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
Juan Quintela96374432009-07-16 18:33:58 +0200240obj-ppc-y += ppc440.o ppc440_bamboo.o
241# PowerPC E500 boards
Blue Swirl2b5eb372010-03-30 17:36:23 +0000242obj-ppc-y += ppce500_mpc8544ds.o
Edgar E. Iglesias2c50e262010-09-29 15:31:44 +0200243# PowerPC 440 Xilinx ML507 reference board.
244obj-ppc-y += virtex_ml507.o
Juan Quintela96374432009-07-16 18:33:58 +0200245obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
Juan Quintela3f0855b2009-07-27 16:12:52 +0200246obj-ppc-$(CONFIG_FDT) += device_tree.o
Juan Quintela96374432009-07-16 18:33:58 +0200247
Edgar E. Iglesias2c50e262010-09-29 15:31:44 +0200248# Xilinx PPC peripherals
249obj-ppc-y += xilinx_intc.o
250obj-ppc-y += xilinx_timer.o
251obj-ppc-y += xilinx_uartlite.o
252obj-ppc-y += xilinx_ethlite.o
253
Juan Quintela96374432009-07-16 18:33:58 +0200254obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
Aurelien Jarno409dbce2010-03-14 21:20:59 +0100255obj-mips-y += mips_addr.o mips_timer.o mips_int.o
Blue Swirl4556bd82010-05-22 08:00:52 +0000256obj-mips-y += vga.o i8259.o
Blue Swirlb970ea82010-03-27 07:26:16 +0000257obj-mips-y += g364fb.o jazz_led.o
Blue Swirl956a3e62010-05-22 07:59:01 +0000258obj-mips-y += gt64xxx.o mc146818rtc.o
Blue Swirl08af49d2010-07-03 06:49:47 +0000259obj-mips-y += cirrus_vga.o
Huacai Chen051c1902010-06-29 10:50:43 +0800260obj-mips-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o
Juan Quintela96374432009-07-16 18:33:58 +0200261
Juan Quintela96374432009-07-16 18:33:58 +0200262obj-microblaze-y = petalogix_s3adsp1800_mmu.o
Edgar E. Iglesias72b675c2009-05-20 21:17:31 +0200263
Juan Quintela96374432009-07-16 18:33:58 +0200264obj-microblaze-y += microblaze_pic_cpu.o
265obj-microblaze-y += xilinx_intc.o
266obj-microblaze-y += xilinx_timer.o
267obj-microblaze-y += xilinx_uartlite.o
268obj-microblaze-y += xilinx_ethlite.o
269
Juan Quintela3f0855b2009-07-27 16:12:52 +0200270obj-microblaze-$(CONFIG_FDT) += device_tree.o
Juan Quintela96374432009-07-16 18:33:58 +0200271
edgar_igl10c144e2009-01-07 12:19:50 +0000272# Boards
Edgar E. Iglesias77d4f952010-06-10 14:45:46 +0200273obj-cris-y = cris_pic_cpu.o
274obj-cris-y += cris-boot.o
275obj-cris-y += etraxfs.o axis_dev88.o
276obj-cris-y += axis_dev88.o
edgar_igl10c144e2009-01-07 12:19:50 +0000277
278# IO blocks
Juan Quintela96374432009-07-16 18:33:58 +0200279obj-cris-y += etraxfs_dma.o
280obj-cris-y += etraxfs_pic.o
281obj-cris-y += etraxfs_eth.o
282obj-cris-y += etraxfs_timer.o
283obj-cris-y += etraxfs_ser.o
edgar_igle62b5b12008-03-14 01:04:24 +0000284
bellard34751872005-07-02 14:31:34 +0000285ifeq ($(TARGET_ARCH), sparc64)
Blue Swirl956a3e62010-05-22 07:59:01 +0000286obj-sparc-y = sun4u.o apb_pci.o
Blue Swirl1afdfdd2010-03-21 19:47:00 +0000287obj-sparc-y += vga.o
Blue Swirl2d483772010-03-21 19:47:11 +0000288obj-sparc-y += mc146818rtc.o
Blue Swirlb9945042010-03-21 19:47:01 +0000289obj-sparc-y += cirrus_vga.o
bellard34751872005-07-02 14:31:34 +0000290else
Blue Swirl24056692010-04-03 07:35:50 +0000291obj-sparc-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o
Blue Swirl35da37e2010-03-21 19:47:06 +0000292obj-sparc-y += slavio_timer.o slavio_misc.o sparc32_dma.o
Juan Quintela96374432009-07-16 18:33:58 +0200293obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
bellard34751872005-07-02 14:31:34 +0000294endif
Juan Quintela96374432009-07-16 18:33:58 +0200295
Paul Brookf165b532009-11-19 16:42:45 +0000296obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o
Juan Quintela96374432009-07-16 18:33:58 +0200297obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
298obj-arm-y += versatile_pci.o
Paul Brookf7c70322009-11-19 16:45:21 +0000299obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o
Juan Quintela96374432009-07-16 18:33:58 +0200300obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
301obj-arm-y += pl061.o
302obj-arm-y += arm-semi.o
303obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
304obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
Blue Swirl3d08ff62010-03-29 19:23:56 +0000305obj-arm-y += gumstix.o
Blue Swirlf7736b92010-03-27 06:20:53 +0000306obj-arm-y += zaurus.o ide/microdrive.o spitz.o tosa.o tc6393xb.o
cmchao02d74342010-05-31 23:54:23 +0800307obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o \
308 omap_gpio.o omap_intc.o omap_uart.o
cmchao2c1d9ec2010-05-31 23:54:22 +0800309obj-arm-y += omap2.o omap_dss.o soc_dma.o omap_gptimer.o omap_synctimer.o \
310 omap_gpmc.o omap_sdrc.o omap_spi.o omap_tap.o omap_l4.o
Juan Quintela96374432009-07-16 18:33:58 +0200311obj-arm-y += omap_sx1.o palm.o tsc210x.o
312obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
313obj-arm-y += mst_fpga.o mainstone.o
Blue Swirl5f9fc5a2010-03-29 19:23:55 +0000314obj-arm-y += musicpal.o bitbang_i2c.o marvell_88w8618_audio.o
Juan Quintela96374432009-07-16 18:33:58 +0200315obj-arm-y += framebuffer.o
316obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
317obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
318obj-arm-y += syborg_virtio.o
319
Juan Quintela96374432009-07-16 18:33:58 +0200320obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
Blue Swirl2d483772010-03-21 19:47:11 +0000321obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o
Blue Swirlf7736b92010-03-27 06:20:53 +0000322obj-sh4-y += ide/mmio.o
Juan Quintela96374432009-07-16 18:33:58 +0200323
324obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
325obj-m68k-y += m68k-semi.o dummy_m68k.o
326
Alexander Graf8cb310e2009-12-05 12:44:28 +0100327obj-s390x-y = s390-virtio-bus.o s390-virtio.o
Alexander Graff3304ee2009-12-05 12:44:27 +0100328
Richard Henderson6049f4f2009-12-27 18:30:03 -0800329obj-alpha-y = alpha_palcode.o
330
Blue Swirlad960902010-03-29 19:23:52 +0000331main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
blueswir15824d652009-03-28 06:44:27 +0000332
Luiz Capitulinoacd0a092010-09-30 16:00:22 -0300333monitor.o: hmp-commands.h qmp-commands.h
Blue Swirl23130862009-06-06 08:22:04 +0000334
Andreas Färber0e8c9212010-01-06 20:24:05 +0100335$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
336
337obj-y += $(addprefix ../, $(common-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000338obj-y += $(addprefix ../libdis/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100339obj-y += $(libobj-y)
340obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
bellard626df762003-08-10 21:39:31 +0000341
Juan Quintela76dfdd22009-08-03 14:46:41 +0200342endif # CONFIG_SOFTMMU
bellard00a67ba2006-10-28 12:19:07 +0000343
Stefan Hajnoczi94a420b2010-05-22 17:52:39 +0100344obj-y += $(addprefix ../, $(trace-obj-y))
Juan Quintela3d0f1512009-10-07 02:41:04 +0200345obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
346
Andreas Färber0e8c9212010-01-06 20:24:05 +0100347$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
Juan Quintela16394482009-07-16 18:34:04 +0200348 $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
349
350
Paolo Bonzini59bc10e2010-01-04 11:02:28 +0100351gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh
aurel321aef4c52009-03-28 23:46:00 +0000352 $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
pbrook56aebc82008-10-11 17:55:29 +0000353
Luiz Capitulinoacd0a092010-09-30 16:00:22 -0300354hmp-commands.h: $(SRC_PATH)/hmp-commands.hx
Blue Swirl23130862009-06-06 08:22:04 +0000355 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
356
Luiz Capitulinof36b4af2010-09-15 17:17:45 -0300357qmp-commands.h: $(SRC_PATH)/qmp-commands.hx
aliguori0d00e562009-04-05 17:40:46 +0000358 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
blueswir15824d652009-03-28 06:44:27 +0000359
bellard626df762003-08-10 21:39:31 +0000360clean:
Blue Swirl23130862009-06-06 08:22:04 +0000361 rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
Juan Quintelabefb0312009-09-21 15:10:55 +0200362 rm -f *.d */*.d tcg/*.o ide/*.o
Luiz Capitulinoacd0a092010-09-30 16:00:22 -0300363 rm -f hmp-commands.h qmp-commands.h gdbstub-xml.c
Daniel P. Berrangec276b172010-11-12 13:20:25 +0000364ifdef CONFIG_SYSTEMTAP_TRACE
365 rm -f *.stp
366endif
bellard1e43adf2003-09-30 20:54:24 +0000367
ths5fafdf22007-09-16 21:08:06 +0000368install: all
bellard9b14bb02004-03-26 22:43:34 +0000369ifneq ($(PROGS),)
Hollis Blanchard52ba7842010-08-04 17:21:34 -0700370 $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
371ifneq ($(STRIP),)
372 $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS))
373endif
bellard9b14bb02004-03-26 22:43:34 +0000374endif
Daniel P. Berrangec276b172010-11-12 13:20:25 +0000375ifdef CONFIG_SYSTEMTAP_TRACE
376 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset"
377 $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset"
378endif
bellard626df762003-08-10 21:39:31 +0000379
j_mayer2f96c282007-10-28 13:07:12 +0000380# Include automatically generated dependency files
381-include $(wildcard *.d */*.d)