]>
Commit | Line | Data |
---|---|---|
626df76a | 1 | include config.mak |
17759187 | 2 | include $(SRC_PATH)/rules.mak |
626df76a | 3 | |
0b0babc6 | 4 | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
4fb240a4 | 5 | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw |
6c90361a | 6 | QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H |
40293e58 FB |
7 | |
8 | ifdef CONFIG_USER_ONLY | |
9 | # user emulator name | |
10 | QEMU_PROG=qemu-$(TARGET_ARCH2) | |
11 | else | |
1e43adfc | 12 | # system emulator name |
a541f297 | 13 | ifeq ($(TARGET_ARCH), i386) |
40293e58 | 14 | QEMU_PROG=qemu$(EXESUF) |
0db63474 | 15 | else |
40293e58 | 16 | QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF) |
a541f297 | 17 | endif |
de5eaa64 | 18 | endif |
626df76a | 19 | |
40293e58 | 20 | PROGS=$(QEMU_PROG) |
626df76a | 21 | |
40293e58 FB |
22 | HELPER_CFLAGS= |
23 | ||
626df76a | 24 | ifeq ($(ARCH),i386) |
6f30fa85 | 25 | HELPER_CFLAGS+=-fomit-frame-pointer |
bc51c5c9 FB |
26 | endif |
27 | ||
d19076fa | 28 | ifeq ($(subst ppc64,ppc,$(ARCH))$(TARGET_BASE_ARCH),ppcppc) |
a558ee17 | 29 | translate.o: QEMU_CFLAGS := $(QEMU_CFLAGS) $(call cc-option, $(QEMU_CFLAGS), -fno-unit-at-a-time,) |
d19076fa | 30 | endif |
31 | ||
626df76a | 32 | ifeq ($(ARCH),sparc) |
4c050b3f | 33 | ifneq ($(CONFIG_SOLARIS),y) |
40293e58 | 34 | HELPER_CFLAGS+=-ffixed-i0 |
3142255c | 35 | endif |
fdbb4691 | 36 | endif |
626df76a | 37 | |
626df76a | 38 | ifeq ($(ARCH),alpha) |
626df76a | 39 | # Ensure there's only a single GP |
a558ee17 | 40 | QEMU_CFLAGS+=-msmall-data |
626df76a FB |
41 | endif |
42 | ||
43 | ifeq ($(ARCH),ia64) | |
a558ee17 | 44 | QEMU_CFLAGS+=-mno-sdata |
83fb7adf FB |
45 | endif |
46 | ||
626df76a | 47 | LIBS+=-lm |
ec530c81 | 48 | ifdef CONFIG_SOLARIS |
75b5a697 | 49 | ifdef CONFIG_NEEDS_LIBSUNMATH |
0475a5ca TS |
50 | LIBS+=-lsunmath |
51 | LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib | |
a558ee17 | 52 | QEMU_CFLAGS+=-I/opt/SUNWspro/prod/include/cc |
f72b519c | 53 | endif |
831b7825 TS |
54 | endif |
55 | ||
a558ee17 JQ |
56 | kvm.o: QEMU_CFLAGS+=$(KVM_CFLAGS) |
57 | kvm-all.o: QEMU_CFLAGS+=$(KVM_CFLAGS) | |
7ba1e619 | 58 | |
40293e58 | 59 | all: $(PROGS) |
c2fb2637 PB |
60 | # Dummy command so that make thinks it has done something |
61 | @true | |
626df76a | 62 | |
40293e58 | 63 | ######################################################### |
626df76a | 64 | # cpu emulator library |
c9e0df73 | 65 | libobj-y = exec.o translate-all.o cpu-exec.o translate.o host-utils.o |
943e0a31 | 66 | libobj-$(CONFIG_KQEMU) += kqemu.o |
57fec1fe | 67 | # TCG code generator |
c9e0df73 | 68 | libobj-y += tcg/tcg.o tcg/tcg-runtime.o |
a558ee17 | 69 | QEMU_CFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) |
8289b279 | 70 | ifeq ($(ARCH),sparc64) |
a558ee17 | 71 | QEMU_CFLAGS+=-I$(SRC_PATH)/tcg/sparc |
8289b279 | 72 | endif |
158142c2 | 73 | ifdef CONFIG_SOFTFLOAT |
c9e0df73 | 74 | libobj-y += fpu/softfloat.o |
158142c2 | 75 | else |
c9e0df73 | 76 | libobj-y += fpu/softfloat-native.o |
158142c2 | 77 | endif |
a558ee17 | 78 | QEMU_CFLAGS+=-I$(SRC_PATH)/fpu |
c9e0df73 | 79 | libobj-y += op_helper.o helper.o |
e95c8d51 | 80 | |
b7bcbe95 | 81 | ifeq ($(TARGET_BASE_ARCH), arm) |
c9e0df73 | 82 | libobj-y += neon_helper.o iwmmxt_helper.o |
e6e5906b PB |
83 | endif |
84 | ||
cf6c1b16 | 85 | ifeq ($(TARGET_BASE_ARCH), alpha) |
c9e0df73 | 86 | libobj-y += alpha_palcode.o |
cf6c1b16 JM |
87 | endif |
88 | ||
e7daa605 | 89 | ifeq ($(TARGET_BASE_ARCH), cris) |
c9e0df73 | 90 | libobj-y += cris-dis.o |
e7daa605 TS |
91 | |
92 | ifndef CONFIG_USER_ONLY | |
c9e0df73 | 93 | libobj-y += mmu.o |
e7daa605 TS |
94 | endif |
95 | endif | |
96 | ||
626df76a | 97 | # NOTE: the disassembler code is only needed for debugging |
c9e0df73 | 98 | libobj-y += disas.o |
626df76a | 99 | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
bc51c5c9 FB |
100 | USE_I386_DIS=y |
101 | endif | |
0b0babc6 | 102 | ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) |
bc51c5c9 FB |
103 | USE_I386_DIS=y |
104 | endif | |
943e0a31 | 105 | libobj-$(USE_I386_DIS) += i386-dis.o |
626df76a | 106 | ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) |
c9e0df73 | 107 | libobj-y += alpha-dis.o |
626df76a | 108 | endif |
a2458627 | 109 | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
c9e0df73 | 110 | libobj-y += ppc-dis.o |
626df76a | 111 | endif |
72b675ca | 112 | ifeq ($(findstring microblaze, $(TARGET_BASE_ARCH) $(ARCH)),microblaze) |
c9e0df73 | 113 | libobj-y += microblaze-dis.o |
72b675ca | 114 | ifndef CONFIG_USER_ONLY |
c9e0df73 | 115 | libobj-y += mmu.o |
72b675ca EI |
116 | endif |
117 | endif | |
fbe4f65b | 118 | ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips) |
c9e0df73 | 119 | libobj-y += mips-dis.o |
6af0bf9c | 120 | endif |
64b3ab24 | 121 | ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) |
c9e0df73 | 122 | libobj-y += sparc-dis.o |
626df76a FB |
123 | endif |
124 | ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) | |
c9e0df73 | 125 | libobj-y += arm-dis.o |
626df76a | 126 | endif |
48024e4a | 127 | ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k) |
c9e0df73 | 128 | libobj-y += m68k-dis.o |
48024e4a | 129 | endif |
fdf9b3e8 | 130 | ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4) |
c9e0df73 | 131 | libobj-y += sh4-dis.o |
fdf9b3e8 | 132 | endif |
f54b3f92 | 133 | ifeq ($(findstring hppa, $(TARGET_BASE_ARCH) $(ARCH)),hppa) |
c9e0df73 | 134 | libobj-y += hppa-dis.o |
f54b3f92 | 135 | endif |
8f860bb8 | 136 | ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390) |
c9e0df73 | 137 | libobj-y += s390-dis.o |
8f860bb8 | 138 | endif |
626df76a | 139 | |
40293e58 FB |
140 | # libqemu |
141 | ||
c9e0df73 | 142 | libqemu.a: $(libobj-y) |
40293e58 | 143 | |
86e840ee | 144 | translate.o: translate.c cpu.h |
40293e58 | 145 | |
86e840ee | 146 | translate-all.o: translate-all.c cpu.h |
40293e58 | 147 | |
86e840ee | 148 | tcg/tcg.o: cpu.h |
40293e58 FB |
149 | |
150 | # HELPER_CFLAGS is used for all the code compiled with static register | |
151 | # variables | |
a558ee17 | 152 | op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS) |
40293e58 | 153 | |
a558ee17 | 154 | cpu-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS) |
40293e58 FB |
155 | |
156 | ######################################################### | |
157 | # Linux user emulator target | |
158 | ||
159 | ifdef CONFIG_LINUX_USER | |
160 | ||
3ebdd119 | 161 | VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
a558ee17 | 162 | QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
40293e58 | 163 | |
6d946cda AJ |
164 | # profiling code |
165 | ifdef TARGET_GPROF | |
166 | LDFLAGS+=-p | |
a558ee17 | 167 | QEMU_CFLAGS+=-p |
6d946cda AJ |
168 | endif |
169 | ||
a8e492c0 | 170 | obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \ |
5f650495 IY |
171 | elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o \ |
172 | ioport-user.o | |
943e0a31 JQ |
173 | obj-$(TARGET_HAS_BFLT) += flatload.o |
174 | ||
40293e58 | 175 | ifdef TARGET_HAS_ELFLOAD32 |
40293e58 FB |
176 | elfload32.o: elfload.c |
177 | endif | |
943e0a31 | 178 | obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o |
40293e58 FB |
179 | |
180 | ifeq ($(TARGET_ARCH), i386) | |
a8e492c0 | 181 | obj-y += vm86.o |
40293e58 | 182 | endif |
1c872672 | 183 | |
9c1dd99b JQ |
184 | nwfpe-obj-y := fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o |
185 | nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o | |
1c872672 JQ |
186 | obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y)) |
187 | obj-arm-y += arm-semi.o | |
188 | ||
189 | obj-m68k-y += m68k-sim.o m68k-semi.o | |
40293e58 | 190 | |
40293e58 FB |
191 | # Note: this is a workaround. The real fix is to avoid compiling |
192 | # cpu_signal_handler() in cpu-exec.c. | |
a558ee17 | 193 | signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) |
626df76a | 194 | |
16394485 | 195 | ARLIBS=../libqemu_user.a libqemu.a |
40293e58 FB |
196 | endif #CONFIG_LINUX_USER |
197 | ||
198 | ######################################################### | |
199 | # Darwin user emulator target | |
200 | ||
201 | ifdef CONFIG_DARWIN_USER | |
202 | ||
203 | VPATH+=:$(SRC_PATH)/darwin-user | |
a558ee17 | 204 | QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH) |
40293e58 FB |
205 | |
206 | # Leave some space for the regular program loading zone | |
207 | LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000 | |
208 | ||
209 | LIBS+=-lmx | |
210 | ||
a8e492c0 | 211 | obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \ |
5f650495 | 212 | gdbstub.o gdbstub-xml.o ioport-user.o |
40293e58 | 213 | |
40293e58 FB |
214 | # Note: this is a workaround. The real fix is to avoid compiling |
215 | # cpu_signal_handler() in cpu-exec.c. | |
a558ee17 | 216 | signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) |
40293e58 | 217 | |
16394485 | 218 | ARLIBS=libqemu.a |
40293e58 FB |
219 | |
220 | endif #CONFIG_DARWIN_USER | |
221 | ||
84778508 BS |
222 | ######################################################### |
223 | # BSD user emulator target | |
224 | ||
225 | ifdef CONFIG_BSD_USER | |
226 | ||
227 | VPATH+=:$(SRC_PATH)/bsd-user | |
a558ee17 | 228 | QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH) |
84778508 | 229 | |
a8e492c0 | 230 | obj-y = main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \ |
5f650495 | 231 | gdbstub.o gdbstub-xml.o ioport-user.o |
a8e492c0 | 232 | obj-y += uaccess.o |
84778508 | 233 | |
84778508 BS |
234 | # Note: this is a workaround. The real fix is to avoid compiling |
235 | # cpu_signal_handler() in cpu-exec.c. | |
a558ee17 | 236 | signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) |
84778508 | 237 | |
16394485 | 238 | ARLIBS=libqemu.a ../libqemu_user.a |
84778508 BS |
239 | |
240 | endif #CONFIG_BSD_USER | |
241 | ||
40293e58 FB |
242 | ######################################################### |
243 | # System emulator target | |
244 | ifndef CONFIG_USER_ONLY | |
245 | ||
a8e492c0 | 246 | obj-y = vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o \ |
7282a033 | 247 | gdbstub.o gdbstub-xml.o msix.o ioport.o qemu-config.o |
1fd31ad7 AL |
248 | # virtio has to be here due to weird dependency between PCI and virtio-net. |
249 | # need to fix this properly | |
a8e492c0 JQ |
250 | obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o |
251 | obj-$(CONFIG_KVM) += kvm.o kvm-all.o | |
a3392f9b | 252 | |
40293e58 | 253 | LIBS+=-lz |
1d14ffa9 | 254 | ifdef CONFIG_ALSA |
1d14ffa9 FB |
255 | LIBS += -lasound |
256 | endif | |
ca9cc28c AZ |
257 | ifdef CONFIG_ESD |
258 | LIBS += -lesd | |
259 | endif | |
b8e59f18 | 260 | ifdef CONFIG_PA |
261 | LIBS += -lpulse-simple | |
262 | endif | |
1d14ffa9 | 263 | ifdef CONFIG_DSOUND |
1d14ffa9 | 264 | LIBS += -lole32 -ldxguid |
85571bc7 | 265 | endif |
102a52e4 | 266 | ifdef CONFIG_FMOD |
7aac6cb1 | 267 | LIBS += $(FMOD_LIBS) |
85571bc7 | 268 | endif |
2f6a1ab0 | 269 | ifdef CONFIG_OSS |
6881964c | 270 | LIBS += $(OSS_LIBS) |
2f6a1ab0 | 271 | endif |
4fb240a4 | 272 | |
b6271b48 JQ |
273 | sound-obj-y = |
274 | sound-obj-$(CONFIG_SB16) += sb16.o | |
275 | sound-obj-$(CONFIG_ES1370) += es1370.o | |
276 | sound-obj-$(CONFIG_AC97) += ac97.o | |
277 | sound-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o | |
278 | sound-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o | |
57a943c4 | 279 | sound-obj-$(CONFIG_CS4231A) += cs4231a.o |
b6271b48 | 280 | |
1d14ffa9 | 281 | ifdef CONFIG_ADLIB |
a558ee17 | 282 | adlib.o fmopl.o: QEMU_CFLAGS := ${QEMU_CFLAGS} -DBUILD_Y8950=0 |
1d14ffa9 | 283 | endif |
85571bc7 | 284 | |
8d5d2d4c | 285 | ifdef CONFIG_VNC_TLS |
a558ee17 | 286 | QEMU_CFLAGS += $(VNC_TLS_CFLAGS) |
525061bf | 287 | LIBS += $(VNC_TLS_LIBS) |
8d5d2d4c TS |
288 | endif |
289 | ||
2f9606b3 | 290 | ifdef CONFIG_VNC_SASL |
a558ee17 | 291 | QEMU_CFLAGS += $(VNC_SASL_CFLAGS) |
60ddf533 | 292 | LIBS += $(VNC_SASL_LIBS) |
2f9606b3 AL |
293 | endif |
294 | ||
fb599c9a | 295 | ifdef CONFIG_BLUEZ |
ef7635ec | 296 | LIBS += $(BLUEZ_LIBS) |
fb599c9a AZ |
297 | endif |
298 | ||
e37630ca | 299 | # xen backend driver support |
943e0a31 | 300 | obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o |
7ed208c4 | 301 | ifeq ($(CONFIG_XEN), y) |
e37630ca AL |
302 | LIBS += $(XEN_LIBS) |
303 | endif | |
304 | ||
a594cfbf | 305 | # USB layer |
a8e492c0 | 306 | obj-y += usb-ohci.o |
a594cfbf | 307 | |
a41b2ff2 | 308 | # PCI network cards |
a8e492c0 JQ |
309 | obj-y += eepro100.o |
310 | obj-y += ne2000.o | |
311 | obj-y += pcnet.o | |
312 | obj-y += rtl8139.o | |
313 | obj-y += e1000.o | |
a41b2ff2 | 314 | |
9dd986cc | 315 | # Generic watchdog support and some watchdog devices |
a8e492c0 | 316 | obj-y += wdt_ib700.o wdt_i6300esb.o |
9dd986cc | 317 | |
a541f297 | 318 | # Hardware support |
f915a115 | 319 | obj-i386-y = ide.o pckbd.o vga.o $(sound-obj-y) dma.o isa-bus.o |
9637443f JQ |
320 | obj-i386-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o |
321 | obj-i386-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o | |
322 | obj-i386-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o | |
323 | obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o | |
324 | ||
325 | ifeq ($(TARGET_BASE_ARCH), i386) | |
a558ee17 | 326 | QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
67b915a5 | 327 | endif |
9637443f | 328 | |
3cbee15b | 329 | # shared objects |
f915a115 | 330 | obj-ppc-y = ppc.o ide.o vga.o $(sound-obj-y) dma.o isa-bus.o openpic.o |
3cbee15b | 331 | # PREP target |
9637443f JQ |
332 | obj-ppc-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o |
333 | obj-ppc-y += prep_pci.o ppc_prep.o | |
3cbee15b | 334 | # Mac shared devices |
9637443f | 335 | obj-ppc-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o |
3cbee15b | 336 | # OldWorld PowerMac |
9637443f | 337 | obj-ppc-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o |
3cbee15b | 338 | # NewWorld PowerMac |
9637443f | 339 | obj-ppc-y += unin_pci.o ppc_newworld.o |
3cbee15b | 340 | # PowerPC 4xx boards |
9637443f JQ |
341 | obj-ppc-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o |
342 | obj-ppc-y += ppc440.o ppc440_bamboo.o | |
74c62ba8 | 343 | # PowerPC E500 boards |
9637443f JQ |
344 | obj-ppc-y += ppce500_pci.o ppce500_mpc8544ds.o |
345 | obj-ppc-$(CONFIG_KVM) += kvm_ppc.o | |
346 | ||
347 | ifeq ($(TARGET_BASE_ARCH), ppc) | |
a558ee17 | 348 | QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
9637443f JQ |
349 | endif |
350 | ||
3f0855b1 | 351 | obj-ppc-$(CONFIG_FDT) += device_tree.o |
f652e6af | 352 | LIBS+= $(FDT_LIBS) |
9637443f JQ |
353 | |
354 | obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o | |
355 | obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o | |
356 | obj-mips-y += g364fb.o jazz_led.o dp8393x.o | |
357 | obj-mips-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o | |
f915a115 | 358 | obj-mips-y += piix_pci.o parallel.o cirrus_vga.o isa-bus.o pcspk.o $(sound-obj-y) |
9637443f JQ |
359 | obj-mips-y += mipsnet.o |
360 | obj-mips-y += pflash_cfi01.o | |
361 | obj-mips-y += vmware_vga.o | |
362 | ||
fbe4f65b | 363 | ifeq ($(TARGET_BASE_ARCH), mips) |
a558ee17 | 364 | QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
6af0bf9c | 365 | endif |
72b675ca | 366 | |
9637443f JQ |
367 | obj-microblaze-y = petalogix_s3adsp1800_mmu.o |
368 | ||
369 | obj-microblaze-y += microblaze_pic_cpu.o | |
370 | obj-microblaze-y += xilinx_intc.o | |
371 | obj-microblaze-y += xilinx_timer.o | |
372 | obj-microblaze-y += xilinx_uartlite.o | |
373 | obj-microblaze-y += xilinx_ethlite.o | |
374 | ||
375 | obj-microblaze-y += pflash_cfi02.o | |
72b675ca | 376 | |
3f0855b1 | 377 | obj-microblaze-$(CONFIG_FDT) += device_tree.o |
72b675ca | 378 | LIBS+= $(FDT_LIBS) |
9637443f | 379 | |
10c144e2 | 380 | # Boards |
9637443f | 381 | obj-cris-y = cris_pic_cpu.o etraxfs.o axis_dev88.o |
10c144e2 EI |
382 | |
383 | # IO blocks | |
9637443f JQ |
384 | obj-cris-y += etraxfs_dma.o |
385 | obj-cris-y += etraxfs_pic.o | |
386 | obj-cris-y += etraxfs_eth.o | |
387 | obj-cris-y += etraxfs_timer.o | |
388 | obj-cris-y += etraxfs_ser.o | |
389 | ||
390 | obj-cris-y += pflash_cfi02.o | |
e62b5b13 | 391 | |
3475187d | 392 | ifeq ($(TARGET_ARCH), sparc64) |
f915a115 | 393 | obj-sparc-y = sun4u.o ide.o isa-bus.o pckbd.o vga.o apb_pci.o |
9637443f JQ |
394 | obj-sparc-y += fdc.o mc146818rtc.o serial.o |
395 | obj-sparc-y += cirrus_vga.o parallel.o | |
3475187d | 396 | else |
9637443f | 397 | obj-sparc-y = sun4m.o tcx.o iommu.o slavio_intctl.o |
f915a115 | 398 | obj-sparc-y += slavio_timer.o slavio_misc.o fdc.o isa-bus.o sparc32_dma.o |
9637443f JQ |
399 | obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o |
400 | endif | |
401 | ||
402 | obj-arm-y = integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o | |
403 | obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o | |
404 | obj-arm-y += versatile_pci.o | |
405 | obj-arm-y += realview_gic.o realview.o arm_sysctl.o mpcore.o | |
406 | obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o | |
407 | obj-arm-y += pl061.o | |
408 | obj-arm-y += arm-semi.o | |
409 | obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o | |
410 | obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o | |
411 | obj-arm-y += pflash_cfi01.o gumstix.o | |
412 | obj-arm-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o | |
413 | obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o | |
414 | obj-arm-y += omap2.o omap_dss.o soc_dma.o | |
415 | obj-arm-y += omap_sx1.o palm.o tsc210x.o | |
416 | obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o | |
417 | obj-arm-y += mst_fpga.o mainstone.o | |
418 | obj-arm-y += musicpal.o pflash_cfi02.o | |
419 | obj-arm-y += framebuffer.o | |
420 | obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o | |
421 | obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o | |
422 | obj-arm-y += syborg_virtio.o | |
423 | ||
b5ff1b31 | 424 | ifeq ($(TARGET_BASE_ARCH), arm) |
a558ee17 | 425 | QEMU_CFLAGS += -DHAS_AUDIO |
b5ff1b31 | 426 | endif |
9637443f JQ |
427 | |
428 | obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o | |
429 | obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o | |
430 | obj-sh4-y += ide.o | |
431 | ||
432 | obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o | |
433 | obj-m68k-y += m68k-semi.o dummy_m68k.o | |
434 | ||
5b0753e0 | 435 | ifdef CONFIG_COCOA |
1d14ffa9 FB |
436 | COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit |
437 | ifdef CONFIG_COREAUDIO | |
438 | COCOA_LIBS+=-framework CoreAudio | |
439 | endif | |
5b0753e0 | 440 | endif |
7c1f25b4 | 441 | ifdef CONFIG_SLIRP |
a558ee17 | 442 | QEMU_CFLAGS+=-I$(SRC_PATH)/slirp |
626df76a FB |
443 | endif |
444 | ||
c321f673 | 445 | # specific flags are needed for non soft mmu emulator |
83fb7adf | 446 | ifndef CONFIG_DARWIN |
11d9f695 | 447 | ifndef CONFIG_WIN32 |
ec530c81 | 448 | ifndef CONFIG_SOLARIS |
b29fe3ed | 449 | ifndef CONFIG_AIX |
40293e58 | 450 | LIBS+=-lutil |
11d9f695 | 451 | endif |
b29fe3ed | 452 | endif |
83fb7adf | 453 | endif |
ec530c81 | 454 | endif |
e3086fbf | 455 | ifdef TARGET_GPROF |
a558ee17 | 456 | vl.o: QEMU_CFLAGS+=-p |
40293e58 | 457 | LDFLAGS+=-p |
e3086fbf | 458 | endif |
c321f673 | 459 | |
b8076a74 | 460 | ifeq ($(ARCH),ia64) |
40293e58 | 461 | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
74ccb34e FB |
462 | endif |
463 | ||
1d14ffa9 FB |
464 | ifdef CONFIG_WIN32 |
465 | SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole | |
466 | endif | |
467 | ||
40293e58 FB |
468 | # profiling code |
469 | ifdef TARGET_GPROF | |
470 | LDFLAGS+=-p | |
a558ee17 | 471 | main.o: QEMU_CFLAGS+=-p |
6e1b3e4d FB |
472 | endif |
473 | ||
a558ee17 | 474 | vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS) |
537fe2d6 | 475 | |
5824d651 BS |
476 | vl.o: qemu-options.h |
477 | ||
2313086a BS |
478 | monitor.o: qemu-monitor.h |
479 | ||
16394485 JQ |
480 | LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS) |
481 | ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) | |
626df76a | 482 | |
40293e58 | 483 | endif # !CONFIG_USER_ONLY |
00a67ba1 | 484 | |
16394485 JQ |
485 | $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) $(ARLIBS) |
486 | $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) | |
487 | ||
488 | ||
56aebc89 | 489 | gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh |
56aebc89 | 490 | ifeq ($(TARGET_XML_FILES),) |
1aef4c57 | 491 | $(call quiet-command,rm -f $@ && echo > $@," GEN $(TARGET_DIR)$@") |
56aebc89 | 492 | else |
1aef4c57 | 493 | $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") |
56aebc89 PB |
494 | endif |
495 | ||
5824d651 | 496 | qemu-options.h: $(SRC_PATH)/qemu-options.hx |
0d00e563 | 497 | $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") |
5824d651 | 498 | |
2313086a BS |
499 | qemu-monitor.h: $(SRC_PATH)/qemu-monitor.hx |
500 | $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") | |
501 | ||
626df76a | 502 | clean: |
2313086a | 503 | rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o |
57fec1fe | 504 | rm -f *.d */*.d tcg/*.o |
2313086a | 505 | rm -f qemu-options.h qemu-monitor.h gdbstub-xml.c |
1e43adfc | 506 | |
5fafdf24 | 507 | install: all |
9b14bb04 | 508 | ifneq ($(PROGS),) |
1625af87 | 509 | $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)" |
9b14bb04 | 510 | endif |
626df76a | 511 | |
2f96c28d JM |
512 | # Include automatically generated dependency files |
513 | -include $(wildcard *.d */*.d) |