Statistics
| Branch: | Revision:

root / Makefile.target @ 22f8a8b3

History | View | Annotate | Download (18 kB)

1 626df76a bellard
include config.mak
2 626df76a bellard
3 0b0babc6 bellard
TARGET_BASE_ARCH:=$(TARGET_ARCH)
4 0b0babc6 bellard
ifeq ($(TARGET_ARCH), x86_64)
5 0b0babc6 bellard
TARGET_BASE_ARCH:=i386
6 0b0babc6 bellard
endif
7 540635ba ths
ifeq ($(TARGET_ARCH), mipsn32)
8 540635ba ths
TARGET_BASE_ARCH:=mips
9 540635ba ths
endif
10 fbe4f65b ths
ifeq ($(TARGET_ARCH), mips64)
11 fbe4f65b ths
TARGET_BASE_ARCH:=mips
12 fbe4f65b ths
endif
13 a2458627 bellard
ifeq ($(TARGET_ARCH), ppc64)
14 a2458627 bellard
TARGET_BASE_ARCH:=ppc
15 a2458627 bellard
endif
16 22f8a8b3 j_mayer
ifeq ($(TARGET_ARCH), ppc64h)
17 22f8a8b3 j_mayer
TARGET_BASE_ARCH:=ppc
18 22f8a8b3 j_mayer
endif
19 d4082e95 j_mayer
ifeq ($(TARGET_ARCH), ppcemb)
20 d4082e95 j_mayer
TARGET_BASE_ARCH:=ppc
21 d4082e95 j_mayer
endif
22 64b3ab24 bellard
ifeq ($(TARGET_ARCH), sparc64)
23 64b3ab24 bellard
TARGET_BASE_ARCH:=sparc
24 64b3ab24 bellard
endif
25 0b0babc6 bellard
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
26 85571bc7 bellard
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
27 6f30fa85 ths
CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH)
28 831b7825 ths
ifdef CONFIG_DARWIN_USER
29 831b7825 ths
VPATH+=:$(SRC_PATH)/darwin-user
30 831b7825 ths
CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
31 831b7825 ths
endif
32 831b7825 ths
ifdef CONFIG_LINUX_USER
33 3035f7ff bellard
VPATH+=:$(SRC_PATH)/linux-user
34 6f30fa85 ths
CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
35 3035f7ff bellard
endif
36 6f30fa85 ths
BASE_CFLAGS=
37 6f30fa85 ths
BASE_LDFLAGS=
38 0b0babc6 bellard
#CFLAGS+=-Werror
39 626df76a bellard
LIBS=
40 626df76a bellard
HELPER_CFLAGS=$(CFLAGS)
41 67b915a5 bellard
DYNGEN=../dyngen$(EXESUF)
42 1e43adfc bellard
# user emulator name
43 c91fde65 bellard
TARGET_ARCH2=$(TARGET_ARCH)
44 808c4954 bellard
ifeq ($(TARGET_ARCH),arm)
45 808c4954 bellard
  ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
46 c91fde65 bellard
    TARGET_ARCH2=armeb
47 808c4954 bellard
  endif
48 c91fde65 bellard
endif
49 908f52b0 pbrook
ifeq ($(TARGET_ARCH),sh4)
50 908f52b0 pbrook
  ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
51 908f52b0 pbrook
    TARGET_ARCH2=sh4eb
52 908f52b0 pbrook
  endif
53 908f52b0 pbrook
endif
54 01f5e596 bellard
ifeq ($(TARGET_ARCH),mips)
55 c91fde65 bellard
  ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
56 c91fde65 bellard
    TARGET_ARCH2=mipsel
57 01f5e596 bellard
  endif
58 01f5e596 bellard
endif
59 540635ba ths
ifeq ($(TARGET_ARCH),mipsn32)
60 540635ba ths
  ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
61 540635ba ths
    TARGET_ARCH2=mipsn32el
62 540635ba ths
  endif
63 540635ba ths
endif
64 fbe4f65b ths
ifeq ($(TARGET_ARCH),mips64)
65 fbe4f65b ths
  ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
66 fbe4f65b ths
    TARGET_ARCH2=mips64el
67 fbe4f65b ths
  endif
