Anthony Liguori | 562593a | 2009-08-04 08:24:23 -0500 | [diff] [blame] | 1 | # -*- Mode: makefile -*- |
| 2 | |
Paul Brook | a992fe3 | 2009-11-22 16:25:30 +0000 | [diff] [blame] | 3 | GENERATED_HEADERS = config-target.h |
Paolo Bonzini | 98c8573 | 2010-04-19 18:59:30 +0000 | [diff] [blame] | 4 | CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y) |
Juan Quintela | f527c57 | 2009-11-05 17:19:57 +0100 | [diff] [blame] | 5 | |
Juan Quintela | deed3cc | 2009-10-07 02:40:57 +0200 | [diff] [blame] | 6 | include ../config-host.mak |
Juan Quintela | 1f3d3c8 | 2009-10-07 02:41:02 +0200 | [diff] [blame] | 7 | include config-devices.mak |
Juan Quintela | 25be210f | 2009-10-07 02:41:00 +0200 | [diff] [blame] | 8 | include config-target.mak |
aliguori | 1775918 | 2009-01-21 18:12:52 +0000 | [diff] [blame] | 9 | include $(SRC_PATH)/rules.mak |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 10 | ifneq ($(HWDIR),) |
| 11 | include $(HWDIR)/config.mak |
| 12 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 13 | |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 14 | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
Paolo Bonzini | 076d247 | 2009-12-21 10:06:55 +0100 | [diff] [blame] | 15 | $(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw) |
Juan Quintela | 6c90361 | 2009-08-03 14:46:23 +0200 | [diff] [blame] | 16 | QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 17 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 18 | include $(SRC_PATH)/Makefile.objs |
| 19 | |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 20 | ifdef CONFIG_USER_ONLY |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 21 | # user emulator name |
| 22 | QEMU_PROG=qemu-$(TARGET_ARCH2) |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 23 | else |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 24 | # system emulator name |
| 25 | ifeq ($(TARGET_ARCH), i386) |
| 26 | QEMU_PROG=qemu$(EXESUF) |
| 27 | else |
| 28 | QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF) |
bellard | de5eaa6 | 2003-11-16 23:18:17 +0000 | [diff] [blame] | 29 | endif |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 30 | endif |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 31 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 32 | PROGS=$(QEMU_PROG) |
Peter Maydell | b884170 | 2010-11-16 20:07:07 +0000 | [diff] [blame] | 33 | STPFILES= |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 34 | |
Andreas Färber | aff447c | 2010-09-20 00:50:45 +0200 | [diff] [blame] | 35 | ifndef CONFIG_HAIKU |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 36 | LIBS+=-lm |
Andreas Färber | aff447c | 2010-09-20 00:50:45 +0200 | [diff] [blame] | 37 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 38 | |
Jan Kiszka | 0e1a275 | 2010-04-06 13:31:29 +0200 | [diff] [blame] | 39 | kvm.o kvm-all.o vhost.o vhost_net.o: QEMU_CFLAGS+=$(KVM_CFLAGS) |
aliguori | 7ba1e61 | 2008-11-05 16:04:33 +0000 | [diff] [blame] | 40 | |
Juan Quintela | 91880d9 | 2009-10-07 02:41:01 +0200 | [diff] [blame] | 41 | config-target.h: config-target.h-timestamp |
| 42 | config-target.h-timestamp: config-target.mak |
| 43 | |
Daniel P. Berrange | c276b17 | 2010-11-12 13:20:25 +0000 | [diff] [blame^] | 44 | ifdef CONFIG_SYSTEMTAP_TRACE |
| 45 | stap: $(QEMU_PROG).stp |
| 46 | |
| 47 | ifdef CONFIG_USER_ONLY |
| 48 | TARGET_TYPE=user |
| 49 | else |
| 50 | TARGET_TYPE=system |
| 51 | endif |
| 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") |
| 60 | else |
| 61 | stap: |
| 62 | endif |
| 63 | |
| 64 | all: $(PROGS) stap |
Juan Quintela | 91880d9 | 2009-10-07 02:41:01 +0200 | [diff] [blame] | 65 | |
Paul Brook | c2fb263 | 2009-05-25 18:54:53 +0100 | [diff] [blame] | 66 | # Dummy command so that make thinks it has done something |
| 67 | @true |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 68 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 69 | ######################################################### |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 70 | # cpu emulator library |
Blue Swirl | c2b023b | 2009-09-20 19:20:05 +0000 | [diff] [blame] | 71 | libobj-y = exec.o translate-all.o cpu-exec.o translate.o |
Blue Swirl | 96e132e | 2009-09-20 19:06:34 +0000 | [diff] [blame] | 72 | libobj-y += tcg/tcg.o |
Juan Quintela | d6b3893 | 2009-08-03 14:46:42 +0200 | [diff] [blame] | 73 | libobj-$(CONFIG_SOFTFLOAT) += fpu/softfloat.o |
| 74 | libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o |
Juan Quintela | c9e0df7 | 2009-06-25 00:08:00 +0200 | [diff] [blame] | 75 | libobj-y += op_helper.o helper.o |
Andre Przywara | c6dc6f6 | 2010-03-11 14:38:55 +0100 | [diff] [blame] | 76 | ifeq ($(TARGET_BASE_ARCH), i386) |
| 77 | libobj-y += cpuid.o |
| 78 | endif |
Juan Quintela | 471857d | 2009-08-03 14:46:52 +0200 | [diff] [blame] | 79 | libobj-$(CONFIG_NEED_MMU) += mmu.o |
Juan Quintela | e18ea86 | 2009-08-03 14:47:04 +0200 | [diff] [blame] | 80 | libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o |
j_mayer | cf6c1b1 | 2007-04-05 20:46:02 +0000 | [diff] [blame] | 81 | |
Juan Quintela | c9e0df7 | 2009-06-25 00:08:00 +0200 | [diff] [blame] | 82 | libobj-y += disas.o |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 83 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 84 | $(libobj-y): $(GENERATED_HEADERS) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 85 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 86 | # libqemu |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 87 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 88 | translate.o: translate.c cpu.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 89 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 90 | translate-all.o: translate-all.c cpu.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 91 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 92 | tcg/tcg.o: cpu.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 93 | |
| 94 | # HELPER_CFLAGS is used for all the code compiled with static register |
| 95 | # variables |
Juan Quintela | 864de24 | 2009-08-03 14:46:55 +0200 | [diff] [blame] | 96 | op_helper.o cpu-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 97 | |
Juan Quintela | c81da56 | 2009-08-03 14:46:24 +0200 | [diff] [blame] | 98 | # Note: this is a workaround. The real fix is to avoid compiling |
| 99 | # cpu_signal_handler() in cpu-exec.c. |
| 100 | signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) |
| 101 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 102 | ######################################################### |
| 103 | # Linux user emulator target |
| 104 | |
| 105 | ifdef CONFIG_LINUX_USER |
| 106 | |
Paolo Bonzini | 076d247 | 2009-12-21 10:06:55 +0100 | [diff] [blame] | 107 | $(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)) |
| 108 | |
Juan Quintela | a558ee1 | 2009-08-03 14:46:21 +0200 | [diff] [blame] | 109 | QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
Blue Swirl | 3702208 | 2009-08-15 07:51:59 +0000 | [diff] [blame] | 110 | obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \ |
Richard Henderson | 680c877 | 2010-05-21 10:37:52 -0700 | [diff] [blame] | 111 | elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \ |
Jes Sorensen | b152aa8 | 2010-10-26 10:39:26 +0200 | [diff] [blame] | 112 | qemu-malloc.o $(oslib-obj-y) |
Blue Swirl | 5ba6531 | 2009-08-15 07:52:19 +0000 | [diff] [blame] | 113 | |
Juan Quintela | 943e0a3 | 2009-06-25 00:08:10 +0200 | [diff] [blame] | 114 | obj-$(TARGET_HAS_BFLT) += flatload.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 115 | |
Juan Quintela | e18ea86 | 2009-08-03 14:47:04 +0200 | [diff] [blame] | 116 | obj-$(TARGET_I386) += vm86.o |
Juan Quintela | 1c87267 | 2009-07-16 18:34:03 +0200 | [diff] [blame] | 117 | |
Blue Swirl | e27b27b | 2009-08-16 07:39:33 +0000 | [diff] [blame] | 118 | obj-i386-y += ioport-user.o |
Blue Swirl | 5ba6531 | 2009-08-15 07:52:19 +0000 | [diff] [blame] | 119 | |
Juan Quintela | ed69c30 | 2009-08-03 14:47:01 +0200 | [diff] [blame] | 120 | nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o |
Juan Quintela | 9c1dd99 | 2009-07-16 17:57:04 +0200 | [diff] [blame] | 121 | nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o |
Juan Quintela | 1c87267 | 2009-07-16 18:34:03 +0200 | [diff] [blame] | 122 | obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y)) |
| 123 | obj-arm-y += arm-semi.o |
| 124 | |
| 125 | obj-m68k-y += m68k-sim.o m68k-semi.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 126 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 127 | $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS) |
| 128 | |
| 129 | obj-y += $(addprefix ../libuser/, $(user-obj-y)) |
Blue Swirl | 4d90453 | 2010-03-21 08:28:47 +0000 | [diff] [blame] | 130 | obj-y += $(addprefix ../libdis-user/, $(libdis-y)) |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 131 | obj-y += $(libobj-y) |
Blue Swirl | add1615 | 2009-09-27 16:26:02 +0000 | [diff] [blame] | 132 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 133 | endif #CONFIG_LINUX_USER |
| 134 | |
| 135 | ######################################################### |
| 136 | # Darwin user emulator target |
| 137 | |
| 138 | ifdef CONFIG_DARWIN_USER |
| 139 | |
Paolo Bonzini | 076d247 | 2009-12-21 10:06:55 +0100 | [diff] [blame] | 140 | $(call set-vpath, $(SRC_PATH)/darwin-user) |
| 141 | |
Juan Quintela | a558ee1 | 2009-08-03 14:46:21 +0200 | [diff] [blame] | 142 | QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 143 | |
| 144 | # Leave some space for the regular program loading zone |
| 145 | LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000 |
| 146 | |
| 147 | LIBS+=-lmx |
| 148 | |
Juan Quintela | a8e492c | 2009-06-25 00:08:01 +0200 | [diff] [blame] | 149 | obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \ |
Juan Quintela | 3d0f151 | 2009-10-07 02:41:04 +0200 | [diff] [blame] | 150 | gdbstub.o |
Blue Swirl | 5ba6531 | 2009-08-15 07:52:19 +0000 | [diff] [blame] | 151 | |
Blue Swirl | e27b27b | 2009-08-16 07:39:33 +0000 | [diff] [blame] | 152 | obj-i386-y += ioport-user.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 153 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 154 | $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS) |
| 155 | |
| 156 | obj-y += $(addprefix ../libuser/, $(user-obj-y)) |
Blue Swirl | 4d90453 | 2010-03-21 08:28:47 +0000 | [diff] [blame] | 157 | obj-y += $(addprefix ../libdis-user/, $(libdis-y)) |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 158 | obj-y += $(libobj-y) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 159 | |
| 160 | endif #CONFIG_DARWIN_USER |
| 161 | |
| 162 | ######################################################### |
blueswir1 | 8477850 | 2008-10-26 20:33:16 +0000 | [diff] [blame] | 163 | # BSD user emulator target |
| 164 | |
| 165 | ifdef CONFIG_BSD_USER |
| 166 | |
Paolo Bonzini | 076d247 | 2009-12-21 10:06:55 +0100 | [diff] [blame] | 167 | $(call set-vpath, $(SRC_PATH)/bsd-user) |
| 168 | |
Juan Quintela | a558ee1 | 2009-08-03 14:46:21 +0200 | [diff] [blame] | 169 | QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH) |
blueswir1 | 8477850 | 2008-10-26 20:33:16 +0000 | [diff] [blame] | 170 | |
Blue Swirl | 3702208 | 2009-08-15 07:51:59 +0000 | [diff] [blame] | 171 | obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \ |
Juan Quintela | 3d0f151 | 2009-10-07 02:41:04 +0200 | [diff] [blame] | 172 | gdbstub.o uaccess.o |
Blue Swirl | 5ba6531 | 2009-08-15 07:52:19 +0000 | [diff] [blame] | 173 | |
Blue Swirl | e27b27b | 2009-08-16 07:39:33 +0000 | [diff] [blame] | 174 | obj-i386-y += ioport-user.o |
blueswir1 | 8477850 | 2008-10-26 20:33:16 +0000 | [diff] [blame] | 175 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 176 | $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS) |
| 177 | |
| 178 | obj-y += $(addprefix ../libuser/, $(user-obj-y)) |
Blue Swirl | 4d90453 | 2010-03-21 08:28:47 +0000 | [diff] [blame] | 179 | obj-y += $(addprefix ../libdis-user/, $(libdis-y)) |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 180 | obj-y += $(libobj-y) |
blueswir1 | 8477850 | 2008-10-26 20:33:16 +0000 | [diff] [blame] | 181 | |
| 182 | endif #CONFIG_BSD_USER |
| 183 | |
| 184 | ######################################################### |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 185 | # System emulator target |
Juan Quintela | 76dfdd2 | 2009-08-03 14:46:41 +0200 | [diff] [blame] | 186 | ifdef CONFIG_SOFTMMU |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 187 | |
Blue Swirl | 04c9a0c | 2010-04-19 19:46:13 +0000 | [diff] [blame] | 188 | obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o |
aliguori | 1fd31ad | 2008-12-18 01:56:22 +0000 | [diff] [blame] | 189 | # virtio has to be here due to weird dependency between PCI and virtio-net. |
| 190 | # need to fix this properly |
Alexander Graf | e9d0fc7 | 2010-04-06 12:11:43 +0200 | [diff] [blame] | 191 | obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o |
| 192 | obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o |
Michael S. Tsirkin | d597005 | 2010-03-17 13:08:17 +0200 | [diff] [blame] | 193 | obj-y += vhost_net.o |
| 194 | obj-$(CONFIG_VHOST_NET) += vhost.o |
Venkateswararao Jujjuri (JV) | 758e8e3 | 2010-06-14 13:34:41 -0700 | [diff] [blame] | 195 | obj-$(CONFIG_VIRTFS) += virtio-9p.o |
Blue Swirl | 51464fa | 2010-02-20 09:27:38 +0000 | [diff] [blame] | 196 | obj-y += rwhandler.o |
Juan Quintela | a8e492c | 2009-06-25 00:08:01 +0200 | [diff] [blame] | 197 | obj-$(CONFIG_KVM) += kvm.o kvm-all.o |
Paolo Bonzini | 98c8573 | 2010-04-19 18:59:30 +0000 | [diff] [blame] | 198 | obj-$(CONFIG_NO_KVM) += kvm-stub.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 199 | LIBS+=-lz |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 200 | |
Juan Quintela | a558ee1 | 2009-08-03 14:46:21 +0200 | [diff] [blame] | 201 | QEMU_CFLAGS += $(VNC_TLS_CFLAGS) |
Juan Quintela | a558ee1 | 2009-08-03 14:46:21 +0200 | [diff] [blame] | 202 | QEMU_CFLAGS += $(VNC_SASL_CFLAGS) |
Corentin Chary | 2f6f5c7 | 2010-07-07 20:57:49 +0200 | [diff] [blame] | 203 | QEMU_CFLAGS += $(VNC_JPEG_CFLAGS) |
Corentin Chary | efe556a | 2010-07-07 20:57:56 +0200 | [diff] [blame] | 204 | QEMU_CFLAGS += $(VNC_PNG_CFLAGS) |
aliguori | 2f9606b | 2009-03-06 20:27:28 +0000 | [diff] [blame] | 205 | |
aliguori | e37630c | 2009-04-22 15:19:10 +0000 | [diff] [blame] | 206 | # xen backend driver support |
Juan Quintela | 943e0a3 | 2009-06-25 00:08:10 +0200 | [diff] [blame] | 207 | obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o |
aliguori | e37630c | 2009-04-22 15:19:10 +0000 | [diff] [blame] | 208 | |
Paul Brook | a67ba3b | 2010-04-04 21:18:26 +0100 | [diff] [blame] | 209 | # USB layer |
| 210 | obj-$(CONFIG_USB_OHCI) += usb-ohci.o |
| 211 | |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 212 | # PCI network cards |
Juan Quintela | a8e492c | 2009-06-25 00:08:01 +0200 | [diff] [blame] | 213 | obj-y += rtl8139.o |
| 214 | obj-y += e1000.o |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 215 | |
Cam Macdonell | 6cbf4c8 | 2010-07-27 10:54:13 -0600 | [diff] [blame] | 216 | # Inter-VM PCI shared memory |
Cam Macdonell | 3dcbf8f | 2010-08-14 17:47:31 -0600 | [diff] [blame] | 217 | obj-$(CONFIG_KVM) += ivshmem.o |
Cam Macdonell | 6cbf4c8 | 2010-07-27 10:54:13 -0600 | [diff] [blame] | 218 | |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 219 | # Hardware support |
Blue Swirl | 7f55c7c | 2010-03-21 19:47:03 +0000 | [diff] [blame] | 220 | obj-i386-y += vga.o |
Blue Swirl | 2d48377 | 2010-03-21 19:47:11 +0000 | [diff] [blame] | 221 | obj-i386-y += mc146818rtc.o i8259.o pc.o |
Blue Swirl | 53b67b3 | 2010-03-29 19:23:52 +0000 | [diff] [blame] | 222 | obj-i386-y += cirrus_vga.o apic.o ioapic.o piix_pci.o |
Alexander Graf | 1ddda5c | 2010-06-30 10:41:12 +0200 | [diff] [blame] | 223 | obj-i386-y += vmmouse.o vmport.o hpet.o applesmc.o |
Markus Armbruster | 09aaa16 | 2009-08-21 10:31:34 +0200 | [diff] [blame] | 224 | obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o |
Blue Swirl | d3ffc7a | 2010-03-21 19:47:10 +0000 | [diff] [blame] | 225 | obj-i386-y += debugcon.o multiboot.o |
Blue Swirl | c69ea0d | 2010-05-17 19:32:37 +0000 | [diff] [blame] | 226 | obj-i386-y += pc_piix.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 227 | |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 228 | # shared objects |
Blue Swirl | 02c7c99 | 2010-03-29 19:23:57 +0000 | [diff] [blame] | 229 | obj-ppc-y = ppc.o |
Blue Swirl | 4556bd8 | 2010-05-22 08:00:52 +0000 | [diff] [blame] | 230 | obj-ppc-y += vga.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 231 | # PREP target |
Blue Swirl | 956a3e6 | 2010-05-22 07:59:01 +0000 | [diff] [blame] | 232 | obj-ppc-y += i8259.o mc146818rtc.o |
Blue Swirl | add85a7 | 2010-03-29 19:24:04 +0000 | [diff] [blame] | 233 | obj-ppc-y += ppc_prep.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 234 | # OldWorld PowerMac |
Blue Swirl | 2b5eb37 | 2010-03-30 17:36:23 +0000 | [diff] [blame] | 235 | obj-ppc-y += ppc_oldworld.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 236 | # NewWorld PowerMac |
Blue Swirl | 2b5eb37 | 2010-03-30 17:36:23 +0000 | [diff] [blame] | 237 | obj-ppc-y += ppc_newworld.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 238 | # PowerPC 4xx boards |
Blue Swirl | 5f9fc5a | 2010-03-29 19:23:55 +0000 | [diff] [blame] | 239 | obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 240 | obj-ppc-y += ppc440.o ppc440_bamboo.o |
| 241 | # PowerPC E500 boards |
Blue Swirl | 2b5eb37 | 2010-03-30 17:36:23 +0000 | [diff] [blame] | 242 | obj-ppc-y += ppce500_mpc8544ds.o |
Edgar E. Iglesias | 2c50e26 | 2010-09-29 15:31:44 +0200 | [diff] [blame] | 243 | # PowerPC 440 Xilinx ML507 reference board. |
| 244 | obj-ppc-y += virtex_ml507.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 245 | obj-ppc-$(CONFIG_KVM) += kvm_ppc.o |
Juan Quintela | 3f0855b | 2009-07-27 16:12:52 +0200 | [diff] [blame] | 246 | obj-ppc-$(CONFIG_FDT) += device_tree.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 247 | |
Edgar E. Iglesias | 2c50e26 | 2010-09-29 15:31:44 +0200 | [diff] [blame] | 248 | # Xilinx PPC peripherals |
| 249 | obj-ppc-y += xilinx_intc.o |
| 250 | obj-ppc-y += xilinx_timer.o |
| 251 | obj-ppc-y += xilinx_uartlite.o |
| 252 | obj-ppc-y += xilinx_ethlite.o |
| 253 | |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 254 | obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o |
Aurelien Jarno | 409dbce | 2010-03-14 21:20:59 +0100 | [diff] [blame] | 255 | obj-mips-y += mips_addr.o mips_timer.o mips_int.o |
Blue Swirl | 4556bd8 | 2010-05-22 08:00:52 +0000 | [diff] [blame] | 256 | obj-mips-y += vga.o i8259.o |
Blue Swirl | b970ea8 | 2010-03-27 07:26:16 +0000 | [diff] [blame] | 257 | obj-mips-y += g364fb.o jazz_led.o |
Blue Swirl | 956a3e6 | 2010-05-22 07:59:01 +0000 | [diff] [blame] | 258 | obj-mips-y += gt64xxx.o mc146818rtc.o |
Blue Swirl | 08af49d | 2010-07-03 06:49:47 +0000 | [diff] [blame] | 259 | obj-mips-y += cirrus_vga.o |
Huacai Chen | 051c190 | 2010-06-29 10:50:43 +0800 | [diff] [blame] | 260 | obj-mips-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 261 | |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 262 | obj-microblaze-y = petalogix_s3adsp1800_mmu.o |
Edgar E. Iglesias | 72b675c | 2009-05-20 21:17:31 +0200 | [diff] [blame] | 263 | |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 264 | obj-microblaze-y += microblaze_pic_cpu.o |
| 265 | obj-microblaze-y += xilinx_intc.o |
| 266 | obj-microblaze-y += xilinx_timer.o |
| 267 | obj-microblaze-y += xilinx_uartlite.o |
| 268 | obj-microblaze-y += xilinx_ethlite.o |
| 269 | |
Juan Quintela | 3f0855b | 2009-07-27 16:12:52 +0200 | [diff] [blame] | 270 | obj-microblaze-$(CONFIG_FDT) += device_tree.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 271 | |
edgar_igl | 10c144e | 2009-01-07 12:19:50 +0000 | [diff] [blame] | 272 | # Boards |
Edgar E. Iglesias | 77d4f95 | 2010-06-10 14:45:46 +0200 | [diff] [blame] | 273 | obj-cris-y = cris_pic_cpu.o |
| 274 | obj-cris-y += cris-boot.o |
| 275 | obj-cris-y += etraxfs.o axis_dev88.o |
| 276 | obj-cris-y += axis_dev88.o |
edgar_igl | 10c144e | 2009-01-07 12:19:50 +0000 | [diff] [blame] | 277 | |
| 278 | # IO blocks |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 279 | obj-cris-y += etraxfs_dma.o |
| 280 | obj-cris-y += etraxfs_pic.o |
| 281 | obj-cris-y += etraxfs_eth.o |
| 282 | obj-cris-y += etraxfs_timer.o |
| 283 | obj-cris-y += etraxfs_ser.o |
edgar_igl | e62b5b1 | 2008-03-14 01:04:24 +0000 | [diff] [blame] | 284 | |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 285 | ifeq ($(TARGET_ARCH), sparc64) |
Blue Swirl | 956a3e6 | 2010-05-22 07:59:01 +0000 | [diff] [blame] | 286 | obj-sparc-y = sun4u.o apb_pci.o |
Blue Swirl | 1afdfdd | 2010-03-21 19:47:00 +0000 | [diff] [blame] | 287 | obj-sparc-y += vga.o |
Blue Swirl | 2d48377 | 2010-03-21 19:47:11 +0000 | [diff] [blame] | 288 | obj-sparc-y += mc146818rtc.o |
Blue Swirl | b994504 | 2010-03-21 19:47:01 +0000 | [diff] [blame] | 289 | obj-sparc-y += cirrus_vga.o |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 290 | else |
Blue Swirl | 2405669 | 2010-04-03 07:35:50 +0000 | [diff] [blame] | 291 | obj-sparc-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o |
Blue Swirl | 35da37e | 2010-03-21 19:47:06 +0000 | [diff] [blame] | 292 | obj-sparc-y += slavio_timer.o slavio_misc.o sparc32_dma.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 293 | obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 294 | endif |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 295 | |
Paul Brook | f165b53 | 2009-11-19 16:42:45 +0000 | [diff] [blame] | 296 | obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 297 | obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o |
| 298 | obj-arm-y += versatile_pci.o |
Paul Brook | f7c7032 | 2009-11-19 16:45:21 +0000 | [diff] [blame] | 299 | obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 300 | obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o |
| 301 | obj-arm-y += pl061.o |
| 302 | obj-arm-y += arm-semi.o |
| 303 | obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o |
| 304 | obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o |
Blue Swirl | 3d08ff6 | 2010-03-29 19:23:56 +0000 | [diff] [blame] | 305 | obj-arm-y += gumstix.o |
Blue Swirl | f7736b9 | 2010-03-27 06:20:53 +0000 | [diff] [blame] | 306 | obj-arm-y += zaurus.o ide/microdrive.o spitz.o tosa.o tc6393xb.o |
cmchao | 02d7434 | 2010-05-31 23:54:23 +0800 | [diff] [blame] | 307 | obj-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 |
cmchao | 2c1d9ec | 2010-05-31 23:54:22 +0800 | [diff] [blame] | 309 | obj-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 Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 311 | obj-arm-y += omap_sx1.o palm.o tsc210x.o |
| 312 | obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o |
| 313 | obj-arm-y += mst_fpga.o mainstone.o |
Blue Swirl | 5f9fc5a | 2010-03-29 19:23:55 +0000 | [diff] [blame] | 314 | obj-arm-y += musicpal.o bitbang_i2c.o marvell_88w8618_audio.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 315 | obj-arm-y += framebuffer.o |
| 316 | obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o |
| 317 | obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o |
| 318 | obj-arm-y += syborg_virtio.o |
| 319 | |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 320 | obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o |
Blue Swirl | 2d48377 | 2010-03-21 19:47:11 +0000 | [diff] [blame] | 321 | obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o |
Blue Swirl | f7736b9 | 2010-03-27 06:20:53 +0000 | [diff] [blame] | 322 | obj-sh4-y += ide/mmio.o |
Juan Quintela | 9637443 | 2009-07-16 18:33:58 +0200 | [diff] [blame] | 323 | |
| 324 | obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o |
| 325 | obj-m68k-y += m68k-semi.o dummy_m68k.o |
| 326 | |
Alexander Graf | 8cb310e | 2009-12-05 12:44:28 +0100 | [diff] [blame] | 327 | obj-s390x-y = s390-virtio-bus.o s390-virtio.o |
Alexander Graf | f3304ee | 2009-12-05 12:44:27 +0100 | [diff] [blame] | 328 | |
Richard Henderson | 6049f4f | 2009-12-27 18:30:03 -0800 | [diff] [blame] | 329 | obj-alpha-y = alpha_palcode.o |
| 330 | |
Blue Swirl | ad96090 | 2010-03-29 19:23:52 +0000 | [diff] [blame] | 331 | main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) |
blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 332 | |
Luiz Capitulino | acd0a09 | 2010-09-30 16:00:22 -0300 | [diff] [blame] | 333 | monitor.o: hmp-commands.h qmp-commands.h |
Blue Swirl | 2313086 | 2009-06-06 08:22:04 +0000 | [diff] [blame] | 334 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 335 | $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS) |
| 336 | |
| 337 | obj-y += $(addprefix ../, $(common-obj-y)) |
Blue Swirl | 4d90453 | 2010-03-21 08:28:47 +0000 | [diff] [blame] | 338 | obj-y += $(addprefix ../libdis/, $(libdis-y)) |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 339 | obj-y += $(libobj-y) |
| 340 | obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y)) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 341 | |
Juan Quintela | 76dfdd2 | 2009-08-03 14:46:41 +0200 | [diff] [blame] | 342 | endif # CONFIG_SOFTMMU |
bellard | 00a67ba | 2006-10-28 12:19:07 +0000 | [diff] [blame] | 343 | |
Stefan Hajnoczi | 94a420b | 2010-05-22 17:52:39 +0100 | [diff] [blame] | 344 | obj-y += $(addprefix ../, $(trace-obj-y)) |
Juan Quintela | 3d0f151 | 2009-10-07 02:41:04 +0200 | [diff] [blame] | 345 | obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o |
| 346 | |
Andreas Färber | 0e8c921 | 2010-01-06 20:24:05 +0100 | [diff] [blame] | 347 | $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) |
Juan Quintela | 1639448 | 2009-07-16 18:34:04 +0200 | [diff] [blame] | 348 | $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) |
| 349 | |
| 350 | |
Paolo Bonzini | 59bc10e | 2010-01-04 11:02:28 +0100 | [diff] [blame] | 351 | gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh |
aurel32 | 1aef4c5 | 2009-03-28 23:46:00 +0000 | [diff] [blame] | 352 | $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") |
pbrook | 56aebc8 | 2008-10-11 17:55:29 +0000 | [diff] [blame] | 353 | |
Luiz Capitulino | acd0a09 | 2010-09-30 16:00:22 -0300 | [diff] [blame] | 354 | hmp-commands.h: $(SRC_PATH)/hmp-commands.hx |
Blue Swirl | 2313086 | 2009-06-06 08:22:04 +0000 | [diff] [blame] | 355 | $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") |
| 356 | |
Luiz Capitulino | f36b4af | 2010-09-15 17:17:45 -0300 | [diff] [blame] | 357 | qmp-commands.h: $(SRC_PATH)/qmp-commands.hx |
aliguori | 0d00e56 | 2009-04-05 17:40:46 +0000 | [diff] [blame] | 358 | $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") |
blueswir1 | 5824d65 | 2009-03-28 06:44:27 +0000 | [diff] [blame] | 359 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 360 | clean: |
Blue Swirl | 2313086 | 2009-06-06 08:22:04 +0000 | [diff] [blame] | 361 | rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o |
Juan Quintela | befb031 | 2009-09-21 15:10:55 +0200 | [diff] [blame] | 362 | rm -f *.d */*.d tcg/*.o ide/*.o |
Luiz Capitulino | acd0a09 | 2010-09-30 16:00:22 -0300 | [diff] [blame] | 363 | rm -f hmp-commands.h qmp-commands.h gdbstub-xml.c |
Daniel P. Berrange | c276b17 | 2010-11-12 13:20:25 +0000 | [diff] [blame^] | 364 | ifdef CONFIG_SYSTEMTAP_TRACE |
| 365 | rm -f *.stp |
| 366 | endif |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 367 | |
ths | 5fafdf2 | 2007-09-16 21:08:06 +0000 | [diff] [blame] | 368 | install: all |
bellard | 9b14bb0 | 2004-03-26 22:43:34 +0000 | [diff] [blame] | 369 | ifneq ($(PROGS),) |
Hollis Blanchard | 52ba784 | 2010-08-04 17:21:34 -0700 | [diff] [blame] | 370 | $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" |
| 371 | ifneq ($(STRIP),) |
| 372 | $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS)) |
| 373 | endif |
bellard | 9b14bb0 | 2004-03-26 22:43:34 +0000 | [diff] [blame] | 374 | endif |
Daniel P. Berrange | c276b17 | 2010-11-12 13:20:25 +0000 | [diff] [blame^] | 375 | ifdef CONFIG_SYSTEMTAP_TRACE |
| 376 | $(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset" |
| 377 | $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset" |
| 378 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 379 | |
j_mayer | 2f96c28 | 2007-10-28 13:07:12 +0000 | [diff] [blame] | 380 | # Include automatically generated dependency files |
| 381 | -include $(wildcard *.d */*.d) |