root / Makefile.target @ cb33da57
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 | 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 | cb33da57 | blueswir1 | ifdef TARGET_HAS_ELFLOAD32 |
258 | cb33da57 | blueswir1 | OBJS+= elfload32.o |
259 | cb33da57 | blueswir1 | elfload32.o: elfload.c |
260 | cb33da57 | blueswir1 | endif |
261 | e5fe0c52 | pbrook | |
262 | 626df76a | bellard | ifeq ($(TARGET_ARCH), i386) |
263 | 626df76a | bellard | OBJS+= vm86.o |
264 | 626df76a | bellard | endif |
265 | f72b519c | bellard | ifeq ($(TARGET_ARCH), arm) |
266 | 158142c2 | bellard | OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ |
267 | f72b519c | bellard | nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ |
268 | a4f81979 | bellard | nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o |
269 | f72b519c | bellard | endif |
270 | e6e5906b | pbrook | ifeq ($(TARGET_ARCH), m68k) |
271 | e6e5906b | pbrook | OBJS+= m68k-sim.o m68k-semi.o |
272 | e6e5906b | pbrook | endif |
273 | 831b7825 | ths | endif #CONFIG_LINUX_USER |
274 | 831b7825 | ths | |
275 | 831b7825 | ths | ifdef CONFIG_DARWIN_USER |
276 | 831b7825 | ths | OBJS= main.o commpage.o machload.o mmap.o osdep.o signal.o syscall.o thunk.o |
277 | 831b7825 | ths | endif |
278 | 831b7825 | ths | |
279 | 626df76a | bellard | SRCS:= $(OBJS:.o=.c) |
280 | 626df76a | bellard | OBJS+= libqemu.a |
281 | 626df76a | bellard | |
282 | 626df76a | bellard | # cpu emulator library |
283 | 158142c2 | bellard | LIBOBJS=exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o\ |
284 | f1548daa | j_mayer | translate.o op.o host-utils.o |
285 | 158142c2 | bellard | ifdef CONFIG_SOFTFLOAT |
286 | 158142c2 | bellard | LIBOBJS+=fpu/softfloat.o |
287 | 158142c2 | bellard | else |
288 | 158142c2 | bellard | LIBOBJS+=fpu/softfloat-native.o |
289 | 158142c2 | bellard | endif |
290 | 6f30fa85 | ths | CPPFLAGS+=-I$(SRC_PATH)/fpu |
291 | 626df76a | bellard | |
292 | 626df76a | bellard | ifeq ($(TARGET_ARCH), i386) |
293 | 1e43adfc | bellard | LIBOBJS+=helper.o helper2.o |
294 | f72b519c | bellard | ifeq ($(ARCH), i386) |
295 | f72b519c | bellard | LIBOBJS+=translate-copy.o |
296 | f72b519c | bellard | endif |
297 | 626df76a | bellard | endif |
298 | 626df76a | bellard | |
299 | 0b0babc6 | bellard | ifeq ($(TARGET_ARCH), x86_64) |
300 | 0b0babc6 | bellard | LIBOBJS+=helper.o helper2.o |
301 | 0b0babc6 | bellard | endif |
302 | 0b0babc6 | bellard | |
303 | a2458627 | bellard | ifeq ($(TARGET_BASE_ARCH), ppc) |
304 | 728c9fd5 | bellard | LIBOBJS+= op_helper.o helper.o |
305 | 67867308 | bellard | endif |
306 | 67867308 | bellard | |
307 | fbe4f65b | ths | ifeq ($(TARGET_BASE_ARCH), mips) |
308 | 6af0bf9c | bellard | LIBOBJS+= op_helper.o helper.o |
309 | 6af0bf9c | bellard | endif |
310 | 6af0bf9c | bellard | |
311 | 64b3ab24 | bellard | ifeq ($(TARGET_BASE_ARCH), sparc) |
312 | e95c8d51 | bellard | LIBOBJS+= op_helper.o helper.o |
313 | e95c8d51 | bellard | endif |
314 | e95c8d51 | bellard | |
315 | b7bcbe95 | bellard | ifeq ($(TARGET_BASE_ARCH), arm) |
316 | b5ff1b31 | bellard | LIBOBJS+= op_helper.o helper.o |
317 | b7bcbe95 | bellard | endif |
318 | b7bcbe95 | bellard | |
319 | fdf9b3e8 | bellard | ifeq ($(TARGET_BASE_ARCH), sh4) |
320 | fdf9b3e8 | bellard | LIBOBJS+= op_helper.o helper.o |
321 | fdf9b3e8 | bellard | endif |
322 | fdf9b3e8 | bellard | |
323 | e6e5906b | pbrook | ifeq ($(TARGET_BASE_ARCH), m68k) |
324 | 0633879f | pbrook | LIBOBJS+= op_helper.o helper.o |
325 | e6e5906b | pbrook | endif |
326 | e6e5906b | pbrook | |
327 | cf6c1b16 | j_mayer | ifeq ($(TARGET_BASE_ARCH), alpha) |
328 | cf6c1b16 | j_mayer | LIBOBJS+= op_helper.o helper.o alpha_palcode.o |
329 | cf6c1b16 | j_mayer | endif |
330 | cf6c1b16 | j_mayer | |
331 | e7daa605 | ths | ifeq ($(TARGET_BASE_ARCH), cris) |
332 | e7daa605 | ths | LIBOBJS+= op_helper.o helper.o |
333 | e7daa605 | ths | LIBOBJS+= cris-dis.o |
334 | e7daa605 | ths | |
335 | e7daa605 | ths | ifndef CONFIG_USER_ONLY |
336 | e7daa605 | ths | LIBOBJS+= mmu.o |
337 | e7daa605 | ths | endif |
338 | e7daa605 | ths | endif |
339 | e7daa605 | ths | |
340 | 626df76a | bellard | # NOTE: the disassembler code is only needed for debugging |
341 | 5fafdf24 | ths | LIBOBJS+=disas.o |
342 | 626df76a | bellard | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
343 | bc51c5c9 | bellard | USE_I386_DIS=y |
344 | bc51c5c9 | bellard | endif |
345 | 0b0babc6 | bellard | ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) |
346 | bc51c5c9 | bellard | USE_I386_DIS=y |
347 | bc51c5c9 | bellard | endif |
348 | bc51c5c9 | bellard | ifdef USE_I386_DIS |
349 | 626df76a | bellard | LIBOBJS+=i386-dis.o |
350 | 626df76a | bellard | endif |
351 | 626df76a | bellard | ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) |
352 | 626df76a | bellard | LIBOBJS+=alpha-dis.o |
353 | 626df76a | bellard | endif |
354 | a2458627 | bellard | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
355 | 626df76a | bellard | LIBOBJS+=ppc-dis.o |
356 | 626df76a | bellard | endif |
357 | fbe4f65b | ths | ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips) |
358 | 6af0bf9c | bellard | LIBOBJS+=mips-dis.o |
359 | 6af0bf9c | bellard | endif |
360 | 64b3ab24 | bellard | ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) |
361 | 626df76a | bellard | LIBOBJS+=sparc-dis.o |
362 | 626df76a | bellard | endif |
363 | 626df76a | bellard | ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) |
364 | 626df76a | bellard | LIBOBJS+=arm-dis.o |
365 | 626df76a | bellard | endif |
366 | 48024e4a | bellard | ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k) |
367 | 48024e4a | bellard | LIBOBJS+=m68k-dis.o |
368 | 48024e4a | bellard | endif |
369 | fdf9b3e8 | bellard | ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4) |
370 | fdf9b3e8 | bellard | LIBOBJS+=sh4-dis.o |
371 | fdf9b3e8 | bellard | endif |
372 | 8f860bb8 | ths | ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390) |
373 | 8f860bb8 | ths | LIBOBJS+=s390-dis.o |
374 | 8f860bb8 | ths | endif |
375 | 626df76a | bellard | |
376 | 1fddef4b | bellard | ifdef CONFIG_GDBSTUB |
377 | 1fddef4b | bellard | OBJS+=gdbstub.o |
378 | 1fddef4b | bellard | endif |
379 | 626df76a | bellard | |
380 | 1e43adfc | bellard | all: $(PROGS) |
381 | 626df76a | bellard | |
382 | 1e43adfc | bellard | $(QEMU_USER): $(OBJS) |
383 | 6f30fa85 | ths | $(CC) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ $(LIBS) |
384 | 626df76a | bellard | ifeq ($(ARCH),alpha) |
385 | 626df76a | bellard | # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of |
386 | 626df76a | bellard | # the address space (31 bit so sign extending doesn't matter) |
387 | 626df76a | bellard | echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc |
388 | 626df76a | bellard | endif |
389 | 626df76a | bellard | |
390 | 626df76a | bellard | # must use static linking to avoid leaving stuff in virtual address space |
391 | aef445bd | pbrook | VL_OBJS=vl.o osdep.o readline.o monitor.o pci.o console.o loader.o isa_mmio.o |
392 | 18607dcb | bellard | VL_OBJS+=cutils.o |
393 | 83f64091 | bellard | VL_OBJS+=block.o block-raw.o |
394 | 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 |
395 | d537cf6c | pbrook | VL_OBJS+=irq.o |
396 | 7fb843f8 | bellard | ifdef CONFIG_WIN32 |
397 | 7fb843f8 | bellard | VL_OBJS+=tap-win32.o |
398 | 7fb843f8 | bellard | endif |
399 | a541f297 | bellard | |
400 | 1d14ffa9 | bellard | SOUND_HW = sb16.o es1370.o |
401 | b00052e4 | balrog | AUDIODRV = audio.o noaudio.o wavaudio.o mixeng.o |
402 | fb065187 | bellard | ifdef CONFIG_SDL |
403 | fb065187 | bellard | AUDIODRV += sdlaudio.o |
404 | fb065187 | bellard | endif |
405 | fb065187 | bellard | ifdef CONFIG_OSS |
406 | fb065187 | bellard | AUDIODRV += ossaudio.o |
407 | fb065187 | bellard | endif |
408 | 1d14ffa9 | bellard | ifdef CONFIG_COREAUDIO |
409 | 1d14ffa9 | bellard | AUDIODRV += coreaudio.o |
410 | 1d14ffa9 | bellard | endif |
411 | 1d14ffa9 | bellard | ifdef CONFIG_ALSA |
412 | 1d14ffa9 | bellard | AUDIODRV += alsaaudio.o |
413 | 1d14ffa9 | bellard | LIBS += -lasound |
414 | 1d14ffa9 | bellard | endif |
415 | 1d14ffa9 | bellard | ifdef CONFIG_DSOUND |
416 | 1d14ffa9 | bellard | AUDIODRV += dsoundaudio.o |
417 | 1d14ffa9 | bellard | LIBS += -lole32 -ldxguid |
418 | 85571bc7 | bellard | endif |
419 | 102a52e4 | bellard | ifdef CONFIG_FMOD |
420 | 85571bc7 | bellard | AUDIODRV += fmodaudio.o |
421 | 6f30fa85 | ths | audio.o fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS) |
422 | 102a52e4 | bellard | LIBS += $(CONFIG_FMOD_LIB) |
423 | 85571bc7 | bellard | endif |
424 | 1d14ffa9 | bellard | ifdef CONFIG_ADLIB |
425 | 1d14ffa9 | bellard | SOUND_HW += fmopl.o adlib.o |
426 | 1d14ffa9 | bellard | endif |
427 | ec36b695 | bellard | AUDIODRV+= wavcapture.o |
428 | 85571bc7 | bellard | |
429 | 8d5d2d4c | ths | ifdef CONFIG_VNC_TLS |
430 | 8d5d2d4c | ths | CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS) |
431 | 8d5d2d4c | ths | LIBS += $(CONFIG_VNC_TLS_LIBS) |
432 | 8d5d2d4c | ths | endif |
433 | 8d5d2d4c | ths | |
434 | 0ff596d0 | pbrook | VL_OBJS += i2c.o smbus.o |
435 | 0ff596d0 | pbrook | |
436 | 2e5d83bb | pbrook | # SCSI layer |
437 | 7d8406be | pbrook | VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o |
438 | 2e5d83bb | pbrook | |
439 | a594cfbf | bellard | # USB layer |
440 | 2e5d83bb | pbrook | VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o |
441 | f6d2a316 | balrog | VL_OBJS+= usb-wacom.o |
442 | a594cfbf | bellard | |
443 | 663e8e51 | ths | # EEPROM emulation |
444 | 663e8e51 | ths | VL_OBJS += eeprom93xx.o |
445 | 663e8e51 | ths | |
446 | a41b2ff2 | pbrook | # PCI network cards |
447 | 663e8e51 | ths | VL_OBJS += eepro100.o |
448 | 663e8e51 | ths | VL_OBJS += ne2000.o |
449 | 663e8e51 | ths | VL_OBJS += pcnet.o |
450 | 663e8e51 | ths | VL_OBJS += rtl8139.o |
451 | a41b2ff2 | pbrook | |
452 | 0b0babc6 | bellard | ifeq ($(TARGET_BASE_ARCH), i386) |
453 | a541f297 | bellard | # Hardware support |
454 | a41b2ff2 | pbrook | VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
455 | fd06c375 | bellard | VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o |
456 | b00052e4 | balrog | VL_OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o |
457 | 591a6d62 | ths | VL_OBJS+= usb-uhci.o smbus_eeprom.o vmmouse.o vmport.o vmware_vga.o |
458 | b00052e4 | balrog | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
459 | 67b915a5 | bellard | endif |
460 | a2458627 | bellard | ifeq ($(TARGET_BASE_ARCH), ppc) |
461 | a41b2ff2 | pbrook | VL_OBJS+= ppc.o ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
462 | 8ecc7913 | j_mayer | VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o pflash_cfi02.o |
463 | b00052e4 | balrog | VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o |
464 | 7875ed20 | j_mayer | VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o |
465 | 7875ed20 | j_mayer | # PowerPC 4xx boards |
466 | 7875ed20 | j_mayer | VL_OBJS+= ppc4xx_devs.o ppc405_uc.o ppc405_boards.o |
467 | b00052e4 | balrog | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
468 | a541f297 | bellard | endif |
469 | fbe4f65b | ths | ifeq ($(TARGET_BASE_ARCH), mips) |
470 | ad6fe1d2 | ths | VL_OBJS+= mips_r4k.o mips_malta.o mips_pica61.o |
471 | ad6fe1d2 | ths | VL_OBJS+= mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o |
472 | 31211df1 | ths | VL_OBJS+= jazz_led.o |
473 | 9542611a | ths | VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o |
474 | 7b717336 | ths | VL_OBJS+= piix_pci.o smbus_eeprom.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV) |
475 | 83b1fb88 | ths | CPPFLAGS += -DHAS_AUDIO |
476 | 6af0bf9c | bellard | endif |
477 | e7daa605 | ths | ifeq ($(TARGET_BASE_ARCH), cris) |
478 | e7daa605 | ths | VL_OBJS+= etraxfs.o |
479 | e7daa605 | ths | VL_OBJS+= ptimer.o |
480 | e7daa605 | ths | VL_OBJS+= etraxfs_timer.o |
481 | e7daa605 | ths | VL_OBJS+= etraxfs_ser.o |
482 | e7daa605 | ths | endif |
483 | 64b3ab24 | bellard | ifeq ($(TARGET_BASE_ARCH), sparc) |
484 | 3475187d | bellard | ifeq ($(TARGET_ARCH), sparc64) |
485 | 502a5395 | pbrook | VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o |
486 | 83469015 | bellard | VL_OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o |
487 | 20c9f095 | blueswir1 | VL_OBJS+= cirrus_vga.o parallel.o ptimer.o |
488 | 3475187d | bellard | else |
489 | 67e999be | bellard | VL_OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o |
490 | 67e999be | bellard | VL_OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o esp.o sparc32_dma.o |
491 | 8d05ea8a | blueswir1 | VL_OBJS+= cs4231.o ptimer.o |
492 | 3475187d | bellard | endif |
493 | e95c8d51 | bellard | endif |
494 | b5ff1b31 | bellard | ifeq ($(TARGET_BASE_ARCH), arm) |
495 | cdbdb648 | pbrook | VL_OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o |
496 | 7e1543c2 | pbrook | VL_OBJS+= arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o |
497 | 6963d7af | pbrook | VL_OBJS+= versatile_pci.o sd.o ptimer.o |
498 | e69954b9 | pbrook | VL_OBJS+= arm_gic.o realview.o arm_sysctl.o |
499 | 8e71621f | pbrook | VL_OBJS+= arm-semi.o |
500 | b00052e4 | balrog | VL_OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o |
501 | adb86c37 | balrog | VL_OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o max111x.o max7310.o |
502 | adb86c37 | balrog | VL_OBJS+= spitz.o ads7846.o ide.o serial.o nand.o $(AUDIODRV) wm8750.o |
503 | 9ff6755b | balrog | VL_OBJS+= omap.o omap_lcdc.o omap1_clk.o omap_mmc.o palm.o ecc.o |
504 | 5a1237c4 | balrog | CPPFLAGS += -DHAS_AUDIO |
505 | b5ff1b31 | bellard | endif |
506 | fdf9b3e8 | bellard | ifeq ($(TARGET_BASE_ARCH), sh4) |
507 | 0d78f544 | ths | VL_OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o |
508 | 80f515e6 | balrog | VL_OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o |
509 | fdf9b3e8 | bellard | endif |
510 | 0633879f | pbrook | ifeq ($(TARGET_BASE_ARCH), m68k) |
511 | 7e049b8a | pbrook | VL_OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o |
512 | a87295e8 | pbrook | VL_OBJS+= m68k-semi.o |
513 | 0633879f | pbrook | endif |
514 | a541f297 | bellard | ifdef CONFIG_GDBSTUB |
515 | 5fafdf24 | ths | VL_OBJS+=gdbstub.o |
516 | 728c9fd5 | bellard | endif |
517 | 626df76a | bellard | ifdef CONFIG_SDL |
518 | 6070dd07 | ths | VL_OBJS+=sdl.o x_keymap.o |
519 | de5eaa64 | bellard | endif |
520 | 70848515 | ths | VL_OBJS+=vnc.o d3des.o |
521 | 5b0753e0 | bellard | ifdef CONFIG_COCOA |
522 | 5b0753e0 | bellard | VL_OBJS+=cocoa.o |
523 | 1d14ffa9 | bellard | COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit |
524 | 1d14ffa9 | bellard | ifdef CONFIG_COREAUDIO |
525 | 1d14ffa9 | bellard | COCOA_LIBS+=-framework CoreAudio |
526 | 1d14ffa9 | bellard | endif |
527 | 5b0753e0 | bellard | endif |
528 | 7c1f25b4 | bellard | ifdef CONFIG_SLIRP |
529 | 6f30fa85 | ths | CPPFLAGS+=-I$(SRC_PATH)/slirp |
530 | 7c1f25b4 | bellard | SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \ |
531 | 7c1f25b4 | bellard | slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \ |
532 | c7f74643 | bellard | tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o |
533 | 7c1f25b4 | bellard | VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) |
534 | 626df76a | bellard | endif |
535 | 626df76a | bellard | |
536 | db8d7dd1 | ths | VL_LDFLAGS=$(VL_OS_LDFLAGS) |
537 | 70956b77 | ths | VL_LIBS=$(AIOLIBS) |
538 | c321f673 | bellard | # specific flags are needed for non soft mmu emulator |
539 | c321f673 | bellard | ifdef CONFIG_STATIC |
540 | c321f673 | bellard | VL_LDFLAGS+=-static |
541 | c321f673 | bellard | endif |
542 | de5eaa64 | bellard | ifndef CONFIG_SOFTMMU |
543 | 5fafdf24 | ths | VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld |
544 | de5eaa64 | bellard | endif |
545 | 83fb7adf | bellard | ifndef CONFIG_DARWIN |
546 | 11d9f695 | bellard | ifndef CONFIG_WIN32 |
547 | ec530c81 | bellard | ifndef CONFIG_SOLARIS |
548 | 70956b77 | ths | VL_LIBS+=-lutil |
549 | 11d9f695 | bellard | endif |
550 | 83fb7adf | bellard | endif |
551 | ec530c81 | bellard | endif |
552 | e3086fbf | bellard | ifdef TARGET_GPROF |
553 | 6f30fa85 | ths | vl.o: BASE_CFLAGS+=-p |
554 | e3086fbf | bellard | VL_LDFLAGS+=-p |
555 | e3086fbf | bellard | endif |
556 | c321f673 | bellard | |
557 | b8076a74 | bellard | ifeq ($(ARCH),ia64) |
558 | b8076a74 | bellard | VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
559 | b8076a74 | bellard | endif |
560 | b8076a74 | bellard | |
561 | 74ccb34e | bellard | ifeq ($(ARCH),sparc64) |
562 | 3142255c | blueswir1 | VL_LDFLAGS+=-m64 |
563 | 3142255c | blueswir1 | ifneq ($(CONFIG_SOLARIS),yes) |
564 | 3142255c | blueswir1 | VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
565 | 3142255c | blueswir1 | endif |
566 | 74ccb34e | bellard | endif |
567 | 74ccb34e | bellard | |
568 | 1d14ffa9 | bellard | ifdef CONFIG_WIN32 |
569 | 1d14ffa9 | bellard | SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole |
570 | 1d14ffa9 | bellard | endif |
571 | 1d14ffa9 | bellard | |
572 | 1e43adfc | bellard | $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a |
573 | 3a11702b | pbrook | $(CC) $(VL_LDFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS) |
574 | 5b0753e0 | bellard | |
575 | 5b0753e0 | bellard | cocoa.o: cocoa.m |
576 | 6f30fa85 | ths | $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
577 | 626df76a | bellard | |
578 | 3d11d0eb | bellard | sdl.o: sdl.c keymaps.c sdl_keysym.h |
579 | 6f30fa85 | ths | $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
580 | 626df76a | bellard | |
581 | 70848515 | ths | vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h d3des.c d3des.h |
582 | 6f30fa85 | ths | $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
583 | 24236869 | bellard | |
584 | 9f059eca | bellard | sdlaudio.o: sdlaudio.c |
585 | 6f30fa85 | ths | $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
586 | 9f059eca | bellard | |
587 | 626df76a | bellard | depend: $(SRCS) |
588 | 6f30fa85 | ths | $(CC) -MM $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $^ 1>.depend |
589 | 626df76a | bellard | |
590 | 1d14ffa9 | bellard | vldepend: $(VL_OBJS:.o=.c) |
591 | 6f30fa85 | ths | $(CC) -MM $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $^ 1>.depend |
592 | 1d14ffa9 | bellard | |
593 | 5fafdf24 | ths | # libqemu |
594 | 626df76a | bellard | |
595 | 626df76a | bellard | libqemu.a: $(LIBOBJS) |
596 | 626df76a | bellard | rm -f $@ |
597 | 626df76a | bellard | $(AR) rcs $@ $(LIBOBJS) |
598 | 626df76a | bellard | |
599 | 1e43adfc | bellard | translate.o: translate.c gen-op.h opc.h cpu.h |
600 | 626df76a | bellard | |
601 | 158142c2 | bellard | translate-all.o: translate-all.c opc.h cpu.h |
602 | 158142c2 | bellard | |
603 | 158142c2 | bellard | translate-op.o: translate-all.c op.h opc.h cpu.h |
604 | 626df76a | bellard | |
605 | 1e43adfc | bellard | op.h: op.o $(DYNGEN) |
606 | 626df76a | bellard | $(DYNGEN) -o $@ $< |
607 | 626df76a | bellard | |
608 | 1e43adfc | bellard | opc.h: op.o $(DYNGEN) |
609 | 626df76a | bellard | $(DYNGEN) -c -o $@ $< |
610 | 626df76a | bellard | |
611 | 1e43adfc | bellard | gen-op.h: op.o $(DYNGEN) |
612 | 626df76a | bellard | $(DYNGEN) -g -o $@ $< |
613 | 626df76a | bellard | |
614 | 1e43adfc | bellard | op.o: op.c |
615 | 6f30fa85 | ths | $(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $< |
616 | 626df76a | bellard | |
617 | 6e1b3e4d | bellard | # HELPER_CFLAGS is used for all the code compiled with static register |
618 | 6e1b3e4d | bellard | # variables |
619 | 6e1b3e4d | bellard | ifeq ($(TARGET_BASE_ARCH), i386) |
620 | 6e1b3e4d | bellard | # XXX: rename helper.c to op_helper.c |
621 | 1e43adfc | bellard | helper.o: helper.c |
622 | 6f30fa85 | ths | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
623 | 6e1b3e4d | bellard | else |
624 | 6e1b3e4d | bellard | op_helper.o: op_helper.c |
625 | 6f30fa85 | ths | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
626 | 6e1b3e4d | bellard | endif |
627 | 6e1b3e4d | bellard | |
628 | 6e1b3e4d | bellard | cpu-exec.o: cpu-exec.c |
629 | 6f30fa85 | ths | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
630 | 626df76a | bellard | |
631 | 00a67ba1 | bellard | # Note: this is a workaround. The real fix is to avoid compiling |
632 | 00a67ba1 | bellard | # cpu_signal_handler() in cpu-exec.c. |
633 | 00a67ba1 | bellard | signal.o: signal.c |
634 | 6f30fa85 | ths | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
635 | 00a67ba1 | bellard | |
636 | 94470844 | blueswir1 | vga.o: pixel_ops.h |
637 | 94470844 | blueswir1 | |
638 | 94470844 | blueswir1 | tcx.o: pixel_ops.h |
639 | 94470844 | blueswir1 | |
640 | 0b0babc6 | bellard | ifeq ($(TARGET_BASE_ARCH), i386) |
641 | 664e0f19 | bellard | op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h |
642 | 1e43adfc | bellard | endif |
643 | 1e43adfc | bellard | |
644 | 1e43adfc | bellard | ifeq ($(TARGET_ARCH), arm) |
645 | 1e43adfc | bellard | op.o: op.c op_template.h |
646 | bdd5003a | pbrook | pl110.o: pl110_template.h |
647 | 1e43adfc | bellard | endif |
648 | 626df76a | bellard | |
649 | 64b3ab24 | bellard | ifeq ($(TARGET_BASE_ARCH), sparc) |
650 | 0aac653c | blueswir1 | helper.o: cpu.h exec-all.h |
651 | 0aac653c | blueswir1 | op.o: op.c op_template.h op_mem.h fop_template.h fbranch_template.h exec.h cpu.h |
652 | 0aac653c | blueswir1 | op_helper.o: exec.h softmmu_template.h cpu.h |
653 | 0aac653c | blueswir1 | translate.o: cpu.h exec-all.h disas.h |
654 | 1e43adfc | bellard | endif |
655 | 626df76a | bellard | |
656 | a2458627 | bellard | ifeq ($(TARGET_BASE_ARCH), ppc) |
657 | 47c4d8f0 | j_mayer | op.o: op.c op_template.h op_mem.h op_helper.h |
658 | 47c4d8f0 | j_mayer | op_helper.o: op_helper.c mfrom_table.c op_helper_mem.h op_helper.h |
659 | 3fc6c082 | bellard | translate.o: translate.c translate_init.c |
660 | 728c9fd5 | bellard | endif |
661 | 728c9fd5 | bellard | |
662 | fbe4f65b | ths | ifeq ($(TARGET_BASE_ARCH), mips) |
663 | fbe4f65b | ths | helper.o: cpu.h exec-all.h |
664 | 9daea906 | ths | op.o: op_template.c fop_template.c op_mem.c exec.h cpu.h |
665 | 4e9f8537 | ths | op_helper.o: exec.h softmmu_template.h cpu.h |
666 | fbe4f65b | ths | translate.o: translate_init.c exec-all.h disas.h |
667 | 6af0bf9c | bellard | endif |
668 | 6af0bf9c | bellard | |
669 | 5fe141fd | bellard | loader.o: loader.c elf_ops.h |
670 | 5fe141fd | bellard | |
671 | fdf9b3e8 | bellard | ifeq ($(TARGET_ARCH), sh4) |
672 | fdf9b3e8 | bellard | op.o: op.c op_mem.c cpu.h |
673 | fdf9b3e8 | bellard | op_helper.o: op_helper.c exec.h cpu.h |
674 | fdf9b3e8 | bellard | helper.o: helper.c exec.h cpu.h |
675 | 27c7ca7e | bellard | sh7750.o: sh7750.c sh7750_regs.h sh7750_regnames.h cpu.h |
676 | 27c7ca7e | bellard | shix.o: shix.c sh7750_regs.h sh7750_regnames.h |
677 | fdf9b3e8 | bellard | sh7750_regnames.o: sh7750_regnames.c sh7750_regnames.h sh7750_regs.h |
678 | 27c7ca7e | bellard | tc58128.o: tc58128.c |
679 | fdf9b3e8 | bellard | endif |
680 | fdf9b3e8 | bellard | |
681 | cf6c1b16 | j_mayer | ifeq ($(TARGET_BASE_ARCH), alpha) |
682 | cf6c1b16 | j_mayer | op.o: op.c op_template.h op_mem.h |
683 | cf6c1b16 | j_mayer | op_helper.o: op_helper_mem.h |
684 | cf6c1b16 | j_mayer | endif |
685 | cf6c1b16 | j_mayer | |
686 | 214feb51 | pbrook | $(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h |
687 | 214feb51 | pbrook | |
688 | 626df76a | bellard | %.o: %.c |
689 | 6f30fa85 | ths | $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
690 | 626df76a | bellard | |
691 | f72b519c | bellard | %.o: %.S |
692 | 6f30fa85 | ths | $(CC) $(CPPFLAGS) -c -o $@ $< |
693 | f72b519c | bellard | |
694 | 626df76a | bellard | clean: |
695 | e362b55a | bellard | rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o |
696 | 1e43adfc | bellard | |
697 | 5fafdf24 | ths | install: all |
698 | 9b14bb04 | bellard | ifneq ($(PROGS),) |
699 | 6a882643 | pbrook | $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" |
700 | 9b14bb04 | bellard | endif |
701 | 626df76a | bellard | |
702 | 626df76a | bellard | ifneq ($(wildcard .depend),) |
703 | 626df76a | bellard | include .depend |
704 | 626df76a | bellard | endif |
705 | 1d14ffa9 | bellard | |
706 | c0fe3827 | bellard | ifeq (1, 0) |
707 | 1d14ffa9 | bellard | audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \ |
708 | c0fe3827 | bellard | fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \ |
709 | 1d14ffa9 | bellard | CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare |
710 | 1d14ffa9 | bellard | endif |