68 fbe4f65b ths
endif
69 c91fde65 bellard
QEMU_USER=qemu-$(TARGET_ARCH2)
70 1e43adfc bellard
# system emulator name
71 1e43adfc bellard
ifdef CONFIG_SOFTMMU
72 a541f297 bellard
ifeq ($(TARGET_ARCH), i386)
73 67b915a5 bellard
QEMU_SYSTEM=qemu$(EXESUF)
74 0db63474 bellard
else
75 c91fde65 bellard
QEMU_SYSTEM=qemu-system-$(TARGET_ARCH2)$(EXESUF)
76 a541f297 bellard
endif
77 a541f297 bellard
else
78 0db63474 bellard
QEMU_SYSTEM=qemu-fast
79 1e43adfc bellard
endif
80 1e43adfc bellard
81 16e9b7de bellard
ifdef CONFIG_USER_ONLY
82 1e43adfc bellard
PROGS=$(QEMU_USER)
83 16e9b7de bellard
else
84 c321f673 bellard
PROGS+=$(QEMU_SYSTEM)
85 de5eaa64 bellard
ifndef CONFIG_SOFTMMU
86 de5eaa64 bellard
CONFIG_STATIC=y
87 de5eaa64 bellard
endif
88 728c9fd5 bellard
endif # !CONFIG_USER_ONLY
89 626df76a bellard
90 626df76a bellard
ifdef CONFIG_STATIC
91 6f30fa85 ths
BASE_LDFLAGS+=-static
92 626df76a bellard
endif
93 626df76a bellard
94 6f30fa85 ths
# We require -O2 to avoid the stack setup prologue in EXIT_TB
95 6c041c54 ths
OP_CFLAGS := -Wall -O2 -g -fno-strict-aliasing
96 6c041c54 ths
97 6c041c54 ths
# cc-option
98 6c041c54 ths
# Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
99 6c041c54 ths
100 6c041c54 ths
cc-option = $(shell if $(CC) $(OP_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
101 6c041c54 ths
              > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
102 6c041c54 ths
103 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-reorder-blocks, "")
104 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-gcse, "")
105 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-tree-ch, "")
106 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-optimize-sibling-calls, "")
107 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-crossjumping, "")
108 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-align-labels, "")
109 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-align-jumps, "")
110 6c041c54 ths
OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, ""))
111 1870a74c ths
OP_CFLAGS+=$(call cc-option, -fno-section-anchors, "")
112 6f30fa85 ths
113 626df76a bellard
ifeq ($(ARCH),i386)
114 6f30fa85 ths
HELPER_CFLAGS+=-fomit-frame-pointer
115 6f30fa85 ths
OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
116 626df76a bellard
ifdef TARGET_GPROF
117 3a4739d6 bellard
USE_I386_LD=y
118 3a4739d6 bellard
endif
119 3a4739d6 bellard
ifdef CONFIG_STATIC
120 3a4739d6 bellard
USE_I386_LD=y
121 3a4739d6 bellard
endif
122 3a4739d6 bellard
ifdef USE_I386_LD
123 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
124 626df76a bellard
else
125 831b7825 ths
ifdef CONFIG_LINUX_USER
126 626df76a bellard
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
127 626df76a bellard
# that the kernel ELF loader considers as an executable. I think this
128 626df76a bellard
# is the simplest way to make it self virtualizable!
129 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-shared
130 626df76a bellard
endif
131 626df76a bellard
endif
132 831b7825 ths
endif
133 626df76a bellard
134 0b0babc6 bellard
ifeq ($(ARCH),x86_64)
135 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
136 bc51c5c9 bellard
endif
137 bc51c5c9 bellard
138 626df76a bellard
ifeq ($(ARCH),ppc)
139 6f30fa85 ths
CPPFLAGS+= -D__powerpc__
140 831b7825 ths
ifdef CONFIG_LINUX_USER
141 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
142 626df76a bellard
endif
143 831b7825 ths
endif
144 626df76a bellard
145 626df76a bellard
ifeq ($(ARCH),s390)
146 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
147 626df76a bellard
endif
148 626df76a bellard
149 626df76a bellard
ifeq ($(ARCH),sparc)
150 3142255c blueswir1
  BASE_CFLAGS+=-ffixed-g2 -ffixed-g3
151 3142255c blueswir1
  OP_CFLAGS+=-fno-delayed-branch -ffixed-i0
152 3142255c blueswir1
  ifeq ($(CONFIG_SOLARIS),yes)
153 3142255c blueswir1
    OP_CFLAGS+=-fno-omit-frame-pointer
154 3142255c blueswir1
  else
155 3142255c blueswir1
    BASE_CFLAGS+=-ffixed-g1 -ffixed-g6
156 3142255c blueswir1
    HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat
157 3142255c blueswir1
    # -static is used to avoid g1/g3 usage by the dynamic linker
158 3142255c blueswir1
    BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
159 3142255c blueswir1
  endif
160 fdbb4691 bellard
endif
161 626df76a bellard
162 626df76a bellard
ifeq ($(ARCH),sparc64)
163 3142255c blueswir1
  BASE_CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7
164 3142255c blueswir1
  OP_CFLAGS+=-mcpu=ultrasparc -m64 -fno-delayed-branch -ffixed-i0
165 3142255c blueswir1
  ifneq ($(CONFIG_SOLARIS),yes)
166 3142255c blueswir1
    BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
167 3142255c blueswir1
    OP_CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7
168 3142255c blueswir1
  endif
