blob: 62ddfc9b67c56b0532f44a06ec44484034eaf022 [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
Isaku Yamahatab3a29fd2010-12-22 19:54:48 +09004CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
Paolo Bonzini98c85732010-04-19 18:59:30 +00005CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
Jan Kiszka6dbd5882011-06-21 22:59:07 +02006CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
Juan Quintelaf527c572009-11-05 17:19:57 +01007
Juan Quinteladeed3cc2009-10-07 02:40:57 +02008include ../config-host.mak
Juan Quintela1f3d3c82009-10-07 02:41:02 +02009include config-devices.mak
Juan Quintela25be210f2009-10-07 02:41:00 +020010include config-target.mak
aliguori17759182009-01-21 18:12:52 +000011include $(SRC_PATH)/rules.mak
Andreas Färber0e8c9212010-01-06 20:24:05 +010012ifneq ($(HWDIR),)
13include $(HWDIR)/config.mak
14endif
bellard626df762003-08-10 21:39:31 +000015
bellard0b0babc2005-01-03 23:38:40 +000016TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
Paolo Bonzini076d2472009-12-21 10:06:55 +010017$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
Jan Kiszkaaf2be202011-06-23 10:05:12 +020018ifdef CONFIG_LINUX
19QEMU_CFLAGS += -I../linux-headers
20endif
21QEMU_CFLAGS += -I.. -I$(TARGET_PATH) -DNEED_CPU_H
bellard1e43adf2003-09-30 20:54:24 +000022
Andreas Färber0e8c9212010-01-06 20:24:05 +010023include $(SRC_PATH)/Makefile.objs
24
bellard16e9b7d2003-10-27 21:09:52 +000025ifdef CONFIG_USER_ONLY
bellard40293e52008-01-31 11:32:10 +000026# user emulator name
27QEMU_PROG=qemu-$(TARGET_ARCH2)
bellard16e9b7d2003-10-27 21:09:52 +000028else
bellard40293e52008-01-31 11:32:10 +000029# system emulator name
30ifeq ($(TARGET_ARCH), i386)
31QEMU_PROG=qemu$(EXESUF)
32else
33QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
bellardde5eaa62003-11-16 23:18:17 +000034endif
bellard40293e52008-01-31 11:32:10 +000035endif
bellard728c9fd2004-01-05 00:08:14 +000036
bellard40293e52008-01-31 11:32:10 +000037PROGS=$(QEMU_PROG)
Peter Maydellb8841702010-11-16 20:07:07 +000038STPFILES=
bellard626df762003-08-10 21:39:31 +000039
Andreas Färberaff447c2010-09-20 00:50:45 +020040ifndef CONFIG_HAIKU
bellard626df762003-08-10 21:39:31 +000041LIBS+=-lm
Andreas Färberaff447c2010-09-20 00:50:45 +020042endif
bellard626df762003-08-10 21:39:31 +000043
Juan Quintela91880d92009-10-07 02:41:01 +020044config-target.h: config-target.h-timestamp
45config-target.h-timestamp: config-target.mak
46
Daniel P. Berrangec276b172010-11-12 13:20:25 +000047ifdef CONFIG_SYSTEMTAP_TRACE
48stap: $(QEMU_PROG).stp
49
50ifdef CONFIG_USER_ONLY
51TARGET_TYPE=user
52else
53TARGET_TYPE=system
54endif
55
56$(QEMU_PROG).stp:
Blue Swirl4c3b5a42011-01-20 20:54:21 +000057 $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \
Daniel P. Berrangec276b172010-11-12 13:20:25 +000058 --$(TRACE_BACKEND) \
59 --binary $(bindir)/$(QEMU_PROG) \
60 --target-arch $(TARGET_ARCH) \
61 --target-type $(TARGET_TYPE) \
62 --stap < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp")
63else
64stap:
65endif
66
67all: $(PROGS) stap
Juan Quintela91880d92009-10-07 02:41:01 +020068
Paul Brookc2fb2632009-05-25 18:54:53 +010069# Dummy command so that make thinks it has done something
70 @true
bellard626df762003-08-10 21:39:31 +000071
bellard40293e52008-01-31 11:32:10 +000072#########################################################
bellard626df762003-08-10 21:39:31 +000073# cpu emulator library
Blue Swirlc2b023b2009-09-20 19:20:05 +000074libobj-y = exec.o translate-all.o cpu-exec.o translate.o
Kirill Batuzov8f2e8c02011-07-07 16:37:12 +040075libobj-y += tcg/tcg.o tcg/optimize.o
Aurelien Jarnocf67c6b2011-05-15 14:09:18 +020076libobj-y += fpu/softfloat.o
Juan Quintelac9e0df72009-06-25 00:08:00 +020077libobj-y += op_helper.o helper.o
Andre Przywarac6dc6f62010-03-11 14:38:55 +010078ifeq ($(TARGET_BASE_ARCH), i386)
79libobj-y += cpuid.o
80endif
Juan Quintela471857d2009-08-03 14:46:52 +020081libobj-$(CONFIG_NEED_MMU) += mmu.o
Juan Quintelae18ea862009-08-03 14:47:04 +020082libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
j_mayercf6c1b12007-04-05 20:46:02 +000083
Juan Quintelac9e0df72009-06-25 00:08:00 +020084libobj-y += disas.o
bellard626df762003-08-10 21:39:31 +000085
Andreas Färber0e8c9212010-01-06 20:24:05 +010086$(libobj-y): $(GENERATED_HEADERS)
bellard40293e52008-01-31 11:32:10 +000087
Andreas Färber0e8c9212010-01-06 20:24:05 +010088# libqemu
bellard40293e52008-01-31 11:32:10 +000089
aurel3286e840e2008-12-07 15:21:23 +000090translate.o: translate.c cpu.h
bellard40293e52008-01-31 11:32:10 +000091
aurel3286e840e2008-12-07 15:21:23 +000092translate-all.o: translate-all.c cpu.h
bellard40293e52008-01-31 11:32:10 +000093
aurel3286e840e2008-12-07 15:21:23 +000094tcg/tcg.o: cpu.h
bellard40293e52008-01-31 11:32:10 +000095
96# HELPER_CFLAGS is used for all the code compiled with static register
97# variables
Blue Swirla3ce3662011-07-20 20:23:01 +000098op_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
bellard40293e52008-01-31 11:32:10 +000099
Juan Quintelac81da562009-08-03 14:46:24 +0200100# Note: this is a workaround. The real fix is to avoid compiling
Blue Swirl42a623c2011-05-08 11:22:38 +0000101# cpu_signal_handler() in user-exec.c.
Juan Quintelac81da562009-08-03 14:46:24 +0200102signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
103
bellard40293e52008-01-31 11:32:10 +0000104#########################################################
105# Linux user emulator target
106
107ifdef CONFIG_LINUX_USER
108
Paolo Bonzini076d2472009-12-21 10:06:55 +0100109$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
110
Mike Frysingerc3109ba2011-02-07 01:05:54 -0500111QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
Blue Swirl37022082009-08-15 07:51:59 +0000112obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
Richard Henderson680c8772010-05-21 10:37:52 -0700113 elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \
Anthony Liguori41a74822011-08-20 22:23:03 -0500114 user-exec.o $(oslib-obj-y)
Blue Swirl5ba65312009-08-15 07:52:19 +0000115
Juan Quintela943e0a32009-06-25 00:08:10 +0200116obj-$(TARGET_HAS_BFLT) += flatload.o
bellard40293e52008-01-31 11:32:10 +0000117
Juan Quintelae18ea862009-08-03 14:47:04 +0200118obj-$(TARGET_I386) += vm86.o
Juan Quintela1c872672009-07-16 18:34:03 +0200119
Blue Swirle27b27b2009-08-16 07:39:33 +0000120obj-i386-y += ioport-user.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000121
Juan Quintelaed69c302009-08-03 14:47:01 +0200122nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
Juan Quintela9c1dd992009-07-16 17:57:04 +0200123nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
Juan Quintela1c872672009-07-16 18:34:03 +0200124obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y))
125obj-arm-y += arm-semi.o
126
127obj-m68k-y += m68k-sim.o m68k-semi.o
bellard40293e52008-01-31 11:32:10 +0000128
Andreas Färber0e8c9212010-01-06 20:24:05 +0100129$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
130
131obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000132obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100133obj-y += $(libobj-y)
Blue Swirladd16152009-09-27 16:26:02 +0000134
bellard40293e52008-01-31 11:32:10 +0000135endif #CONFIG_LINUX_USER
136
137#########################################################
138# Darwin user emulator target
139
140ifdef CONFIG_DARWIN_USER
141
Paolo Bonzini076d2472009-12-21 10:06:55 +0100142$(call set-vpath, $(SRC_PATH)/darwin-user)
143
Juan Quintelaa558ee12009-08-03 14:46:21 +0200144QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
bellard40293e52008-01-31 11:32:10 +0000145
146# Leave some space for the regular program loading zone
147LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
148
149LIBS+=-lmx
150
Juan Quintelaa8e492c2009-06-25 00:08:01 +0200151obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
Blue Swirl42a623c2011-05-08 11:22:38 +0000152 gdbstub.o user-exec.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000153
Blue Swirle27b27b2009-08-16 07:39:33 +0000154obj-i386-y += ioport-user.o
bellard40293e52008-01-31 11:32:10 +0000155
Andreas Färber0e8c9212010-01-06 20:24:05 +0100156$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
157
158obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000159obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100160obj-y += $(libobj-y)
bellard40293e52008-01-31 11:32:10 +0000161
162endif #CONFIG_DARWIN_USER
163
164#########################################################
blueswir184778502008-10-26 20:33:16 +0000165# BSD user emulator target
166
167ifdef CONFIG_BSD_USER
168
Paolo Bonzini076d2472009-12-21 10:06:55 +0100169$(call set-vpath, $(SRC_PATH)/bsd-user)
170
Juan Quintelaa558ee12009-08-03 14:46:21 +0200171QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
blueswir184778502008-10-26 20:33:16 +0000172
Blue Swirl37022082009-08-15 07:51:59 +0000173obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
Blue Swirl42a623c2011-05-08 11:22:38 +0000174 gdbstub.o uaccess.o user-exec.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000175
Blue Swirle27b27b2009-08-16 07:39:33 +0000176obj-i386-y += ioport-user.o
blueswir184778502008-10-26 20:33:16 +0000177
Andreas Färber0e8c9212010-01-06 20:24:05 +0100178$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
179
180obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000181obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100182obj-y += $(libobj-y)
blueswir184778502008-10-26 20:33:16 +0000183
184endif #CONFIG_BSD_USER
185
186#########################################################
bellard40293e52008-01-31 11:32:10 +0000187# System emulator target
Juan Quintela76dfdd22009-08-03 14:46:41 +0200188ifdef CONFIG_SOFTMMU
bellard40293e52008-01-31 11:32:10 +0000189
Blue Swirl04c9a0c2010-04-19 19:46:13 +0000190obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o
aliguori1fd31ad2008-12-18 01:56:22 +0000191# virtio has to be here due to weird dependency between PCI and virtio-net.
192# need to fix this properly
Isaku Yamahatab3a29fd2010-12-22 19:54:48 +0900193obj-$(CONFIG_NO_PCI) += pci-stub.o
Blue Swirl21673cd2011-07-14 15:22:20 +0000194obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
Michael S. Tsirkind5970052010-03-17 13:08:17 +0200195obj-y += vhost_net.o
196obj-$(CONFIG_VHOST_NET) += vhost.o
Aneesh Kumar K.Vf4f61d22011-06-01 12:35:13 +0530197obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/virtio-9p-device.o
Anthony Liguori01e04512011-08-25 14:39:18 -0500198obj-y += rwhandler.o
Juan Quintelaa8e492c2009-06-25 00:08:01 +0200199obj-$(CONFIG_KVM) += kvm.o kvm-all.o
Paolo Bonzini98c85732010-04-19 18:59:30 +0000200obj-$(CONFIG_NO_KVM) += kvm-stub.o
Avi Kivity093bc2c2011-07-26 14:26:01 +0300201obj-y += memory.o
bellard40293e52008-01-31 11:32:10 +0000202LIBS+=-lz
bellard4fb240a2007-11-07 19:24:02 +0000203
Juan Quintelaa558ee12009-08-03 14:46:21 +0200204QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
Juan Quintelaa558ee12009-08-03 14:46:21 +0200205QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
Corentin Chary2f6f5c72010-07-07 20:57:49 +0200206QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)
Corentin Charyefe556a2010-07-07 20:57:56 +0200207QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
Anthony Liguorie18df142011-07-19 14:50:29 -0500208QEMU_CFLAGS += $(GLIB_CFLAGS)
aliguori2f9606b2009-03-06 20:27:28 +0000209
Anthony PERARD3285cf42010-08-19 12:27:56 +0100210# xen support
Jan Kiszka868bb332011-06-21 22:59:09 +0200211obj-$(CONFIG_XEN) += xen-all.o xen_machine_pv.o xen_domainbuild.o xen-mapcache.o
Anthony PERARD3285cf42010-08-19 12:27:56 +0100212obj-$(CONFIG_NO_XEN) += xen-stub.o
213
Steven Smith01195b72011-06-16 17:05:17 +0100214obj-i386-$(CONFIG_XEN) += xen_platform.o
215
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600216# Inter-VM PCI shared memory
Alexander Graf1b01b4e2011-03-29 15:29:28 +0200217CONFIG_IVSHMEM =
218ifeq ($(CONFIG_KVM), y)
219 ifeq ($(CONFIG_PCI), y)
220 CONFIG_IVSHMEM = y
221 endif
222endif
223obj-$(CONFIG_IVSHMEM) += ivshmem.o
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600224
bellarda541f292004-04-12 20:39:29 +0000225# Hardware support
Blue Swirl7f55c7c2010-03-21 19:47:03 +0000226obj-i386-y += vga.o
Blue Swirl2d483772010-03-21 19:47:11 +0000227obj-i386-y += mc146818rtc.o i8259.o pc.o
Glauber Costaa90d4692011-05-16 15:45:08 -0300228obj-i386-y += cirrus_vga.o sga.o apic.o ioapic.o piix_pci.o
Blue Swirl1c9c5fc2011-02-13 12:31:28 +0000229obj-i386-y += vmport.o
Markus Armbruster09aaa162009-08-21 10:31:34 +0200230obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
Blue Swirld3ffc7a2010-03-21 19:47:10 +0000231obj-i386-y += debugcon.o multiboot.o
Jan Kiszkaaf2be202011-06-23 10:05:12 +0200232obj-i386-y += pc_piix.o
233obj-i386-$(CONFIG_KVM) += kvmclock.o
Gerd Hoffmanna19cbfb2010-04-27 11:50:11 +0200234obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
Juan Quintela96374432009-07-16 18:33:58 +0200235
Juan Quintela96374432009-07-16 18:33:58 +0200236# shared objects
Blue Swirl02c7c992010-03-29 19:23:57 +0000237obj-ppc-y = ppc.o
Blue Swirl4556bd82010-05-22 08:00:52 +0000238obj-ppc-y += vga.o
Juan Quintela96374432009-07-16 18:33:58 +0200239# PREP target
Blue Swirl956a3e62010-05-22 07:59:01 +0000240obj-ppc-y += i8259.o mc146818rtc.o
Blue Swirladd85a72010-03-29 19:24:04 +0000241obj-ppc-y += ppc_prep.o
Juan Quintela96374432009-07-16 18:33:58 +0200242# OldWorld PowerMac
Blue Swirl2b5eb372010-03-30 17:36:23 +0000243obj-ppc-y += ppc_oldworld.o
Juan Quintela96374432009-07-16 18:33:58 +0200244# NewWorld PowerMac
Blue Swirl2b5eb372010-03-30 17:36:23 +0000245obj-ppc-y += ppc_newworld.o
David Gibson4040ab72011-04-01 15:15:21 +1100246# IBM pSeries (sPAPR)
David Gibson9fdf0c22011-04-01 15:15:20 +1100247ifeq ($(CONFIG_FDT)$(TARGET_PPC64),yy)
David Gibson39ac8452011-04-01 15:15:23 +1100248obj-ppc-y += spapr.o spapr_hcall.o spapr_rtas.o spapr_vio.o
Ben Herrenschmidt6e270442011-04-01 15:15:31 +1100249obj-ppc-y += xics.o spapr_vty.o spapr_llan.o spapr_vscsi.o
David Gibson9fdf0c22011-04-01 15:15:20 +1100250endif
Juan Quintela96374432009-07-16 18:33:58 +0200251# PowerPC 4xx boards
Blue Swirl5f9fc5a2010-03-29 19:23:55 +0000252obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
Juan Quintela96374432009-07-16 18:33:58 +0200253obj-ppc-y += ppc440.o ppc440_bamboo.o
254# PowerPC E500 boards
Alexander Grafb0fb8422011-06-02 13:53:40 +0200255obj-ppc-y += ppce500_mpc8544ds.o mpc8544_guts.o
Edgar E. Iglesias2c50e262010-09-29 15:31:44 +0200256# PowerPC 440 Xilinx ML507 reference board.
257obj-ppc-y += virtex_ml507.o
Juan Quintela96374432009-07-16 18:33:58 +0200258obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
Juan Quintela3f0855b2009-07-27 16:12:52 +0200259obj-ppc-$(CONFIG_FDT) += device_tree.o
Juan Quintela96374432009-07-16 18:33:58 +0200260
Edgar E. Iglesias2c50e262010-09-29 15:31:44 +0200261# Xilinx PPC peripherals
262obj-ppc-y += xilinx_intc.o
263obj-ppc-y += xilinx_timer.o
264obj-ppc-y += xilinx_uartlite.o
265obj-ppc-y += xilinx_ethlite.o
266
Michael Walled8217322011-02-17 23:45:14 +0100267# LM32 boards
268obj-lm32-y += lm32_boards.o
Michael Walle5052d222011-03-07 23:32:44 +0100269obj-lm32-y += milkymist.o
Michael Walled8217322011-02-17 23:45:14 +0100270
Michael Walle81ea0e12011-02-17 23:45:02 +0100271# LM32 peripherals
Michael Walle4ef66fa2011-02-17 23:45:07 +0100272obj-lm32-y += lm32_pic.o
Michael Walle15d7dc42011-02-17 23:45:08 +0100273obj-lm32-y += lm32_juart.o
Michael Walleea7924d2011-02-17 23:45:10 +0100274obj-lm32-y += lm32_timer.o
Michael Walle770ae572011-02-17 23:45:11 +0100275obj-lm32-y += lm32_uart.o
Michael Wallef19410c2011-02-17 23:45:12 +0100276obj-lm32-y += lm32_sys.o
Michael Walle25a8bb92011-03-07 23:32:32 +0100277obj-lm32-y += milkymist-ac97.o
Michael Wallee4dc6d22011-03-07 23:32:33 +0100278obj-lm32-y += milkymist-hpdmc.o
Michael Walleb4e37d92011-03-07 23:32:34 +0100279obj-lm32-y += milkymist-memcard.o
Michael Walle57aa2652011-04-13 00:29:36 +0200280obj-lm32-y += milkymist-minimac2.o
Michael Walle5ee18b92011-03-07 23:32:36 +0100281obj-lm32-y += milkymist-pfpu.o
Michael Walle87a381e2011-03-07 23:32:37 +0100282obj-lm32-y += milkymist-softusb.o
Michael Walle96832422011-03-07 23:32:38 +0100283obj-lm32-y += milkymist-sysctl.o
Michael Walle0670dad2011-03-07 23:32:40 +0100284obj-lm32-$(CONFIG_OPENGL) += milkymist-tmu2.o
Michael Walle883de162011-03-07 23:32:41 +0100285obj-lm32-y += milkymist-uart.o
Michael Walled23948b2011-03-07 23:32:42 +0100286obj-lm32-y += milkymist-vgafb.o
287obj-lm32-y += framebuffer.o
Michael Walle81ea0e12011-02-17 23:45:02 +0100288
Juan Quintela96374432009-07-16 18:33:58 +0200289obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
Aurelien Jarno409dbce2010-03-14 21:20:59 +0100290obj-mips-y += mips_addr.o mips_timer.o mips_int.o
Blue Swirl4556bd82010-05-22 08:00:52 +0000291obj-mips-y += vga.o i8259.o
Blue Swirlb970ea82010-03-27 07:26:16 +0000292obj-mips-y += g364fb.o jazz_led.o
Blue Swirl956a3e62010-05-22 07:59:01 +0000293obj-mips-y += gt64xxx.o mc146818rtc.o
Blue Swirl08af49d2010-07-03 06:49:47 +0000294obj-mips-y += cirrus_vga.o
Huacai Chen051c1902010-06-29 10:50:43 +0800295obj-mips-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o
Juan Quintela96374432009-07-16 18:33:58 +0200296
Juan Quintela96374432009-07-16 18:33:58 +0200297obj-microblaze-y = petalogix_s3adsp1800_mmu.o
Michal Simek00914b72011-03-14 11:29:19 +0100298obj-microblaze-y += petalogix_ml605_mmu.o
Edgar E. Iglesias72b675c2009-05-20 21:17:31 +0200299
Juan Quintela96374432009-07-16 18:33:58 +0200300obj-microblaze-y += microblaze_pic_cpu.o
301obj-microblaze-y += xilinx_intc.o
302obj-microblaze-y += xilinx_timer.o
303obj-microblaze-y += xilinx_uartlite.o
304obj-microblaze-y += xilinx_ethlite.o
Edgar E. Iglesias93f1e402011-03-14 11:13:55 +0100305obj-microblaze-y += xilinx_axidma.o
306obj-microblaze-y += xilinx_axienet.o
Juan Quintela96374432009-07-16 18:33:58 +0200307
Juan Quintela3f0855b2009-07-27 16:12:52 +0200308obj-microblaze-$(CONFIG_FDT) += device_tree.o
Juan Quintela96374432009-07-16 18:33:58 +0200309
edgar_igl10c144e2009-01-07 12:19:50 +0000310# Boards
Edgar E. Iglesias77d4f952010-06-10 14:45:46 +0200311obj-cris-y = cris_pic_cpu.o
312obj-cris-y += cris-boot.o
Edgar E. Iglesias77d4f952010-06-10 14:45:46 +0200313obj-cris-y += axis_dev88.o
edgar_igl10c144e2009-01-07 12:19:50 +0000314
315# IO blocks
Juan Quintela96374432009-07-16 18:33:58 +0200316obj-cris-y += etraxfs_dma.o
317obj-cris-y += etraxfs_pic.o
318obj-cris-y += etraxfs_eth.o
319obj-cris-y += etraxfs_timer.o
320obj-cris-y += etraxfs_ser.o
edgar_igle62b5b12008-03-14 01:04:24 +0000321
bellard34751872005-07-02 14:31:34 +0000322ifeq ($(TARGET_ARCH), sparc64)
Blue Swirl956a3e62010-05-22 07:59:01 +0000323obj-sparc-y = sun4u.o apb_pci.o
Blue Swirl1afdfdd2010-03-21 19:47:00 +0000324obj-sparc-y += vga.o
Blue Swirl2d483772010-03-21 19:47:11 +0000325obj-sparc-y += mc146818rtc.o
Blue Swirlb9945042010-03-21 19:47:01 +0000326obj-sparc-y += cirrus_vga.o
bellard34751872005-07-02 14:31:34 +0000327else
Blue Swirl24056692010-04-03 07:35:50 +0000328obj-sparc-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o
Blue Swirl35da37e2010-03-21 19:47:06 +0000329obj-sparc-y += slavio_timer.o slavio_misc.o sparc32_dma.o
Fabien Chouteaub04d9892011-01-24 12:56:55 +0100330obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o leon3.o
331
332# GRLIB
333obj-sparc-y += grlib_gptimer.o grlib_irqmp.o grlib_apbuart.o
bellard34751872005-07-02 14:31:34 +0000334endif
Juan Quintela96374432009-07-16 18:33:58 +0200335
Paul Brookf165b532009-11-19 16:42:45 +0000336obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o
Juan Quintela96374432009-07-16 18:33:58 +0200337obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
338obj-arm-y += versatile_pci.o
Paul Brookf7c70322009-11-19 16:45:21 +0000339obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o
Juan Quintela96374432009-07-16 18:33:58 +0200340obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
341obj-arm-y += pl061.o
342obj-arm-y += arm-semi.o
343obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
344obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
Blue Swirl3d08ff62010-03-29 19:23:56 +0000345obj-arm-y += gumstix.o
Blue Swirlf7736b92010-03-27 06:20:53 +0000346obj-arm-y += zaurus.o ide/microdrive.o spitz.o tosa.o tc6393xb.o
cmchao02d74342010-05-31 23:54:23 +0800347obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o \
348 omap_gpio.o omap_intc.o omap_uart.o
cmchao2c1d9ec2010-05-31 23:54:22 +0800349obj-arm-y += omap2.o omap_dss.o soc_dma.o omap_gptimer.o omap_synctimer.o \
350 omap_gpmc.o omap_sdrc.o omap_spi.o omap_tap.o omap_l4.o
Juan Quintela96374432009-07-16 18:33:58 +0200351obj-arm-y += omap_sx1.o palm.o tsc210x.o
352obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
353obj-arm-y += mst_fpga.o mainstone.o
Vasily Khoruzhick3bf11202011-07-06 16:52:49 +0300354obj-arm-y += z2.o
Blue Swirl5f9fc5a2010-03-29 19:23:55 +0000355obj-arm-y += musicpal.o bitbang_i2c.o marvell_88w8618_audio.o
Juan Quintela96374432009-07-16 18:33:58 +0200356obj-arm-y += framebuffer.o
357obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
358obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
359obj-arm-y += syborg_virtio.o
Peter Maydell20552832011-03-07 11:10:32 +0000360obj-arm-y += vexpress.o
Dmitry Eremin-Solenikov5bc95aa2011-04-19 18:56:45 +0400361obj-arm-y += strongarm.o
Dmitry Eremin-Solenikovc64b21d2011-04-19 18:56:46 +0400362obj-arm-y += collie.o
Juan Quintela96374432009-07-16 18:33:58 +0200363
Juan Quintela96374432009-07-16 18:33:58 +0200364obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
Blue Swirl2d483772010-03-21 19:47:11 +0000365obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o
Blue Swirlf7736b92010-03-27 06:20:53 +0000366obj-sh4-y += ide/mmio.o
Juan Quintela96374432009-07-16 18:33:58 +0200367
368obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
369obj-m68k-y += m68k-semi.o dummy_m68k.o
370
Alexander Graf8cb310e2009-12-05 12:44:28 +0100371obj-s390x-y = s390-virtio-bus.o s390-virtio.o
Alexander Graff3304ee2009-12-05 12:44:27 +0100372
Richard Hendersonb758aca2011-05-20 14:02:28 -0700373obj-alpha-y = i8259.o mc146818rtc.o
374obj-alpha-y += vga.o cirrus_vga.o
Richard Henderson6049f4f2009-12-27 18:30:03 -0800375
Blue Swirlad960902010-03-29 19:23:52 +0000376main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
blueswir15824d652009-03-28 06:44:27 +0000377
Luiz Capitulinoacd0a092010-09-30 16:00:22 -0300378monitor.o: hmp-commands.h qmp-commands.h
Blue Swirl23130862009-06-06 08:22:04 +0000379
Andreas Färber0e8c9212010-01-06 20:24:05 +0100380$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
381
382obj-y += $(addprefix ../, $(common-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000383obj-y += $(addprefix ../libdis/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100384obj-y += $(libobj-y)
385obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
bellard626df762003-08-10 21:39:31 +0000386
Juan Quintela76dfdd22009-08-03 14:46:41 +0200387endif # CONFIG_SOFTMMU
bellard00a67ba2006-10-28 12:19:07 +0000388
Robert Relyea111a38b2010-11-28 16:36:38 +0200389ifndef CONFIG_LINUX_USER
Brad0fc6b582011-08-22 16:39:59 -0400390ifndef CONFIG_BSD_USER
Robert Relyea111a38b2010-11-28 16:36:38 +0200391# libcacard needs qemu-thread support, and besides is only needed by devices
Brad0fc6b582011-08-22 16:39:59 -0400392# so not requires with linux-user / bsd-user targets
Robert Relyea111a38b2010-11-28 16:36:38 +0200393obj-$(CONFIG_SMARTCARD_NSS) += $(addprefix ../libcacard/, $(libcacard-y))
Brad0fc6b582011-08-22 16:39:59 -0400394endif # CONFIG_BSD_USER
Robert Relyea111a38b2010-11-28 16:36:38 +0200395endif # CONFIG_LINUX_USER
396
Stefan Hajnoczi94a420b2010-05-22 17:52:39 +0100397obj-y += $(addprefix ../, $(trace-obj-y))
Juan Quintela3d0f1512009-10-07 02:41:04 +0200398obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
399
Andreas Färber0e8c9212010-01-06 20:24:05 +0100400$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
Lluíse03b41d2011-08-31 20:30:30 +0200401 $(call LINK,$^)
Juan Quintela16394482009-07-16 18:34:04 +0200402
403
Blue Swirl4c3b5a42011-01-20 20:54:21 +0000404gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
405 $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
pbrook56aebc82008-10-11 17:55:29 +0000406
Luiz Capitulinoacd0a092010-09-30 16:00:22 -0300407hmp-commands.h: $(SRC_PATH)/hmp-commands.hx
Blue Swirl4c3b5a42011-01-20 20:54:21 +0000408 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
Blue Swirl23130862009-06-06 08:22:04 +0000409
Luiz Capitulinof36b4af2010-09-15 17:17:45 -0300410qmp-commands.h: $(SRC_PATH)/qmp-commands.hx
Blue Swirl4c3b5a42011-01-20 20:54:21 +0000411 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
blueswir15824d652009-03-28 06:44:27 +0000412
bellard626df762003-08-10 21:39:31 +0000413clean:
Blue Swirl23130862009-06-06 08:22:04 +0000414 rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
Aneesh Kumar K.V353ac782011-01-28 18:09:08 +0530415 rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o
Luiz Capitulinoacd0a092010-09-30 16:00:22 -0300416 rm -f hmp-commands.h qmp-commands.h gdbstub-xml.c
Daniel P. Berrangec276b172010-11-12 13:20:25 +0000417ifdef CONFIG_SYSTEMTAP_TRACE
418 rm -f *.stp
419endif
bellard1e43adf2003-09-30 20:54:24 +0000420
ths5fafdf22007-09-16 21:08:06 +0000421install: all
bellard9b14bb02004-03-26 22:43:34 +0000422ifneq ($(PROGS),)
Hollis Blanchard52ba7842010-08-04 17:21:34 -0700423 $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
424ifneq ($(STRIP),)
425 $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS))
426endif
bellard9b14bb02004-03-26 22:43:34 +0000427endif
Daniel P. Berrangec276b172010-11-12 13:20:25 +0000428ifdef CONFIG_SYSTEMTAP_TRACE
429 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset"
430 $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset"
431endif
bellard626df762003-08-10 21:39:31 +0000432
j_mayer2f96c282007-10-28 13:07:12 +0000433# Include automatically generated dependency files
434-include $(wildcard *.d */*.d)