blob: 88d2f1fb7ec3d1fbf08df6168f6ba94b5abf4858 [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
bellard40293e52008-01-31 11:32:10 +000030QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
bellardde5eaa62003-11-16 23:18:17 +000031endif
bellard728c9fd2004-01-05 00:08:14 +000032
bellard40293e52008-01-31 11:32:10 +000033PROGS=$(QEMU_PROG)
Peter Maydellb8841702010-11-16 20:07:07 +000034STPFILES=
bellard626df762003-08-10 21:39:31 +000035
Andreas Färberaff447c2010-09-20 00:50:45 +020036ifndef CONFIG_HAIKU
bellard626df762003-08-10 21:39:31 +000037LIBS+=-lm
Andreas Färberaff447c2010-09-20 00:50:45 +020038endif
bellard626df762003-08-10 21:39:31 +000039
Juan Quintela91880d92009-10-07 02:41:01 +020040config-target.h: config-target.h-timestamp
41config-target.h-timestamp: config-target.mak
42
Lluís6d8a7642011-08-31 20:30:43 +020043ifdef CONFIG_TRACE_SYSTEMTAP
Daniel P. Berrangec276b172010-11-12 13:20:25 +000044stap: $(QEMU_PROG).stp
45
46ifdef CONFIG_USER_ONLY
47TARGET_TYPE=user
48else
49TARGET_TYPE=system
50endif
51
52$(QEMU_PROG).stp:
Blue Swirl4c3b5a42011-01-20 20:54:21 +000053 $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \
Daniel P. Berrangec276b172010-11-12 13:20:25 +000054 --$(TRACE_BACKEND) \
55 --binary $(bindir)/$(QEMU_PROG) \
56 --target-arch $(TARGET_ARCH) \
57 --target-type $(TARGET_TYPE) \
58 --stap < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp")
59else
60stap:
61endif
62
63all: $(PROGS) stap
Juan Quintela91880d92009-10-07 02:41:01 +020064
Paul Brookc2fb2632009-05-25 18:54:53 +010065# Dummy command so that make thinks it has done something
66 @true
bellard626df762003-08-10 21:39:31 +000067
bellard40293e52008-01-31 11:32:10 +000068#########################################################
bellard626df762003-08-10 21:39:31 +000069# cpu emulator library
Blue Swirlc2b023b2009-09-20 19:20:05 +000070libobj-y = exec.o translate-all.o cpu-exec.o translate.o
Kirill Batuzov8f2e8c02011-07-07 16:37:12 +040071libobj-y += tcg/tcg.o tcg/optimize.o
Aurelien Jarnocf67c6b2011-05-15 14:09:18 +020072libobj-y += fpu/softfloat.o
Juan Quintelac9e0df72009-06-25 00:08:00 +020073libobj-y += op_helper.o helper.o
Andre Przywarac6dc6f62010-03-11 14:38:55 +010074ifeq ($(TARGET_BASE_ARCH), i386)
75libobj-y += cpuid.o
76endif
Juan Quintela471857d2009-08-03 14:46:52 +020077libobj-$(CONFIG_NEED_MMU) += mmu.o
Juan Quintelae18ea862009-08-03 14:47:04 +020078libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
j_mayercf6c1b12007-04-05 20:46:02 +000079
Juan Quintelac9e0df72009-06-25 00:08:00 +020080libobj-y += disas.o
bellard626df762003-08-10 21:39:31 +000081
Andreas Färber0e8c9212010-01-06 20:24:05 +010082$(libobj-y): $(GENERATED_HEADERS)
bellard40293e52008-01-31 11:32:10 +000083
Andreas Färber0e8c9212010-01-06 20:24:05 +010084# libqemu
bellard40293e52008-01-31 11:32:10 +000085
aurel3286e840e2008-12-07 15:21:23 +000086translate.o: translate.c cpu.h
bellard40293e52008-01-31 11:32:10 +000087
aurel3286e840e2008-12-07 15:21:23 +000088translate-all.o: translate-all.c cpu.h
bellard40293e52008-01-31 11:32:10 +000089
aurel3286e840e2008-12-07 15:21:23 +000090tcg/tcg.o: cpu.h
bellard40293e52008-01-31 11:32:10 +000091
92# HELPER_CFLAGS is used for all the code compiled with static register
93# variables
Blue Swirla3ce3662011-07-20 20:23:01 +000094op_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
bellard40293e52008-01-31 11:32:10 +000095
Juan Quintelac81da562009-08-03 14:46:24 +020096# Note: this is a workaround. The real fix is to avoid compiling
Blue Swirl42a623c2011-05-08 11:22:38 +000097# cpu_signal_handler() in user-exec.c.
Juan Quintelac81da562009-08-03 14:46:24 +020098signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
99
bellard40293e52008-01-31 11:32:10 +0000100#########################################################
101# Linux user emulator target
102
103ifdef CONFIG_LINUX_USER
104
Paolo Bonzini076d2472009-12-21 10:06:55 +0100105$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
106
Mike Frysingerc3109ba2011-02-07 01:05:54 -0500107QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
Blue Swirl37022082009-08-15 07:51:59 +0000108obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
Richard Henderson680c8772010-05-21 10:37:52 -0700109 elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \
Anthony Liguori41a74822011-08-20 22:23:03 -0500110 user-exec.o $(oslib-obj-y)
Blue Swirl5ba65312009-08-15 07:52:19 +0000111
Juan Quintela943e0a32009-06-25 00:08:10 +0200112obj-$(TARGET_HAS_BFLT) += flatload.o
bellard40293e52008-01-31 11:32:10 +0000113
Juan Quintelae18ea862009-08-03 14:47:04 +0200114obj-$(TARGET_I386) += vm86.o
Juan Quintela1c872672009-07-16 18:34:03 +0200115
Blue Swirle27b27b2009-08-16 07:39:33 +0000116obj-i386-y += ioport-user.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000117
Juan Quintelaed69c302009-08-03 14:47:01 +0200118nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
Juan Quintela9c1dd992009-07-16 17:57:04 +0200119nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
Juan Quintela1c872672009-07-16 18:34:03 +0200120obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y))
121obj-arm-y += arm-semi.o
122
123obj-m68k-y += m68k-sim.o m68k-semi.o
bellard40293e52008-01-31 11:32:10 +0000124
Andreas Färber0e8c9212010-01-06 20:24:05 +0100125$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
126
127obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000128obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100129obj-y += $(libobj-y)
Blue Swirladd16152009-09-27 16:26:02 +0000130
bellard40293e52008-01-31 11:32:10 +0000131endif #CONFIG_LINUX_USER
132
133#########################################################
134# Darwin user emulator target
135
136ifdef CONFIG_DARWIN_USER
137
Paolo Bonzini076d2472009-12-21 10:06:55 +0100138$(call set-vpath, $(SRC_PATH)/darwin-user)
139
Juan Quintelaa558ee12009-08-03 14:46:21 +0200140QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
bellard40293e52008-01-31 11:32:10 +0000141
142# Leave some space for the regular program loading zone
143LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
144
145LIBS+=-lmx
146
Juan Quintelaa8e492c2009-06-25 00:08:01 +0200147obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
Blue Swirl42a623c2011-05-08 11:22:38 +0000148 gdbstub.o user-exec.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000149
Blue Swirle27b27b2009-08-16 07:39:33 +0000150obj-i386-y += ioport-user.o
bellard40293e52008-01-31 11:32:10 +0000151
Andreas Färber0e8c9212010-01-06 20:24:05 +0100152$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
153
154obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000155obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100156obj-y += $(libobj-y)
bellard40293e52008-01-31 11:32:10 +0000157
158endif #CONFIG_DARWIN_USER
159
160#########################################################
blueswir184778502008-10-26 20:33:16 +0000161# BSD user emulator target
162
163ifdef CONFIG_BSD_USER
164
Paolo Bonzini076d2472009-12-21 10:06:55 +0100165$(call set-vpath, $(SRC_PATH)/bsd-user)
166
Juan Quintelaa558ee12009-08-03 14:46:21 +0200167QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
blueswir184778502008-10-26 20:33:16 +0000168
Blue Swirl37022082009-08-15 07:51:59 +0000169obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
Blue Swirl42a623c2011-05-08 11:22:38 +0000170 gdbstub.o uaccess.o user-exec.o
Blue Swirl5ba65312009-08-15 07:52:19 +0000171
Blue Swirle27b27b2009-08-16 07:39:33 +0000172obj-i386-y += ioport-user.o
blueswir184778502008-10-26 20:33:16 +0000173
Andreas Färber0e8c9212010-01-06 20:24:05 +0100174$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
175
176obj-y += $(addprefix ../libuser/, $(user-obj-y))
Blue Swirl4d904532010-03-21 08:28:47 +0000177obj-y += $(addprefix ../libdis-user/, $(libdis-y))
Andreas Färber0e8c9212010-01-06 20:24:05 +0100178obj-y += $(libobj-y)
blueswir184778502008-10-26 20:33:16 +0000179
180endif #CONFIG_BSD_USER
181
182#########################################################
bellard40293e52008-01-31 11:32:10 +0000183# System emulator target
Juan Quintela76dfdd22009-08-03 14:46:41 +0200184ifdef CONFIG_SOFTMMU
bellard40293e52008-01-31 11:32:10 +0000185
Blue Swirl04c9a0c2010-04-19 19:46:13 +0000186obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o
aliguori1fd31ad2008-12-18 01:56:22 +0000187# virtio has to be here due to weird dependency between PCI and virtio-net.
188# need to fix this properly
Isaku Yamahatab3a29fd2010-12-22 19:54:48 +0900189obj-$(CONFIG_NO_PCI) += pci-stub.o
Blue Swirl21673cd2011-07-14 15:22:20 +0000190obj-$(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 +0200191obj-y += vhost_net.o
192obj-$(CONFIG_VHOST_NET) += vhost.o
Aneesh Kumar K.Vf4f61d22011-06-01 12:35:13 +0530193obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/virtio-9p-device.o
Juan Quintelaa8e492c2009-06-25 00:08:01 +0200194obj-$(CONFIG_KVM) += kvm.o kvm-all.o
Paolo Bonzini98c85732010-04-19 18:59:30 +0000195obj-$(CONFIG_NO_KVM) += kvm-stub.o
Avi Kivity093bc2c2011-07-26 14:26:01 +0300196obj-y += memory.o
bellard40293e52008-01-31 11:32:10 +0000197LIBS+=-lz
bellard4fb240a2007-11-07 19:24:02 +0000198
Juan Quintelaa558ee12009-08-03 14:46:21 +0200199QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
Juan Quintelaa558ee12009-08-03 14:46:21 +0200200QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
Corentin Chary2f6f5c72010-07-07 20:57:49 +0200201QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)
Corentin Charyefe556a2010-07-07 20:57:56 +0200202QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
Anthony Liguorie18df142011-07-19 14:50:29 -0500203QEMU_CFLAGS += $(GLIB_CFLAGS)
aliguori2f9606b2009-03-06 20:27:28 +0000204
Anthony PERARD3285cf42010-08-19 12:27:56 +0100205# xen support
Jan Kiszka868bb332011-06-21 22:59:09 +0200206obj-$(CONFIG_XEN) += xen-all.o xen_machine_pv.o xen_domainbuild.o xen-mapcache.o
Anthony PERARD3285cf42010-08-19 12:27:56 +0100207obj-$(CONFIG_NO_XEN) += xen-stub.o
208
Steven Smith01195b72011-06-16 17:05:17 +0100209obj-i386-$(CONFIG_XEN) += xen_platform.o
210
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600211# Inter-VM PCI shared memory
Alexander Graf1b01b4e2011-03-29 15:29:28 +0200212CONFIG_IVSHMEM =
213ifeq ($(CONFIG_KVM), y)
214 ifeq ($(CONFIG_PCI), y)
215 CONFIG_IVSHMEM = y
216 endif
217endif
218obj-$(CONFIG_IVSHMEM) += ivshmem.o
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600219
bellarda541f292004-04-12 20:39:29 +0000220# Hardware support
Blue Swirl7f55c7c2010-03-21 19:47:03 +0000221obj-i386-y += vga.o
Blue Swirl2d483772010-03-21 19:47:11 +0000222obj-i386-y += mc146818rtc.o i8259.o pc.o
Glauber Costaa90d4692011-05-16 15:45:08 -0300223obj-i386-y += cirrus_vga.o sga.o apic.o ioapic.o piix_pci.o
Blue Swirl1c9c5fc2011-02-13 12:31:28 +0000224obj-i386-y += vmport.o
Markus Armbruster09aaa162009-08-21 10:31:34 +0200225obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
Blue Swirld3ffc7a2010-03-21 19:47:10 +0000226obj-i386-y += debugcon.o multiboot.o
Jan Kiszkaaf2be202011-06-23 10:05:12 +0200227obj-i386-y += pc_piix.o
228obj-i386-$(CONFIG_KVM) += kvmclock.o
Gerd Hoffmanna19cbfb2010-04-27 11:50:11 +0200229obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
Juan Quintela96374432009-07-16 18:33:58 +0200230
Juan Quintela96374432009-07-16 18:33:58 +0200231# shared objects
Blue Swirl02c7c992010-03-29 19:23:57 +0000232obj-ppc-y = ppc.o
Blue Swirl4556bd82010-05-22 08:00:52 +0000233obj-ppc-y += vga.o
Juan Quintela96374432009-07-16 18:33:58 +0200234# PREP target
Blue Swirl956a3e62010-05-22 07:59:01 +0000235obj-ppc-y += i8259.o mc146818rtc.o
Blue Swirladd85a72010-03-29 19:24:04 +0000236obj-ppc-y += ppc_prep.o
Juan Quintela96374432009-07-16 18:33:58 +0200237# OldWorld PowerMac
Blue Swirl2b5eb372010-03-30 17:36:23 +0000238obj-ppc-y += ppc_oldworld.o
Juan Quintela96374432009-07-16 18:33:58 +0200239# NewWorld PowerMac
Blue Swirl2b5eb372010-03-30 17:36:23 +0000240obj-ppc-y += ppc_newworld.o
David Gibson4040ab72011-04-01 15:15:21 +1100241# IBM pSeries (sPAPR)
David Gibson9fdf0c22011-04-01 15:15:20 +1100242ifeq ($(CONFIG_FDT)$(TARGET_PPC64),yy)
David Gibson39ac8452011-04-01 15:15:23 +1100243obj-ppc-y += spapr.o spapr_hcall.o spapr_rtas.o spapr_vio.o
Ben Herrenschmidt6e270442011-04-01 15:15:31 +1100244obj-ppc-y += xics.o spapr_vty.o spapr_llan.o spapr_vscsi.o
David Gibson9fdf0c22011-04-01 15:15:20 +1100245endif
Juan Quintela96374432009-07-16 18:33:58 +0200246# PowerPC 4xx boards
Blue Swirl5f9fc5a2010-03-29 19:23:55 +0000247obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
Juan Quintela96374432009-07-16 18:33:58 +0200248obj-ppc-y += ppc440.o ppc440_bamboo.o
249# PowerPC E500 boards
Alexander Grafb0fb8422011-06-02 13:53:40 +0200250obj-ppc-y += ppce500_mpc8544ds.o mpc8544_guts.o
Edgar E. Iglesias2c50e262010-09-29 15:31:44 +0200251# PowerPC 440 Xilinx ML507 reference board.
252obj-ppc-y += virtex_ml507.o
Juan Quintela96374432009-07-16 18:33:58 +0200253obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
Juan Quintela3f0855b2009-07-27 16:12:52 +0200254obj-ppc-$(CONFIG_FDT) += device_tree.o
Juan Quintela96374432009-07-16 18:33:58 +0200255
Edgar E. Iglesias2c50e262010-09-29 15:31:44 +0200256# Xilinx PPC peripherals
257obj-ppc-y += xilinx_intc.o
258obj-ppc-y += xilinx_timer.o
259obj-ppc-y += xilinx_uartlite.o
260obj-ppc-y += xilinx_ethlite.o
261
Michael Walled8217322011-02-17 23:45:14 +0100262# LM32 boards
263obj-lm32-y += lm32_boards.o
Michael Walle5052d222011-03-07 23:32:44 +0100264obj-lm32-y += milkymist.o
Michael Walled8217322011-02-17 23:45:14 +0100265
Michael Walle81ea0e12011-02-17 23:45:02 +0100266# LM32 peripherals
Michael Walle4ef66fa2011-02-17 23:45:07 +0100267obj-lm32-y += lm32_pic.o
Michael Walle15d7dc42011-02-17 23:45:08 +0100268obj-lm32-y += lm32_juart.o
Michael Walleea7924d2011-02-17 23:45:10 +0100269obj-lm32-y += lm32_timer.o
Michael Walle770ae572011-02-17 23:45:11 +0100270obj-lm32-y += lm32_uart.o
Michael Wallef19410c2011-02-17 23:45:12 +0100271obj-lm32-y += lm32_sys.o
Michael Walle25a8bb92011-03-07 23:32:32 +0100272obj-lm32-y += milkymist-ac97.o
Michael Wallee4dc6d22011-03-07 23:32:33 +0100273obj-lm32-y += milkymist-hpdmc.o
Michael Walleb4e37d92011-03-07 23:32:34 +0100274obj-lm32-y += milkymist-memcard.o
Michael Walle57aa2652011-04-13 00:29:36 +0200275obj-lm32-y += milkymist-minimac2.o
Michael Walle5ee18b92011-03-07 23:32:36 +0100276obj-lm32-y += milkymist-pfpu.o
Michael Walle87a381e2011-03-07 23:32:37 +0100277obj-lm32-y += milkymist-softusb.o
Michael Walle96832422011-03-07 23:32:38 +0100278obj-lm32-y += milkymist-sysctl.o
Michael Walle0670dad2011-03-07 23:32:40 +0100279obj-lm32-$(CONFIG_OPENGL) += milkymist-tmu2.o
Michael Walle883de162011-03-07 23:32:41 +0100280obj-lm32-y += milkymist-uart.o
Michael Walled23948b2011-03-07 23:32:42 +0100281obj-lm32-y += milkymist-vgafb.o
282obj-lm32-y += framebuffer.o
Michael Walle81ea0e12011-02-17 23:45:02 +0100283
Juan Quintela96374432009-07-16 18:33:58 +0200284obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
Aurelien Jarno409dbce2010-03-14 21:20:59 +0100285obj-mips-y += mips_addr.o mips_timer.o mips_int.o
Blue Swirl4556bd82010-05-22 08:00:52 +0000286obj-mips-y += vga.o i8259.o
Blue Swirl12134062011-09-04 20:51:28 +0000287obj-mips-y += jazz_led.o
Blue Swirl956a3e62010-05-22 07:59:01 +0000288obj-mips-y += gt64xxx.o mc146818rtc.o
Blue Swirl08af49d2010-07-03 06:49:47 +0000289obj-mips-y += cirrus_vga.o
Huacai Chen051c1902010-06-29 10:50:43 +0800290obj-mips-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o
Juan Quintela96374432009-07-16 18:33:58 +0200291
Juan Quintela96374432009-07-16 18:33:58 +0200292obj-microblaze-y = petalogix_s3adsp1800_mmu.o
Michal Simek00914b72011-03-14 11:29:19 +0100293obj-microblaze-y += petalogix_ml605_mmu.o
Edgar E. Iglesias72b675c2009-05-20 21:17:31 +0200294
Juan Quintela96374432009-07-16 18:33:58 +0200295obj-microblaze-y += microblaze_pic_cpu.o
296obj-microblaze-y += xilinx_intc.o
297obj-microblaze-y += xilinx_timer.o
298obj-microblaze-y += xilinx_uartlite.o
299obj-microblaze-y += xilinx_ethlite.o
Edgar E. Iglesias93f1e402011-03-14 11:13:55 +0100300obj-microblaze-y += xilinx_axidma.o
301obj-microblaze-y += xilinx_axienet.o
Juan Quintela96374432009-07-16 18:33:58 +0200302
Juan Quintela3f0855b2009-07-27 16:12:52 +0200303obj-microblaze-$(CONFIG_FDT) += device_tree.o
Juan Quintela96374432009-07-16 18:33:58 +0200304
edgar_igl10c144e2009-01-07 12:19:50 +0000305# Boards
Edgar E. Iglesias77d4f952010-06-10 14:45:46 +0200306obj-cris-y = cris_pic_cpu.o
307obj-cris-y += cris-boot.o
Edgar E. Iglesias77d4f952010-06-10 14:45:46 +0200308obj-cris-y += axis_dev88.o
edgar_igl10c144e2009-01-07 12:19:50 +0000309
310# IO blocks
Juan Quintela96374432009-07-16 18:33:58 +0200311obj-cris-y += etraxfs_dma.o
312obj-cris-y += etraxfs_pic.o
313obj-cris-y += etraxfs_eth.o
314obj-cris-y += etraxfs_timer.o
315obj-cris-y += etraxfs_ser.o
edgar_igle62b5b12008-03-14 01:04:24 +0000316
bellard34751872005-07-02 14:31:34 +0000317ifeq ($(TARGET_ARCH), sparc64)
Blue Swirl956a3e62010-05-22 07:59:01 +0000318obj-sparc-y = sun4u.o apb_pci.o
Blue Swirl1afdfdd2010-03-21 19:47:00 +0000319obj-sparc-y += vga.o
Blue Swirl2d483772010-03-21 19:47:11 +0000320obj-sparc-y += mc146818rtc.o
Blue Swirlb9945042010-03-21 19:47:01 +0000321obj-sparc-y += cirrus_vga.o
bellard34751872005-07-02 14:31:34 +0000322else
Blue Swirl24056692010-04-03 07:35:50 +0000323obj-sparc-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o
Blue Swirl35da37e2010-03-21 19:47:06 +0000324obj-sparc-y += slavio_timer.o slavio_misc.o sparc32_dma.o
Fabien Chouteaub04d9892011-01-24 12:56:55 +0100325obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o leon3.o
326
327# GRLIB
328obj-sparc-y += grlib_gptimer.o grlib_irqmp.o grlib_apbuart.o
bellard34751872005-07-02 14:31:34 +0000329endif
Juan Quintela96374432009-07-16 18:33:58 +0200330
Paul Brookf165b532009-11-19 16:42:45 +0000331obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o
Juan Quintela96374432009-07-16 18:33:58 +0200332obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
333obj-arm-y += versatile_pci.o
Paul Brookf7c70322009-11-19 16:45:21 +0000334obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o
Juan Quintela96374432009-07-16 18:33:58 +0200335obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
336obj-arm-y += pl061.o
337obj-arm-y += arm-semi.o
338obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
339obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
Blue Swirl3d08ff62010-03-29 19:23:56 +0000340obj-arm-y += gumstix.o
Blue Swirlf7736b92010-03-27 06:20:53 +0000341obj-arm-y += zaurus.o ide/microdrive.o spitz.o tosa.o tc6393xb.o
cmchao02d74342010-05-31 23:54:23 +0800342obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o \
343 omap_gpio.o omap_intc.o omap_uart.o
cmchao2c1d9ec2010-05-31 23:54:22 +0800344obj-arm-y += omap2.o omap_dss.o soc_dma.o omap_gptimer.o omap_synctimer.o \
345 omap_gpmc.o omap_sdrc.o omap_spi.o omap_tap.o omap_l4.o
Juan Quintela96374432009-07-16 18:33:58 +0200346obj-arm-y += omap_sx1.o palm.o tsc210x.o
347obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
348obj-arm-y += mst_fpga.o mainstone.o
Vasily Khoruzhick3bf11202011-07-06 16:52:49 +0300349obj-arm-y += z2.o
Blue Swirl5f9fc5a2010-03-29 19:23:55 +0000350obj-arm-y += musicpal.o bitbang_i2c.o marvell_88w8618_audio.o
Juan Quintela96374432009-07-16 18:33:58 +0200351obj-arm-y += framebuffer.o
352obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
353obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
354obj-arm-y += syborg_virtio.o
Peter Maydell20552832011-03-07 11:10:32 +0000355obj-arm-y += vexpress.o
Dmitry Eremin-Solenikov5bc95aa2011-04-19 18:56:45 +0400356obj-arm-y += strongarm.o
Dmitry Eremin-Solenikovc64b21d2011-04-19 18:56:46 +0400357obj-arm-y += collie.o
Juan Quintela96374432009-07-16 18:33:58 +0200358
Juan Quintela96374432009-07-16 18:33:58 +0200359obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
Blue Swirl2d483772010-03-21 19:47:11 +0000360obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o
Blue Swirlf7736b92010-03-27 06:20:53 +0000361obj-sh4-y += ide/mmio.o
Juan Quintela96374432009-07-16 18:33:58 +0200362
363obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
364obj-m68k-y += m68k-semi.o dummy_m68k.o
365
Alexander Graf8cb310e2009-12-05 12:44:28 +0100366obj-s390x-y = s390-virtio-bus.o s390-virtio.o
Alexander Graff3304ee2009-12-05 12:44:27 +0100367
Richard Hendersonb758aca2011-05-20 14:02:28 -0700368obj-alpha-y = i8259.o mc146818rtc.o
369obj-alpha-y += vga.o cirrus_vga.o
Richard Henderson6049f4f2009-12-27 18:30:03 -0800370
Max Filippov23288262011-09-06 03:55:25 +0400371obj-xtensa-y += xtensa_pic.o
Max Filippov7b039f72011-09-06 03:55:30 +0400372obj-xtensa-y += xtensa_sample.o
Max Filippov47d05a82011-09-06 03:55:55 +0400373obj-xtensa-y += xtensa_dc232b.o
Max Filippov1ddeaa52011-09-06 03:55:47 +0400374obj-xtensa-y += xtensa-semi.o
Max Filippov23288262011-09-06 03:55:25 +0400375
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))
Lluís Vilanova937b1252011-09-15 22:45:42 +0200386obj-y += $(addprefix ../, $(trace-obj-y))
bellard626df762003-08-10 21:39:31 +0000387
Juan Quintela76dfdd22009-08-03 14:46:41 +0200388endif # CONFIG_SOFTMMU
bellard00a67ba2006-10-28 12:19:07 +0000389
Robert Relyea111a38b2010-11-28 16:36:38 +0200390ifndef CONFIG_LINUX_USER
Brad0fc6b582011-08-22 16:39:59 -0400391ifndef CONFIG_BSD_USER
Robert Relyea111a38b2010-11-28 16:36:38 +0200392# libcacard needs qemu-thread support, and besides is only needed by devices
Brad0fc6b582011-08-22 16:39:59 -0400393# so not requires with linux-user / bsd-user targets
Robert Relyea111a38b2010-11-28 16:36:38 +0200394obj-$(CONFIG_SMARTCARD_NSS) += $(addprefix ../libcacard/, $(libcacard-y))
Brad0fc6b582011-08-22 16:39:59 -0400395endif # CONFIG_BSD_USER
Robert Relyea111a38b2010-11-28 16:36:38 +0200396endif # CONFIG_LINUX_USER
397
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
Lluís6d8a7642011-08-31 20:30:43 +0200417ifdef CONFIG_TRACE_SYSTEMTAP
Daniel P. Berrangec276b172010-11-12 13:20:25 +0000418 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
Lluís6d8a7642011-08-31 20:30:43 +0200428ifdef CONFIG_TRACE_SYSTEMTAP
Daniel P. Berrangec276b172010-11-12 13:20:25 +0000429 $(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)