169 626df76a bellard
endif
170 626df76a bellard
171 626df76a bellard
ifeq ($(ARCH),alpha)
172 6f30fa85 ths
# -msmall-data is not used for OP_CFLAGS because we want two-instruction
173 6f30fa85 ths
# relocations for the constant constructions
174 626df76a bellard
# Ensure there's only a single GP
175 6f30fa85 ths
BASE_CFLAGS+=-msmall-data
176 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
177 626df76a bellard
endif
178 626df76a bellard
179 626df76a bellard
ifeq ($(ARCH),ia64)
180 6f30fa85 ths
BASE_CFLAGS+=-mno-sdata
181 6f30fa85 ths
OP_CFLAGS+=-mno-sdata
182 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
183 626df76a bellard
endif
184 626df76a bellard
185 626df76a bellard
ifeq ($(ARCH),arm)
186 6f30fa85 ths
OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointer
187 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
188 626df76a bellard
endif
189 626df76a bellard
190 38e584a0 bellard
ifeq ($(ARCH),m68k)
191 6f30fa85 ths
OP_CFLAGS+=-fomit-frame-pointer
192 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
193 6f30fa85 ths
endif
194 6f30fa85 ths
195 6f30fa85 ths
ifeq ($(ARCH),mips)
196 9617efe8 ths
OP_CFLAGS+=-mabi=32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0
197 fbe4f65b ths
ifeq ($(WORDS_BIGENDIAN),yes)
198 fbe4f65b ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
199 fbe4f65b ths
else
200 fbe4f65b ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
201 fbe4f65b ths
endif
202 fbe4f65b ths
endif
203 fbe4f65b ths
204 fbe4f65b ths
ifeq ($(ARCH),mips64)
205 9617efe8 ths
OP_CFLAGS+=-mabi=n32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0
206 fbe4f65b ths
ifeq ($(WORDS_BIGENDIAN),yes)
207 6f30fa85 ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
208 fbe4f65b ths
else
209 fbe4f65b ths
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
210 fbe4f65b ths
endif
211 38e584a0 bellard
endif
212 38e584a0 bellard
213 83fb7adf bellard
ifeq ($(CONFIG_DARWIN),yes)
214 e80cfcfc bellard
LIBS+=-lmx
215 83fb7adf bellard
endif
216 83fb7adf bellard
217 01feaa05 ths
ifdef CONFIG_DARWIN_USER
218 01feaa05 ths
# Leave some space for the regular program loading zone
219 01feaa05 ths
BASE_LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
220 01feaa05 ths
endif
221 01feaa05 ths
222 3142255c blueswir1
BASE_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)
223 3142255c blueswir1
BASE_LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)
224 3142255c blueswir1
OP_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)
225 3142255c blueswir1
OP_LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)
226 6f30fa85 ths
227 626df76a bellard
#########################################################
228 626df76a bellard
229 6f30fa85 ths
CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
230 626df76a bellard
LIBS+=-lm
231 b932caba bellard
ifndef CONFIG_USER_ONLY
232 b932caba bellard
LIBS+=-lz
233 b932caba bellard
endif
234 67b915a5 bellard
ifdef CONFIG_WIN32
235 3db38e87 bellard
LIBS+=-lwinmm -lws2_32 -liphlpapi
236 67b915a5 bellard
endif
237 ec530c81 bellard
ifdef CONFIG_SOLARIS
238 ec530c81 bellard
LIBS+=-lsocket -lnsl -lresolv
239 0475a5ca ths
ifdef NEEDS_LIBSUNMATH
240 0475a5ca ths
LIBS+=-lsunmath
241 0475a5ca ths
LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
242 0475a5ca ths
OP_CFLAGS+=-I/opt/SUNWspro/prod/include/cc
243 0475a5ca ths
BASE_CFLAGS+=-I/opt/SUNWspro/prod/include/cc
244 0475a5ca ths
endif
245 ec530c81 bellard
endif
246 626df76a bellard
247 626df76a bellard
# profiling code
248 626df76a bellard
ifdef TARGET_GPROF
249 6f30fa85 ths
BASE_LDFLAGS+=-p
250 6f30fa85 ths
main.o: BASE_CFLAGS+=-p
251 626df76a bellard
endif
252 626df76a bellard
253 831b7825 ths
ifdef CONFIG_LINUX_USER
254 e5fe0c52 pbrook
OBJS= main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o \
255 e5fe0c52 pbrook
      elfload.o linuxload.o
256 b5906f95 ths
LIBS+= $(AIOLIBS)
257 e5fe0c52 pbrook
ifdef TARGET_HAS_BFLT
258 e5fe0c52 pbrook
OBJS+= flatload.o
259 e5fe0c52 pbrook
endif
260 cb33da57 blueswir1
ifdef TARGET_HAS_ELFLOAD32
261 cb33da57 blueswir1
OBJS+= elfload32.o
262 cb33da57 blueswir1
elfload32.o: elfload.c
263 cb33da57 blueswir1
endif
264 e5fe0c52 pbrook
265 626df76a bellard
ifeq ($(TARGET_ARCH), i386)
266 626df76a bellard
OBJS+= vm86.o
267 626df76a bellard
endif
268 f72b519c bellard
ifeq ($(TARGET_ARCH), arm)
269 158142c2 bellard
OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \
270 f72b519c bellard
nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \
271 a4f81979 bellard
 nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o
272 f72b519c bellard
endif
273 e6e5906b pbrook
ifeq ($(TARGET_ARCH), m68k)
274 e6e5906b pbrook
OBJS+= m68k-sim.o m68k-semi.o
275 e6e5906b pbrook
endif
276 831b7825 ths
endif #CONFIG_LINUX_USER
277 831b7825 ths
278 831b7825 ths
ifdef CONFIG_DARWIN_USER
279 831b7825 ths
OBJS= main.o commpage.o machload.o mmap.o osdep.o signal.o syscall.o thunk.o
280 831b7825 ths
endif
281 831b7825 ths
282 626df76a bellard
SRCS:= $(OBJS:.o=.c)
283 626df76a bellard
OBJS+= libqemu.a
284 626df76a bellard
285 626df76a bellard
# cpu emulator library
286 158142c2 bellard
LIBOBJS=exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o\
287 f1548daa j_mayer
        translate.o op.o host-utils.o
