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