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