288 158142c2 bellard
ifdef CONFIG_SOFTFLOAT
289 158142c2 bellard
LIBOBJS+=fpu/softfloat.o
290 158142c2 bellard
else
291 158142c2 bellard
LIBOBJS+=fpu/softfloat-native.o
292 158142c2 bellard
endif
293 6f30fa85 ths
CPPFLAGS+=-I$(SRC_PATH)/fpu
294 626df76a bellard
295 626df76a bellard
ifeq ($(TARGET_ARCH), i386)
296 1e43adfc bellard
LIBOBJS+=helper.o helper2.o
297 f72b519c bellard
ifeq ($(ARCH), i386)
298 f72b519c bellard
LIBOBJS+=translate-copy.o
299 f72b519c bellard
endif
300 626df76a bellard
endif
301 626df76a bellard
302 0b0babc6 bellard
ifeq ($(TARGET_ARCH), x86_64)
303 0b0babc6 bellard
LIBOBJS+=helper.o helper2.o
304 0b0babc6 bellard
endif
305 0b0babc6 bellard
306 a2458627 bellard
ifeq ($(TARGET_BASE_ARCH), ppc)
307 728c9fd5 bellard
LIBOBJS+= op_helper.o helper.o
308 67867308 bellard
endif
309 67867308 bellard
310 fbe4f65b ths
ifeq ($(TARGET_BASE_ARCH), mips)
311 6af0bf9c bellard
LIBOBJS+= op_helper.o helper.o
312 6af0bf9c bellard
endif
313 6af0bf9c bellard
314 64b3ab24 bellard
ifeq ($(TARGET_BASE_ARCH), sparc)
315 e95c8d51 bellard
LIBOBJS+= op_helper.o helper.o
316 e95c8d51 bellard
endif
317 e95c8d51 bellard
318 b7bcbe95 bellard
ifeq ($(TARGET_BASE_ARCH), arm)
319 b5ff1b31 bellard
LIBOBJS+= op_helper.o helper.o
320 b7bcbe95 bellard
endif
321 b7bcbe95 bellard
322 fdf9b3e8 bellard
ifeq ($(TARGET_BASE_ARCH), sh4)
323 fdf9b3e8 bellard
LIBOBJS+= op_helper.o helper.o
324 fdf9b3e8 bellard
endif
325 fdf9b3e8 bellard
326 e6e5906b pbrook
ifeq ($(TARGET_BASE_ARCH), m68k)
327 0633879f pbrook
LIBOBJS+= op_helper.o helper.o
328 e6e5906b pbrook
endif
329 e6e5906b pbrook
330 cf6c1b16 j_mayer
ifeq ($(TARGET_BASE_ARCH), alpha)
331 cf6c1b16 j_mayer
LIBOBJS+= op_helper.o helper.o alpha_palcode.o
332 cf6c1b16 j_mayer
endif
333 cf6c1b16 j_mayer
334 e7daa605 ths
ifeq ($(TARGET_BASE_ARCH), cris)
335 e7daa605 ths
LIBOBJS+= op_helper.o helper.o
336 e7daa605 ths
LIBOBJS+= cris-dis.o
337 e7daa605 ths
338 e7daa605 ths
ifndef CONFIG_USER_ONLY
339 e7daa605 ths
LIBOBJS+= mmu.o
340 e7daa605 ths
endif
341 e7daa605 ths
endif
342 e7daa605 ths
343 626df76a bellard
# NOTE: the disassembler code is only needed for debugging
344 5fafdf24 ths
LIBOBJS+=disas.o
345 626df76a bellard
ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
346 bc51c5c9 bellard
USE_I386_DIS=y
347 bc51c5c9 bellard
endif
348 0b0babc6 bellard
ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
349 bc51c5c9 bellard
USE_I386_DIS=y
350 bc51c5c9 bellard
endif
351 bc51c5c9 bellard
ifdef USE_I386_DIS
352 626df76a bellard
LIBOBJS+=i386-dis.o
353 626df76a bellard
endif
354 626df76a bellard
ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha)
355 626df76a bellard
LIBOBJS+=alpha-dis.o
356 626df76a bellard
endif
357 a2458627 bellard
ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc)
358 626df76a bellard
LIBOBJS+=ppc-dis.o
359 626df76a bellard
endif
360 fbe4f65b ths
ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips)
361 6af0bf9c bellard
LIBOBJS+=mips-dis.o
362 6af0bf9c bellard
endif
363 64b3ab24 bellard
ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc)
364 626df76a bellard
LIBOBJS+=sparc-dis.o
365 626df76a bellard
endif
366 626df76a bellard
ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
367 626df76a bellard
LIBOBJS+=arm-dis.o
368 626df76a bellard
endif
369 48024e4a bellard
ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k)
370 48024e4a bellard
LIBOBJS+=m68k-dis.o
371 48024e4a bellard
endif
372 fdf9b3e8 bellard
ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4)
373 fdf9b3e8 bellard
LIBOBJS+=sh4-dis.o
374 fdf9b3e8 bellard
endif
375 8f860bb8 ths
ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390)
376 8f860bb8 ths
LIBOBJS+=s390-dis.o
377 8f860bb8 ths
endif
378 626df76a bellard
379 1fddef4b bellard
ifdef CONFIG_GDBSTUB
380 1fddef4b bellard
OBJS+=gdbstub.o
381 1fddef4b bellard
endif
382 626df76a bellard
383 1e43adfc bellard
all: $(PROGS)
384 626df76a bellard
385 1e43adfc bellard
$(QEMU_USER): $(OBJS)
386 6f30fa85 ths
	$(CC) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^  $(LIBS)
