Statistics
| Branch: | Revision:

root / Makefile.target @ 4e9f8537

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