root / Makefile.target @ c5d6edc3
History | View | Annotate | Download (12.1 kB)
1 |
include config.mak |
---|---|
2 |
|
3 |
TARGET_BASE_ARCH:=$(TARGET_ARCH) |
4 |
ifeq ($(TARGET_ARCH), x86_64) |
5 |
TARGET_BASE_ARCH:=i386 |
6 |
endif |
7 |
ifeq ($(TARGET_ARCH), ppc64) |
8 |
TARGET_BASE_ARCH:=ppc |
9 |
endif |
10 |
ifeq ($(TARGET_ARCH), sparc64) |
11 |
TARGET_BASE_ARCH:=sparc |
12 |
endif |
13 |
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
14 |
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio |
15 |
DEFINES=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) |
16 |
ifdef CONFIG_USER_ONLY |
17 |
VPATH+=:$(SRC_PATH)/linux-user |
18 |
DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) |
19 |
endif |
20 |
CFLAGS=-Wall -O2 -g -fno-strict-aliasing |
21 |
#CFLAGS+=-Werror |
22 |
LDFLAGS=-g |
23 |
LIBS= |
24 |
HELPER_CFLAGS=$(CFLAGS) |
25 |
DYNGEN=../dyngen$(EXESUF) |
26 |
# user emulator name |
27 |
TARGET_ARCH2=$(TARGET_ARCH) |
28 |
ifeq ($(TARGET_ARCH),arm) |
29 |
ifeq ($(TARGET_WORDS_BIGENDIAN),yes) |
30 |
TARGET_ARCH2=armeb |
31 |
endif |
32 |
endif |
33 |
ifeq ($(TARGET_ARCH),mips) |
34 |
ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
35 |
TARGET_ARCH2=mipsel |
36 |
endif |
37 |
endif |
38 |
QEMU_USER=qemu-$(TARGET_ARCH2) |
39 |
# system emulator name |
40 |
ifdef CONFIG_SOFTMMU |
41 |
ifeq ($(TARGET_ARCH), i386) |
42 |
QEMU_SYSTEM=qemu$(EXESUF) |
43 |
else |
44 |
QEMU_SYSTEM=qemu-system-$(TARGET_ARCH2)$(EXESUF) |
45 |
endif |
46 |
else |
47 |
QEMU_SYSTEM=qemu-fast |
48 |
endif |
49 |
|
50 |
ifdef CONFIG_USER_ONLY |
51 |
PROGS=$(QEMU_USER) |
52 |
else |
53 |
PROGS+=$(QEMU_SYSTEM) |
54 |
ifndef CONFIG_SOFTMMU |
55 |
CONFIG_STATIC=y |
56 |
endif |
57 |
endif # !CONFIG_USER_ONLY |
58 |
|
59 |
ifdef CONFIG_STATIC |
60 |
LDFLAGS+=-static |
61 |
endif |
62 |
|
63 |
ifeq ($(ARCH),i386) |
64 |
CFLAGS+=-fomit-frame-pointer |
65 |
OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 |
66 |
ifeq ($(HAVE_GCC3_OPTIONS),yes) |
67 |
OP_CFLAGS+= -falign-functions=0 -fno-gcse |
68 |
else |
69 |
OP_CFLAGS+= -malign-functions=0 |
70 |
endif |
71 |
|
72 |
ifdef TARGET_GPROF |
73 |
USE_I386_LD=y |
74 |
endif |
75 |
ifdef CONFIG_STATIC |
76 |
USE_I386_LD=y |
77 |
endif |
78 |
ifdef USE_I386_LD |
79 |
LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld |
80 |
else |
81 |
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object |
82 |
# that the kernel ELF loader considers as an executable. I think this |
83 |
# is the simplest way to make it self virtualizable! |
84 |
LDFLAGS+=-Wl,-shared |
85 |
endif |
86 |
endif |
87 |
|
88 |
ifeq ($(ARCH),x86_64) |
89 |
OP_CFLAGS=$(CFLAGS) -falign-functions=0 |
90 |
LDFLAGS+=-Wl,-T,$(SRC_PATH)/x86_64.ld |
91 |
endif |
92 |
|
93 |
ifeq ($(ARCH),ppc) |
94 |
CFLAGS+= -D__powerpc__ |
95 |
OP_CFLAGS=$(CFLAGS) |
96 |
LDFLAGS+=-Wl,-T,$(SRC_PATH)/ppc.ld |
97 |
endif |
98 |
|
99 |
ifeq ($(ARCH),s390) |
100 |
OP_CFLAGS=$(CFLAGS) |
101 |
LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld |
102 |
endif |
103 |
|
104 |
ifeq ($(ARCH),sparc) |
105 |
CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 |
106 |
LDFLAGS+=-m32 |
107 |
OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 |
108 |
HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat |
109 |
# -static is used to avoid g1/g3 usage by the dynamic linker |
110 |
LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc.ld -static |
111 |
endif |
112 |
|
113 |
ifeq ($(ARCH),sparc64) |
114 |
CFLAGS+=-m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 |
115 |
LDFLAGS+=-m64 |
116 |
OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 |
117 |
endif |
118 |
|
119 |
ifeq ($(ARCH),alpha) |
120 |
# -msmall-data is not used because we want two-instruction relocations |
121 |
# for the constant constructions |
122 |
OP_CFLAGS=-Wall -O2 -g |
123 |
# Ensure there's only a single GP |
124 |
CFLAGS += -msmall-data |
125 |
LDFLAGS+=-Wl,-T,$(SRC_PATH)/alpha.ld |
126 |
endif |
127 |
|
128 |
ifeq ($(ARCH),ia64) |
129 |
CFLAGS += -mno-sdata |
130 |
OP_CFLAGS=$(CFLAGS) |
131 |
LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
132 |
endif |
133 |
|
134 |
ifeq ($(ARCH),arm) |
135 |
OP_CFLAGS=$(CFLAGS) -mno-sched-prolog -fno-omit-frame-pointer |
136 |
LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld |
137 |
endif |
138 |
|
139 |
ifeq ($(ARCH),m68k) |
140 |
OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer |
141 |
LDFLAGS+=-Wl,-T,m68k.ld |
142 |
endif |
143 |
|
144 |
ifeq ($(HAVE_GCC3_OPTIONS),yes) |
145 |
# very important to generate a return at the end of every operation |
146 |
OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls |
147 |
endif |
148 |
|
149 |
ifeq ($(CONFIG_DARWIN),yes) |
150 |
OP_CFLAGS+= -mdynamic-no-pic |
151 |
LIBS+=-lmx |
152 |
endif |
153 |
|
154 |
######################################################### |
155 |
|
156 |
DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
157 |
LIBS+=-lm |
158 |
ifndef CONFIG_USER_ONLY |
159 |
LIBS+=-lz |
160 |
endif |
161 |
ifdef CONFIG_WIN32 |
162 |
LIBS+=-lwinmm -lws2_32 -liphlpapi |
163 |
endif |
164 |
ifdef CONFIG_SOLARIS |
165 |
LIBS+=-lsocket -lnsl -lresolv |
166 |
endif |
167 |
|
168 |
# profiling code |
169 |
ifdef TARGET_GPROF |
170 |
LDFLAGS+=-p |
171 |
main.o: CFLAGS+=-p |
172 |
endif |
173 |
|
174 |
OBJS= main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o \ |
175 |
elfload.o linuxload.o |
176 |
ifdef TARGET_HAS_BFLT |
177 |
OBJS+= flatload.o |
178 |
endif |
179 |
|
180 |
ifeq ($(TARGET_ARCH), i386) |
181 |
OBJS+= vm86.o |
182 |
endif |
183 |
ifeq ($(TARGET_ARCH), arm) |
184 |
OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ |
185 |
nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ |
186 |
nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o |
187 |
endif |
188 |
SRCS:= $(OBJS:.o=.c) |
189 |
OBJS+= libqemu.a |
190 |
|
191 |
# cpu emulator library |
192 |
LIBOBJS=exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o\ |
193 |
translate.o op.o |
194 |
ifdef CONFIG_SOFTFLOAT |
195 |
LIBOBJS+=fpu/softfloat.o |
196 |
else |
197 |
LIBOBJS+=fpu/softfloat-native.o |
198 |
endif |
199 |
DEFINES+=-I$(SRC_PATH)/fpu |
200 |
|
201 |
ifeq ($(TARGET_ARCH), i386) |
202 |
LIBOBJS+=helper.o helper2.o |
203 |
ifeq ($(ARCH), i386) |
204 |
LIBOBJS+=translate-copy.o |
205 |
endif |
206 |
endif |
207 |
|
208 |
ifeq ($(TARGET_ARCH), x86_64) |
209 |
LIBOBJS+=helper.o helper2.o |
210 |
endif |
211 |
|
212 |
ifeq ($(TARGET_BASE_ARCH), ppc) |
213 |
LIBOBJS+= op_helper.o helper.o |
214 |
endif |
215 |
|
216 |
ifeq ($(TARGET_ARCH), mips) |
217 |
LIBOBJS+= op_helper.o helper.o |
218 |
endif |
219 |
|
220 |
ifeq ($(TARGET_BASE_ARCH), sparc) |
221 |
LIBOBJS+= op_helper.o helper.o |
222 |
endif |
223 |
|
224 |
ifeq ($(TARGET_BASE_ARCH), arm) |
225 |
LIBOBJS+= op_helper.o helper.o |
226 |
endif |
227 |
|
228 |
ifeq ($(TARGET_BASE_ARCH), sh4) |
229 |
LIBOBJS+= op_helper.o helper.o |
230 |
endif |
231 |
|
232 |
# NOTE: the disassembler code is only needed for debugging |
233 |
LIBOBJS+=disas.o |
234 |
ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
235 |
USE_I386_DIS=y |
236 |
endif |
237 |
ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) |
238 |
USE_I386_DIS=y |
239 |
endif |
240 |
ifdef USE_I386_DIS |
241 |
LIBOBJS+=i386-dis.o |
242 |
endif |
243 |
ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) |
244 |
LIBOBJS+=alpha-dis.o |
245 |
endif |
246 |
ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
247 |
LIBOBJS+=ppc-dis.o |
248 |
endif |
249 |
ifeq ($(findstring mips, $(TARGET_ARCH) $(ARCH)),mips) |
250 |
LIBOBJS+=mips-dis.o |
251 |
endif |
252 |
ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) |
253 |
LIBOBJS+=sparc-dis.o |
254 |
endif |
255 |
ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) |
256 |
LIBOBJS+=arm-dis.o |
257 |
endif |
258 |
ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k) |
259 |
LIBOBJS+=m68k-dis.o |
260 |
endif |
261 |
ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4) |
262 |
LIBOBJS+=sh4-dis.o |
263 |
endif |
264 |
|
265 |
ifdef CONFIG_GDBSTUB |
266 |
OBJS+=gdbstub.o |
267 |
endif |
268 |
|
269 |
all: $(PROGS) |
270 |
|
271 |
$(QEMU_USER): $(OBJS) |
272 |
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
273 |
ifeq ($(ARCH),alpha) |
274 |
# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of |
275 |
# the address space (31 bit so sign extending doesn't matter) |
276 |
echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc |
277 |
endif |
278 |
|
279 |
# must use static linking to avoid leaving stuff in virtual address space |
280 |
VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o loader.o |
281 |
VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o block-bochs.o block-vpc.o block-vvfat.o |
282 |
ifdef CONFIG_WIN32 |
283 |
VL_OBJS+=tap-win32.o |
284 |
endif |
285 |
|
286 |
SOUND_HW = sb16.o es1370.o |
287 |
AUDIODRV = audio.o noaudio.o wavaudio.o |
288 |
ifdef CONFIG_SDL |
289 |
AUDIODRV += sdlaudio.o |
290 |
endif |
291 |
ifdef CONFIG_OSS |
292 |
AUDIODRV += ossaudio.o |
293 |
endif |
294 |
ifdef CONFIG_COREAUDIO |
295 |
AUDIODRV += coreaudio.o |
296 |
endif |
297 |
ifdef CONFIG_ALSA |
298 |
AUDIODRV += alsaaudio.o |
299 |
LIBS += -lasound |
300 |
endif |
301 |
ifdef CONFIG_DSOUND |
302 |
AUDIODRV += dsoundaudio.o |
303 |
LIBS += -lole32 -ldxguid |
304 |
endif |
305 |
ifdef CONFIG_FMOD |
306 |
AUDIODRV += fmodaudio.o |
307 |
audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES) |
308 |
LIBS += $(CONFIG_FMOD_LIB) |
309 |
endif |
310 |
ifdef CONFIG_ADLIB |
311 |
SOUND_HW += fmopl.o adlib.o |
312 |
endif |
313 |
|
314 |
# SCSI layer |
315 |
VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o |
316 |
|
317 |
# USB layer |
318 |
VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o |
319 |
|
320 |
# PCI network cards |
321 |
VL_OBJS+= ne2000.o rtl8139.o |
322 |
|
323 |
ifeq ($(TARGET_BASE_ARCH), i386) |
324 |
# Hardware support |
325 |
VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
326 |
VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o |
327 |
VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o acpi.o piix_pci.o |
328 |
VL_OBJS+= usb-uhci.o |
329 |
DEFINES += -DHAS_AUDIO |
330 |
endif |
331 |
ifeq ($(TARGET_BASE_ARCH), ppc) |
332 |
VL_OBJS+= ppc.o ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
333 |
VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o |
334 |
VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o |
335 |
VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o |
336 |
DEFINES += -DHAS_AUDIO |
337 |
endif |
338 |
ifeq ($(TARGET_ARCH), mips) |
339 |
VL_OBJS+= mips_r4k.o dma.o vga.o serial.o i8254.o i8259.o |
340 |
#VL_OBJS+= #ide.o pckbd.o fdc.o m48t59.o |
341 |
endif |
342 |
ifeq ($(TARGET_BASE_ARCH), sparc) |
343 |
ifeq ($(TARGET_ARCH), sparc64) |
344 |
VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o |
345 |
VL_OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o |
346 |
VL_OBJS+= cirrus_vga.o parallel.o |
347 |
else |
348 |
VL_OBJS+= sun4m.o tcx.o lance.o iommu.o m48t59.o slavio_intctl.o |
349 |
VL_OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o esp.o |
350 |
endif |
351 |
endif |
352 |
ifeq ($(TARGET_BASE_ARCH), arm) |
353 |
VL_OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o |
354 |
VL_OBJS+= arm_boot.o pl011.o pl050.o pl080.o pl110.o pl190.o |
355 |
VL_OBJS+= versatile_pci.o |
356 |
endif |
357 |
ifeq ($(TARGET_BASE_ARCH), sh4) |
358 |
VL_OBJS+= shix.o sh7750.o sh7750_regnames.o tc58128.o |
359 |
endif |
360 |
ifdef CONFIG_GDBSTUB |
361 |
VL_OBJS+=gdbstub.o |
362 |
endif |
363 |
ifdef CONFIG_SDL |
364 |
VL_OBJS+=sdl.o |
365 |
endif |
366 |
VL_OBJS+=vnc.o |
367 |
ifdef CONFIG_COCOA |
368 |
VL_OBJS+=cocoa.o |
369 |
COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit |
370 |
ifdef CONFIG_COREAUDIO |
371 |
COCOA_LIBS+=-framework CoreAudio |
372 |
endif |
373 |
endif |
374 |
ifdef CONFIG_SLIRP |
375 |
DEFINES+=-I$(SRC_PATH)/slirp |
376 |
SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \ |
377 |
slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \ |
378 |
tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o |
379 |
VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) |
380 |
endif |
381 |
|
382 |
VL_LDFLAGS= |
383 |
# specific flags are needed for non soft mmu emulator |
384 |
ifdef CONFIG_STATIC |
385 |
VL_LDFLAGS+=-static |
386 |
endif |
387 |
ifndef CONFIG_SOFTMMU |
388 |
VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld |
389 |
endif |
390 |
ifndef CONFIG_DARWIN |
391 |
ifndef CONFIG_WIN32 |
392 |
ifndef CONFIG_SOLARIS |
393 |
VL_LIBS=-lutil |
394 |
endif |
395 |
endif |
396 |
endif |
397 |
ifdef TARGET_GPROF |
398 |
vl.o: CFLAGS+=-p |
399 |
VL_LDFLAGS+=-p |
400 |
endif |
401 |
|
402 |
ifeq ($(ARCH),ia64) |
403 |
VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
404 |
endif |
405 |
|
406 |
ifdef CONFIG_WIN32 |
407 |
SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole |
408 |
endif |
409 |
|
410 |
$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a |
411 |
$(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS) |
412 |
|
413 |
cocoa.o: cocoa.m |
414 |
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< |
415 |
|
416 |
sdl.o: sdl.c keymaps.c sdl_keysym.h |
417 |
$(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $< |
418 |
|
419 |
vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h |
420 |
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< |
421 |
|
422 |
sdlaudio.o: sdlaudio.c |
423 |
$(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $< |
424 |
|
425 |
depend: $(SRCS) |
426 |
$(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend |
427 |
|
428 |
vldepend: $(VL_OBJS:.o=.c) |
429 |
$(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend |
430 |
|
431 |
# libqemu |
432 |
|
433 |
libqemu.a: $(LIBOBJS) |
434 |
rm -f $@ |
435 |
$(AR) rcs $@ $(LIBOBJS) |
436 |
|
437 |
translate.o: translate.c gen-op.h opc.h cpu.h |
438 |
|
439 |
translate-all.o: translate-all.c opc.h cpu.h |
440 |
|
441 |
translate-op.o: translate-all.c op.h opc.h cpu.h |
442 |
|
443 |
op.h: op.o $(DYNGEN) |
444 |
$(DYNGEN) -o $@ $< |
445 |
|
446 |
opc.h: op.o $(DYNGEN) |
447 |
$(DYNGEN) -c -o $@ $< |
448 |
|
449 |
gen-op.h: op.o $(DYNGEN) |
450 |
$(DYNGEN) -g -o $@ $< |
451 |
|
452 |
op.o: op.c |
453 |
$(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $< |
454 |
|
455 |
helper.o: helper.c |
456 |
$(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $< |
457 |
|
458 |
ifeq ($(TARGET_BASE_ARCH), i386) |
459 |
op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h |
460 |
endif |
461 |
|
462 |
ifeq ($(TARGET_ARCH), arm) |
463 |
op.o: op.c op_template.h |
464 |
pl110.o: pl110_template.h |
465 |
endif |
466 |
|
467 |
ifeq ($(TARGET_BASE_ARCH), sparc) |
468 |
op.o: op.c op_template.h op_mem.h fop_template.h fbranch_template.h |
469 |
magic_load.o: elf_op.h |
470 |
endif |
471 |
|
472 |
ifeq ($(TARGET_BASE_ARCH), ppc) |
473 |
op.o: op.c op_template.h op_mem.h |
474 |
op_helper.o: op_helper_mem.h |
475 |
translate.o: translate.c translate_init.c |
476 |
endif |
477 |
|
478 |
ifeq ($(TARGET_ARCH), mips) |
479 |
op.o: op.c op_template.c op_mem.c |
480 |
op_helper.o: op_helper_mem.c |
481 |
endif |
482 |
|
483 |
loader.o: loader.c elf_ops.h |
484 |
|
485 |
acpi.o: acpi.c acpi-dsdt.hex |
486 |
|
487 |
#$(SRC_PATH)/hw/acpi-dsdt.hex: acpi-dsdt.dsl |
488 |
# iasl -tc -p $@ $< |
489 |
|
490 |
ifeq ($(TARGET_ARCH), sh4) |
491 |
op.o: op.c op_mem.c cpu.h |
492 |
op_helper.o: op_helper.c exec.h cpu.h |
493 |
helper.o: helper.c exec.h cpu.h |
494 |
sh7750.o: sh7750.c sh7750_regs.h sh7750_regnames.h cpu.h |
495 |
shix.o: shix.c sh7750_regs.h sh7750_regnames.h |
496 |
sh7750_regnames.o: sh7750_regnames.c sh7750_regnames.h sh7750_regs.h |
497 |
tc58128.o: tc58128.c |
498 |
endif |
499 |
|
500 |
$(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h |
501 |
|
502 |
%.o: %.c |
503 |
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< |
504 |
|
505 |
%.o: %.S |
506 |
$(CC) $(DEFINES) -c -o $@ $< |
507 |
|
508 |
clean: |
509 |
rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o |
510 |
|
511 |
install: all |
512 |
ifneq ($(PROGS),) |
513 |
$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" |
514 |
endif |
515 |
|
516 |
ifneq ($(wildcard .depend),) |
517 |
include .depend |
518 |
endif |
519 |
|
520 |
ifeq (1, 0) |
521 |
audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \ |
522 |
fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \ |
523 |
CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare |
524 |
endif |