387 626df76a bellard
ifeq ($(ARCH),alpha)
388 626df76a bellard
# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
389 626df76a bellard
# the address space (31 bit so sign extending doesn't matter)
390 626df76a bellard
	echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc
391 626df76a bellard
endif
392 626df76a bellard
393 626df76a bellard
# must use static linking to avoid leaving stuff in virtual address space
394 aef445bd pbrook
VL_OBJS=vl.o osdep.o readline.o monitor.o pci.o console.o loader.o isa_mmio.o
395 18607dcb bellard
VL_OBJS+=cutils.o
396 83f64091 bellard
VL_OBJS+=block.o block-raw.o
397 6ada7453 ths
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 block-qcow2.o block-parallels.o
398 d537cf6c pbrook
VL_OBJS+=irq.o
399 7fb843f8 bellard
ifdef CONFIG_WIN32
400 7fb843f8 bellard
VL_OBJS+=tap-win32.o
401 7fb843f8 bellard
endif
402 a541f297 bellard
403 1d14ffa9 bellard
SOUND_HW = sb16.o es1370.o
404 b00052e4 balrog
AUDIODRV = audio.o noaudio.o wavaudio.o mixeng.o
405 fb065187 bellard
ifdef CONFIG_SDL
406 fb065187 bellard
AUDIODRV += sdlaudio.o
407 fb065187 bellard
endif
408 fb065187 bellard
ifdef CONFIG_OSS
409 fb065187 bellard
AUDIODRV += ossaudio.o
410 fb065187 bellard
endif
411 1d14ffa9 bellard
ifdef CONFIG_COREAUDIO
412 1d14ffa9 bellard
AUDIODRV += coreaudio.o
413 1d14ffa9 bellard
endif
414 1d14ffa9 bellard
ifdef CONFIG_ALSA
415 1d14ffa9 bellard
AUDIODRV += alsaaudio.o
416 1d14ffa9 bellard
LIBS += -lasound
417 1d14ffa9 bellard
endif
418 1d14ffa9 bellard
ifdef CONFIG_DSOUND
419 1d14ffa9 bellard
AUDIODRV += dsoundaudio.o
420 1d14ffa9 bellard
LIBS += -lole32 -ldxguid
421 85571bc7 bellard
endif
422 102a52e4 bellard
ifdef CONFIG_FMOD
423 85571bc7 bellard
AUDIODRV += fmodaudio.o
424 6f30fa85 ths
audio.o fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS)
425 102a52e4 bellard
LIBS += $(CONFIG_FMOD_LIB)
426 85571bc7 bellard
endif
427 1d14ffa9 bellard
ifdef CONFIG_ADLIB
428 1d14ffa9 bellard
SOUND_HW += fmopl.o adlib.o
429 1d14ffa9 bellard
endif
430 ec36b695 bellard
AUDIODRV+= wavcapture.o
431 85571bc7 bellard
432 8d5d2d4c ths
ifdef CONFIG_VNC_TLS
433 8d5d2d4c ths
CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
434 8d5d2d4c ths
LIBS += $(CONFIG_VNC_TLS_LIBS)
435 8d5d2d4c ths
endif
436 8d5d2d4c ths
437 0ff596d0 pbrook
VL_OBJS += i2c.o smbus.o
438 0ff596d0 pbrook
439 2e5d83bb pbrook
# SCSI layer
440 7d8406be pbrook
VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o
441 2e5d83bb pbrook
442 a594cfbf bellard
# USB layer
443 2e5d83bb pbrook
VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o
444 f6d2a316 balrog
VL_OBJS+= usb-wacom.o
445 a594cfbf bellard
446 663e8e51 ths
# EEPROM emulation
447 663e8e51 ths
VL_OBJS += eeprom93xx.o
448 663e8e51 ths
449 a41b2ff2 pbrook
# PCI network cards
450 663e8e51 ths
VL_OBJS += eepro100.o
451 663e8e51 ths
VL_OBJS += ne2000.o
452 663e8e51 ths
VL_OBJS += pcnet.o
453 663e8e51 ths
VL_OBJS += rtl8139.o
454 a41b2ff2 pbrook
455 0b0babc6 bellard
ifeq ($(TARGET_BASE_ARCH), i386)
456 a541f297 bellard
# Hardware support
457 a41b2ff2 pbrook
VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
458 fd06c375 bellard
VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
459 b00052e4 balrog
VL_OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
460 591a6d62 ths
VL_OBJS+= usb-uhci.o smbus_eeprom.o vmmouse.o vmport.o vmware_vga.o
461 b00052e4 balrog
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
462 67b915a5 bellard
endif
463 a2458627 bellard
ifeq ($(TARGET_BASE_ARCH), ppc)
464 a41b2ff2 pbrook
VL_OBJS+= ppc.o ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
465 8ecc7913 j_mayer
VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o pflash_cfi02.o
466 b00052e4 balrog
VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o
467 7875ed20 j_mayer
VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o
468 7875ed20 j_mayer
# PowerPC 4xx boards
469 7875ed20 j_mayer
VL_OBJS+= ppc4xx_devs.o ppc405_uc.o ppc405_boards.o
470 b00052e4 balrog
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
471 a541f297 bellard
endif
472 fbe4f65b ths
ifeq ($(TARGET_BASE_ARCH), mips)
473 ad6fe1d2 ths
VL_OBJS+= mips_r4k.o mips_malta.o mips_pica61.o
474 ad6fe1d2 ths
VL_OBJS+= mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o
475 31211df1 ths
VL_OBJS+= jazz_led.o
476 9542611a ths
VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
477 7b717336 ths
VL_OBJS+= piix_pci.o smbus_eeprom.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV)
478 83b1fb88 ths
CPPFLAGS += -DHAS_AUDIO
479 6af0bf9c bellard
endif
480 e7daa605 ths
ifeq ($(TARGET_BASE_ARCH), cris)
481 e7daa605 ths
VL_OBJS+= etraxfs.o
482 e7daa605 ths
VL_OBJS+= ptimer.o
483 e7daa605 ths
VL_OBJS+= etraxfs_timer.o
484 e7daa605 ths
VL_OBJS+= etraxfs_ser.o
485 e7daa605 ths
endif
486 64b3ab24 bellard
ifeq ($(TARGET_BASE_ARCH), sparc)
487 3475187d bellard
ifeq ($(TARGET_ARCH), sparc64)
488 502a5395 pbrook
VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o
489 83469015 bellard
VL_OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o
490 20c9f095 blueswir1
VL_OBJS+= cirrus_vga.o parallel.o ptimer.o
491 3475187d bellard
else
492 67e999be bellard
VL_OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o
493 67e999be bellard
VL_OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o esp.o sparc32_dma.o
494 8d05ea8a blueswir1
VL_OBJS+= cs4231.o ptimer.o
495 3475187d bellard
endif
496 e95c8d51 bellard
endif
497 b5ff1b31 bellard
ifeq ($(TARGET_BASE_ARCH), arm)
498 cdbdb648 pbrook
VL_OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o
499 7e1543c2 pbrook
VL_OBJS+= arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
500 6963d7af pbrook
VL_OBJS+= versatile_pci.o sd.o ptimer.o
501 e69954b9 pbrook
VL_OBJS+= arm_gic.o realview.o arm_sysctl.o
502 8e71621f pbrook
VL_OBJS+= arm-semi.o
503 b00052e4 balrog
VL_OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
504 adb86c37 balrog
VL_OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o max111x.o max7310.o
505 adb86c37 balrog
VL_OBJS+= spitz.o ads7846.o ide.o serial.o nand.o $(AUDIODRV) wm8750.o
506 9ff6755b balrog
VL_OBJS+= omap.o omap_lcdc.o omap1_clk.o omap_mmc.o palm.o ecc.o
507 5a1237c4 balrog
CPPFLAGS += -DHAS_AUDIO
508 b5ff1b31 bellard
endif
509 fdf9b3e8 bellard
ifeq ($(TARGET_BASE_ARCH), sh4)
510 0d78f544 ths
VL_OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
511 80f515e6 balrog
VL_OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o
512 fdf9b3e8 bellard
endif
513 0633879f pbrook
ifeq ($(TARGET_BASE_ARCH), m68k)
514 7e049b8a pbrook
VL_OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
515 a87295e8 pbrook
VL_OBJS+= m68k-semi.o
516 0633879f pbrook
endif
517 a541f297 bellard
ifdef CONFIG_GDBSTUB
518 5fafdf24 ths
VL_OBJS+=gdbstub.o
519 728c9fd5 bellard
endif
520 626df76a bellard
ifdef CONFIG_SDL
521 6070dd07 ths
VL_OBJS+=sdl.o x_keymap.o
522 de5eaa64 bellard
endif
523 70848515 ths
VL_OBJS+=vnc.o d3des.o
524 5b0753e0 bellard
ifdef CONFIG_COCOA
525 5b0753e0 bellard
VL_OBJS+=cocoa.o
526 1d14ffa9 bellard
COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
527 1d14ffa9 bellard
ifdef CONFIG_COREAUDIO
528 1d14ffa9 bellard
COCOA_LIBS+=-framework CoreAudio
529 1d14ffa9 bellard
endif
530 5b0753e0 bellard
endif
531 7c1f25b4 bellard
ifdef CONFIG_SLIRP
532 6f30fa85 ths
CPPFLAGS+=-I$(SRC_PATH)/slirp
533 7c1f25b4 bellard
SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \
534 7c1f25b4 bellard
slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \
535 c7f74643 bellard
tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o
536 7c1f25b4 bellard
VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS))
537 626df76a bellard
endif
538 626df76a bellard
539 db8d7dd1 ths
VL_LDFLAGS=$(VL_OS_LDFLAGS)
540 70956b77 ths
VL_LIBS=$(AIOLIBS)
541 c321f673 bellard
# specific flags are needed for non soft mmu emulator
542 c321f673 bellard
ifdef CONFIG_STATIC
543 c321f673 bellard
VL_LDFLAGS+=-static
544 c321f673 bellard
endif
545 de5eaa64 bellard
ifndef CONFIG_SOFTMMU
546 5fafdf24 ths
VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld
547 de5eaa64 bellard
endif
548 83fb7adf bellard
ifndef CONFIG_DARWIN
549 11d9f695 bellard
ifndef CONFIG_WIN32
550 ec530c81 bellard
ifndef CONFIG_SOLARIS
551 70956b77 ths
VL_LIBS+=-lutil
552 11d9f695 bellard
endif
553 83fb7adf bellard
endif
554 ec530c81 bellard
endif
555 e3086fbf bellard
ifdef TARGET_GPROF
556 6f30fa85 ths
vl.o: BASE_CFLAGS+=-p
557 e3086fbf bellard
VL_LDFLAGS+=-p
558 e3086fbf bellard
endif
559 c321f673 bellard
560 b8076a74 bellard
ifeq ($(ARCH),ia64)
561 b8076a74 bellard
VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
562 b8076a74 bellard
endif
563 b8076a74 bellard
564 74ccb34e bellard
ifeq ($(ARCH),sparc64)
565 3142255c blueswir1
  VL_LDFLAGS+=-m64
566 3142255c blueswir1
  ifneq ($(CONFIG_SOLARIS),yes)
567 3142255c blueswir1
    VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
568 3142255c blueswir1
  endif
569 74ccb34e bellard
endif
570 74ccb34e bellard
571 1d14ffa9 bellard
ifdef CONFIG_WIN32
572 1d14ffa9 bellard
SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
573 1d14ffa9 bellard
endif
574 1d14ffa9 bellard
575 1e43adfc bellard
$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
576 3a11702b pbrook
	$(CC) $(VL_LDFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
577 5b0753e0 bellard
578 5b0753e0 bellard
cocoa.o: cocoa.m
579 6f30fa85 ths
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
580 626df76a bellard
581 3d11d0eb bellard
sdl.o: sdl.c keymaps.c sdl_keysym.h
582 6f30fa85 ths
	$(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) $(BASE_CFLAGS) -c -o $@ $<
583 626df76a bellard
584 70848515 ths
vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h d3des.c d3des.h
585 6f30fa85 ths
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
586 24236869 bellard
587 9f059eca bellard
sdlaudio.o: sdlaudio.c
588 6f30fa85 ths
	$(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) $(BASE_CFLAGS) -c -o $@ $<
589 9f059eca bellard
590 626df76a bellard
depend: $(SRCS)
591 6f30fa85 ths
	$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $^ 1>.depend
592 626df76a bellard
593 1d14ffa9 bellard
vldepend: $(VL_OBJS:.o=.c)
594 6f30fa85 ths
	$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $^ 1>.depend
595 1d14ffa9 bellard
596 5fafdf24 ths
# libqemu
597 626df76a bellard
598 626df76a bellard
libqemu.a: $(LIBOBJS)
599 626df76a bellard
	rm -f $@
600 626df76a bellard
	$(AR) rcs $@ $(LIBOBJS)
601 626df76a bellard
602 1e43adfc bellard
translate.o: translate.c gen-op.h opc.h cpu.h
603 626df76a bellard
604 158142c2 bellard
translate-all.o: translate-all.c opc.h cpu.h
605 158142c2 bellard
606 158142c2 bellard
translate-op.o: translate-all.c op.h opc.h cpu.h
607 626df76a bellard
608 1e43adfc bellard
op.h: op.o $(DYNGEN)
609 626df76a bellard
	$(DYNGEN) -o $@ $<
610 626df76a bellard
611 1e43adfc bellard
opc.h: op.o $(DYNGEN)
612 626df76a bellard
	$(DYNGEN) -c -o $@ $<
613 626df76a bellard
614 1e43adfc bellard
gen-op.h: op.o $(DYNGEN)
615 626df76a bellard
	$(DYNGEN) -g -o $@ $<
616 626df76a bellard
617 1e43adfc bellard
op.o: op.c
618 6f30fa85 ths
	$(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $<
619 626df76a bellard
620 6e1b3e4d bellard
# HELPER_CFLAGS is used for all the code compiled with static register
621 6e1b3e4d bellard
# variables
622 6e1b3e4d bellard
ifeq ($(TARGET_BASE_ARCH), i386)
623 6e1b3e4d bellard
# XXX: rename helper.c to op_helper.c
624 1e43adfc bellard
helper.o: helper.c
625 6f30fa85 ths
	$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
626 6e1b3e4d bellard
else
627 6e1b3e4d bellard
op_helper.o: op_helper.c
628 6f30fa85 ths
	$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
629 6e1b3e4d bellard
endif
630 6e1b3e4d bellard
631 6e1b3e4d bellard
cpu-exec.o: cpu-exec.c
632 6f30fa85 ths
	$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
633 626df76a bellard
634 00a67ba1 bellard
# Note: this is a workaround. The real fix is to avoid compiling
635 00a67ba1 bellard
# cpu_signal_handler() in cpu-exec.c.
636 00a67ba1 bellard
signal.o: signal.c
637 6f30fa85 ths
	$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
638 00a67ba1 bellard
639 94470844 blueswir1
vga.o: pixel_ops.h
640 94470844 blueswir1
641 94470844 blueswir1
tcx.o: pixel_ops.h
642 94470844 blueswir1
643 0b0babc6 bellard
ifeq ($(TARGET_BASE_ARCH), i386)
644 664e0f19 bellard
op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h
645 1e43adfc bellard
endif
646 1e43adfc bellard
647 1e43adfc bellard
ifeq ($(TARGET_ARCH), arm)
648 1e43adfc bellard
op.o: op.c op_template.h
649 bdd5003a pbrook
pl110.o: pl110_template.h
650 1e43adfc bellard
endif
651 626df76a bellard
652 64b3ab24 bellard
ifeq ($(TARGET_BASE_ARCH), sparc)
653 0aac653c blueswir1
helper.o: cpu.h exec-all.h
654 0aac653c blueswir1
op.o: op.c op_template.h op_mem.h fop_template.h fbranch_template.h exec.h cpu.h
655 0aac653c blueswir1
op_helper.o: exec.h softmmu_template.h cpu.h
656 0aac653c blueswir1
translate.o: cpu.h exec-all.h disas.h
657 1e43adfc bellard
endif
658 626df76a bellard
659 a2458627 bellard
ifeq ($(TARGET_BASE_ARCH), ppc)
660 47c4d8f0 j_mayer
op.o: op.c op_template.h op_mem.h op_helper.h
661 47c4d8f0 j_mayer
op_helper.o: op_helper.c mfrom_table.c op_helper_mem.h op_helper.h
662 3fc6c082 bellard
translate.o: translate.c translate_init.c
663 728c9fd5 bellard
endif
664 728c9fd5 bellard
665 fbe4f65b ths
ifeq ($(TARGET_BASE_ARCH), mips)
666 fbe4f65b ths
helper.o: cpu.h exec-all.h
667 9daea906 ths
op.o: op_template.c fop_template.c op_mem.c exec.h cpu.h
668 4e9f8537 ths
op_helper.o: exec.h softmmu_template.h cpu.h
669 fbe4f65b ths
translate.o: translate_init.c exec-all.h disas.h
670 6af0bf9c bellard
endif
671 6af0bf9c bellard
672 5fe141fd bellard
loader.o: loader.c elf_ops.h
673 5fe141fd bellard
674 fdf9b3e8 bellard
ifeq ($(TARGET_ARCH), sh4)
675 fdf9b3e8 bellard
op.o: op.c op_mem.c cpu.h
676 fdf9b3e8 bellard
op_helper.o: op_helper.c exec.h cpu.h
677 fdf9b3e8 bellard
helper.o: helper.c exec.h cpu.h
678 27c7ca7e bellard
sh7750.o: sh7750.c sh7750_regs.h sh7750_regnames.h cpu.h
679 27c7ca7e bellard
shix.o: shix.c sh7750_regs.h sh7750_regnames.h
680 fdf9b3e8 bellard
sh7750_regnames.o: sh7750_regnames.c sh7750_regnames.h sh7750_regs.h
681 27c7ca7e bellard
tc58128.o: tc58128.c
682 fdf9b3e8 bellard
endif
683 fdf9b3e8 bellard
684 cf6c1b16 j_mayer
ifeq ($(TARGET_BASE_ARCH), alpha)
685 cf6c1b16 j_mayer
op.o: op.c op_template.h op_mem.h
686 cf6c1b16 j_mayer
op_helper.o: op_helper_mem.h
687 cf6c1b16 j_mayer
endif
688 cf6c1b16 j_mayer
689 214feb51 pbrook
$(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h
690 214feb51 pbrook
691 626df76a bellard
%.o: %.c
692 6f30fa85 ths
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
693 626df76a bellard
694 f72b519c bellard
%.o: %.S
695 6f30fa85 ths
	$(CC) $(CPPFLAGS) -c -o $@ $<
696 f72b519c bellard
697 626df76a bellard
clean:
698 e362b55a bellard
	rm -f *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o
699 1e43adfc bellard
700 5fafdf24 ths
install: all
701 9b14bb04 bellard
ifneq ($(PROGS),)
702 6a882643 pbrook
	$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
703 9b14bb04 bellard
endif
704 626df76a bellard
705 626df76a bellard
ifneq ($(wildcard .depend),)
706 626df76a bellard
include .depend
707 626df76a bellard
endif
708 1d14ffa9 bellard
709 c0fe3827 bellard
ifeq (1, 0)
710 1d14ffa9 bellard
audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \
711 c0fe3827 bellard
fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \
712 1d14ffa9 bellard
CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare
713 1d14ffa9 bellard
endif