root / Makefile.target @ 5f650495
History | View | Annotate | Download (18.3 kB)
1 | 626df76a | bellard | include config.mak |
---|---|---|---|
2 | 17759187 | aliguori | include $(SRC_PATH)/rules.mak |
3 | 626df76a | bellard | |
4 | 0b0babc6 | bellard | TARGET_BASE_ARCH:=$(TARGET_ARCH) |
5 | 0b0babc6 | bellard | ifeq ($(TARGET_ARCH), x86_64) |
6 | 0b0babc6 | bellard | TARGET_BASE_ARCH:=i386 |
7 | 0b0babc6 | bellard | endif |
8 | 540635ba | ths | ifeq ($(TARGET_ARCH), mipsn32) |
9 | 540635ba | ths | TARGET_BASE_ARCH:=mips |
10 | 540635ba | ths | endif |
11 | fbe4f65b | ths | ifeq ($(TARGET_ARCH), mips64) |
12 | fbe4f65b | ths | TARGET_BASE_ARCH:=mips |
13 | fbe4f65b | ths | endif |
14 | a2458627 | bellard | ifeq ($(TARGET_ARCH), ppc64) |
15 | a2458627 | bellard | TARGET_BASE_ARCH:=ppc |
16 | a2458627 | bellard | endif |
17 | 22f8a8b3 | j_mayer | ifeq ($(TARGET_ARCH), ppc64h) |
18 | 22f8a8b3 | j_mayer | TARGET_BASE_ARCH:=ppc |
19 | 22f8a8b3 | j_mayer | endif |
20 | d4082e95 | j_mayer | ifeq ($(TARGET_ARCH), ppcemb) |
21 | d4082e95 | j_mayer | TARGET_BASE_ARCH:=ppc |
22 | d4082e95 | j_mayer | endif |
23 | 64b3ab24 | bellard | ifeq ($(TARGET_ARCH), sparc64) |
24 | 64b3ab24 | bellard | TARGET_BASE_ARCH:=sparc |
25 | 64b3ab24 | bellard | endif |
26 | 0b0babc6 | bellard | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
27 | 4fb240a4 | bellard | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw |
28 | 46dc3881 | balrog | CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H |
29 | 0b0babc6 | bellard | #CFLAGS+=-Werror |
30 | 626df76a | bellard | LIBS= |
31 | 1e43adfc | bellard | # user emulator name |
32 | 0c64b9cd | bellard | ifndef TARGET_ARCH2 |
33 | c91fde65 | bellard | TARGET_ARCH2=$(TARGET_ARCH) |
34 | 0c64b9cd | bellard | endif |
35 | 808c4954 | bellard | ifeq ($(TARGET_ARCH),arm) |
36 | 808c4954 | bellard | ifeq ($(TARGET_WORDS_BIGENDIAN),yes) |
37 | c91fde65 | bellard | TARGET_ARCH2=armeb |
38 | 808c4954 | bellard | endif |
39 | c91fde65 | bellard | endif |
40 | 908f52b0 | pbrook | ifeq ($(TARGET_ARCH),sh4) |
41 | 908f52b0 | pbrook | ifeq ($(TARGET_WORDS_BIGENDIAN),yes) |
42 | 908f52b0 | pbrook | TARGET_ARCH2=sh4eb |
43 | 908f52b0 | pbrook | endif |
44 | 908f52b0 | pbrook | endif |
45 | 01f5e596 | bellard | ifeq ($(TARGET_ARCH),mips) |
46 | c91fde65 | bellard | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
47 | c91fde65 | bellard | TARGET_ARCH2=mipsel |
48 | 01f5e596 | bellard | endif |
49 | 01f5e596 | bellard | endif |
50 | 540635ba | ths | ifeq ($(TARGET_ARCH),mipsn32) |
51 | 540635ba | ths | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
52 | 540635ba | ths | TARGET_ARCH2=mipsn32el |
53 | 540635ba | ths | endif |
54 | 540635ba | ths | endif |
55 | fbe4f65b | ths | ifeq ($(TARGET_ARCH),mips64) |
56 | fbe4f65b | ths | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
57 | fbe4f65b | ths | TARGET_ARCH2=mips64el |
58 | fbe4f65b | ths | endif |
59 | fbe4f65b | ths | endif |
60 | 40293e58 | bellard | |
61 | 40293e58 | bellard | ifdef CONFIG_USER_ONLY |
62 | 40293e58 | bellard | # user emulator name |
63 | 40293e58 | bellard | QEMU_PROG=qemu-$(TARGET_ARCH2) |
64 | 40293e58 | bellard | else |
65 | 1e43adfc | bellard | # system emulator name |
66 | a541f297 | bellard | ifeq ($(TARGET_ARCH), i386) |
67 | 40293e58 | bellard | QEMU_PROG=qemu$(EXESUF) |
68 | 0db63474 | bellard | else |
69 | 40293e58 | bellard | QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF) |
70 | a541f297 | bellard | endif |
71 | de5eaa64 | bellard | endif |
72 | 626df76a | bellard | |
73 | 40293e58 | bellard | PROGS=$(QEMU_PROG) |
74 | 626df76a | bellard | |
75 | 6c041c54 | ths | # cc-option |
76 | c7328801 | aliguori | # Usage: CFLAGS+=$(call cc-option, $(CFLAGS), -falign-functions=0, -malign-functions=0) |
77 | 6c041c54 | ths | |
78 | c7328801 | aliguori | cc-option = $(shell if $(CC) $(1) $(2) -S -o /dev/null -xc /dev/null \ |
79 | c7328801 | aliguori | > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi ;) |
80 | 6f30fa85 | ths | |
81 | 40293e58 | bellard | HELPER_CFLAGS= |
82 | 40293e58 | bellard | |
83 | 626df76a | bellard | ifeq ($(ARCH),i386) |
84 | 6f30fa85 | ths | HELPER_CFLAGS+=-fomit-frame-pointer |
85 | bc51c5c9 | bellard | endif |
86 | bc51c5c9 | bellard | |
87 | d19076fa | malc | ifeq ($(subst ppc64,ppc,$(ARCH))$(TARGET_BASE_ARCH),ppcppc) |
88 | d19076fa | malc | translate.o: CFLAGS := $(CFLAGS) $(call cc-option, $(CFLAGS), -fno-unit-at-a-time,) |
89 | d19076fa | malc | endif |
90 | d19076fa | malc | |
91 | 626df76a | bellard | ifeq ($(ARCH),sparc) |
92 | c7328801 | aliguori | ifneq ($(CONFIG_SOLARIS),yes) |
93 | 40293e58 | bellard | HELPER_CFLAGS+=-ffixed-i0 |
94 | 3142255c | blueswir1 | endif |
95 | fdbb4691 | bellard | endif |
96 | 626df76a | bellard | |
97 | 626df76a | bellard | ifeq ($(ARCH),alpha) |
98 | 626df76a | bellard | # Ensure there's only a single GP |
99 | 40293e58 | bellard | CFLAGS+=-msmall-data |
100 | 626df76a | bellard | endif |
101 | 626df76a | bellard | |
102 | f54b3f92 | aurel32 | ifeq ($(ARCH),hppa) |
103 | f54b3f92 | aurel32 | BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
104 | f54b3f92 | aurel32 | endif |
105 | f54b3f92 | aurel32 | |
106 | 626df76a | bellard | ifeq ($(ARCH),ia64) |
107 | 40293e58 | bellard | CFLAGS+=-mno-sdata |
108 | 83fb7adf | bellard | endif |
109 | 83fb7adf | bellard | |
110 | 40293e58 | bellard | CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS) |
111 | 40293e58 | bellard | LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS) |
112 | 626df76a | bellard | |
113 | 6f30fa85 | ths | CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
114 | 4a244704 | Anthony Liguori | CPPFLAGS+=-U_FORTIFY_SOURCE |
115 | 626df76a | bellard | LIBS+=-lm |
116 | 67b915a5 | bellard | ifdef CONFIG_WIN32 |
117 | 3db38e87 | bellard | LIBS+=-lwinmm -lws2_32 -liphlpapi |
118 | 67b915a5 | bellard | endif |
119 | ec530c81 | bellard | ifdef CONFIG_SOLARIS |
120 | ec530c81 | bellard | LIBS+=-lsocket -lnsl -lresolv |
121 | 0475a5ca | ths | ifdef NEEDS_LIBSUNMATH |
122 | 0475a5ca | ths | LIBS+=-lsunmath |
123 | 0475a5ca | ths | LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib |
124 | 40293e58 | bellard | CFLAGS+=-I/opt/SUNWspro/prod/include/cc |
125 | f72b519c | bellard | endif |
126 | 831b7825 | ths | endif |
127 | 831b7825 | ths | |
128 | 7ba1e619 | aliguori | kvm.o: CFLAGS+=$(KVM_CFLAGS) |
129 | 7ba1e619 | aliguori | kvm-all.o: CFLAGS+=$(KVM_CFLAGS) |
130 | 7ba1e619 | aliguori | |
131 | 40293e58 | bellard | all: $(PROGS) |
132 | c2fb2637 | Paul Brook | # Dummy command so that make thinks it has done something |
133 | c2fb2637 | Paul Brook | @true |
134 | 626df76a | bellard | |
135 | 40293e58 | bellard | ######################################################### |
136 | 626df76a | bellard | # cpu emulator library |
137 | c9e0df73 | Juan Quintela | libobj-y = exec.o translate-all.o cpu-exec.o translate.o host-utils.o |
138 | 943e0a31 | Juan Quintela | libobj-$(CONFIG_KQEMU) += kqemu.o |
139 | 57fec1fe | bellard | # TCG code generator |
140 | c9e0df73 | Juan Quintela | libobj-y += tcg/tcg.o tcg/tcg-runtime.o |
141 | 57fec1fe | bellard | CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) |
142 | 8289b279 | blueswir1 | ifeq ($(ARCH),sparc64) |
143 | 8289b279 | blueswir1 | CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc |
144 | 8289b279 | blueswir1 | endif |
145 | 158142c2 | bellard | ifdef CONFIG_SOFTFLOAT |
146 | c9e0df73 | Juan Quintela | libobj-y += fpu/softfloat.o |
147 | 158142c2 | bellard | else |
148 | c9e0df73 | Juan Quintela | libobj-y += fpu/softfloat-native.o |
149 | 158142c2 | bellard | endif |
150 | 6f30fa85 | ths | CPPFLAGS+=-I$(SRC_PATH)/fpu |
151 | c9e0df73 | Juan Quintela | libobj-y += op_helper.o helper.o |
152 | e95c8d51 | bellard | |
153 | b7bcbe95 | bellard | ifeq ($(TARGET_BASE_ARCH), arm) |
154 | c9e0df73 | Juan Quintela | libobj-y += neon_helper.o iwmmxt_helper.o |
155 | e6e5906b | pbrook | endif |
156 | e6e5906b | pbrook | |
157 | cf6c1b16 | j_mayer | ifeq ($(TARGET_BASE_ARCH), alpha) |
158 | c9e0df73 | Juan Quintela | libobj-y += alpha_palcode.o |
159 | cf6c1b16 | j_mayer | endif |
160 | cf6c1b16 | j_mayer | |
161 | e7daa605 | ths | ifeq ($(TARGET_BASE_ARCH), cris) |
162 | c9e0df73 | Juan Quintela | libobj-y += cris-dis.o |
163 | e7daa605 | ths | |
164 | e7daa605 | ths | ifndef CONFIG_USER_ONLY |
165 | c9e0df73 | Juan Quintela | libobj-y += mmu.o |
166 | e7daa605 | ths | endif |
167 | e7daa605 | ths | endif |
168 | e7daa605 | ths | |
169 | 626df76a | bellard | # NOTE: the disassembler code is only needed for debugging |
170 | c9e0df73 | Juan Quintela | libobj-y += disas.o |
171 | 626df76a | bellard | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
172 | bc51c5c9 | bellard | USE_I386_DIS=y |
173 | bc51c5c9 | bellard | endif |
174 | 0b0babc6 | bellard | ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) |
175 | bc51c5c9 | bellard | USE_I386_DIS=y |
176 | bc51c5c9 | bellard | endif |
177 | 943e0a31 | Juan Quintela | libobj-$(USE_I386_DIS) += i386-dis.o |
178 | 626df76a | bellard | ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) |
179 | c9e0df73 | Juan Quintela | libobj-y += alpha-dis.o |
180 | 626df76a | bellard | endif |
181 | a2458627 | bellard | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
182 | c9e0df73 | Juan Quintela | libobj-y += ppc-dis.o |
183 | 626df76a | bellard | endif |
184 | 72b675ca | Edgar E. Iglesias | ifeq ($(findstring microblaze, $(TARGET_BASE_ARCH) $(ARCH)),microblaze) |
185 | c9e0df73 | Juan Quintela | libobj-y += microblaze-dis.o |
186 | 72b675ca | Edgar E. Iglesias | ifndef CONFIG_USER_ONLY |
187 | c9e0df73 | Juan Quintela | libobj-y += mmu.o |
188 | 72b675ca | Edgar E. Iglesias | endif |
189 | 72b675ca | Edgar E. Iglesias | endif |
190 | fbe4f65b | ths | ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips) |
191 | c9e0df73 | Juan Quintela | libobj-y += mips-dis.o |
192 | 6af0bf9c | bellard | endif |
193 | 64b3ab24 | bellard | ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) |
194 | c9e0df73 | Juan Quintela | libobj-y += sparc-dis.o |
195 | 626df76a | bellard | endif |
196 | 626df76a | bellard | ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) |
197 | c9e0df73 | Juan Quintela | libobj-y += arm-dis.o |
198 | 626df76a | bellard | endif |
199 | 48024e4a | bellard | ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k) |
200 | c9e0df73 | Juan Quintela | libobj-y += m68k-dis.o |
201 | 48024e4a | bellard | endif |
202 | fdf9b3e8 | bellard | ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4) |
203 | c9e0df73 | Juan Quintela | libobj-y += sh4-dis.o |
204 | fdf9b3e8 | bellard | endif |
205 | f54b3f92 | aurel32 | ifeq ($(findstring hppa, $(TARGET_BASE_ARCH) $(ARCH)),hppa) |
206 | c9e0df73 | Juan Quintela | libobj-y += hppa-dis.o |
207 | f54b3f92 | aurel32 | endif |
208 | 8f860bb8 | ths | ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390) |
209 | c9e0df73 | Juan Quintela | libobj-y += s390-dis.o |
210 | 8f860bb8 | ths | endif |
211 | 626df76a | bellard | |
212 | 40293e58 | bellard | # libqemu |
213 | 40293e58 | bellard | |
214 | c9e0df73 | Juan Quintela | libqemu.a: $(libobj-y) |
215 | 40293e58 | bellard | |
216 | 86e840ee | aurel32 | translate.o: translate.c cpu.h |
217 | 40293e58 | bellard | |
218 | 86e840ee | aurel32 | translate-all.o: translate-all.c cpu.h |
219 | 40293e58 | bellard | |
220 | 86e840ee | aurel32 | tcg/tcg.o: cpu.h |
221 | 40293e58 | bellard | |
222 | 40293e58 | bellard | # HELPER_CFLAGS is used for all the code compiled with static register |
223 | 40293e58 | bellard | # variables |
224 | 807544e2 | aliguori | op_helper.o: CFLAGS += $(HELPER_CFLAGS) $(I386_CFLAGS) |
225 | 40293e58 | bellard | |
226 | 807544e2 | aliguori | cpu-exec.o: CFLAGS += $(HELPER_CFLAGS) |
227 | 40293e58 | bellard | |
228 | 40293e58 | bellard | ######################################################### |
229 | 40293e58 | bellard | # Linux user emulator target |
230 | 40293e58 | bellard | |
231 | 40293e58 | bellard | ifdef CONFIG_LINUX_USER |
232 | 40293e58 | bellard | |
233 | 40293e58 | bellard | ifndef TARGET_ABI_DIR |
234 | 40293e58 | bellard | TARGET_ABI_DIR=$(TARGET_ARCH) |
235 | 40293e58 | bellard | endif |
236 | 3ebdd119 | aurel32 | VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
237 | 40293e58 | bellard | CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
238 | 40293e58 | bellard | |
239 | 40293e58 | bellard | ifdef CONFIG_STATIC |
240 | 40293e58 | bellard | LDFLAGS+=-static |
241 | 40293e58 | bellard | endif |
242 | 40293e58 | bellard | |
243 | 40293e58 | bellard | ifeq ($(ARCH),i386) |
244 | 40293e58 | bellard | ifdef TARGET_GPROF |
245 | 40293e58 | bellard | USE_I386_LD=y |
246 | 40293e58 | bellard | endif |
247 | 40293e58 | bellard | ifdef CONFIG_STATIC |
248 | 40293e58 | bellard | USE_I386_LD=y |
249 | 40293e58 | bellard | endif |
250 | 40293e58 | bellard | ifdef USE_I386_LD |
251 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
252 | 40293e58 | bellard | else |
253 | 40293e58 | bellard | # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object |
254 | 40293e58 | bellard | # that the kernel ELF loader considers as an executable. I think this |
255 | 40293e58 | bellard | # is the simplest way to make it self virtualizable! |
256 | 40293e58 | bellard | LDFLAGS+=-Wl,-shared |
257 | 40293e58 | bellard | endif |
258 | 40293e58 | bellard | endif |
259 | 40293e58 | bellard | |
260 | 40293e58 | bellard | ifeq ($(ARCH),x86_64) |
261 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
262 | 40293e58 | bellard | endif |
263 | 40293e58 | bellard | |
264 | 40293e58 | bellard | ifeq ($(ARCH),ppc) |
265 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
266 | 40293e58 | bellard | endif |
267 | 40293e58 | bellard | |
268 | 810260a8 | malc | ifeq ($(ARCH),ppc64) |
269 | 810260a8 | malc | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
270 | 810260a8 | malc | endif |
271 | 810260a8 | malc | |
272 | 40293e58 | bellard | ifeq ($(ARCH),s390) |
273 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
274 | 40293e58 | bellard | endif |
275 | 40293e58 | bellard | |
276 | 40293e58 | bellard | ifeq ($(ARCH),sparc) |
277 | 40293e58 | bellard | # -static is used to avoid g1/g3 usage by the dynamic linker |
278 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static |
279 | 40293e58 | bellard | endif |
280 | 40293e58 | bellard | |
281 | 40293e58 | bellard | ifeq ($(ARCH),sparc64) |
282 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
283 | 40293e58 | bellard | endif |
284 | 40293e58 | bellard | |
285 | 40293e58 | bellard | ifeq ($(ARCH),alpha) |
286 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
287 | 40293e58 | bellard | endif |
288 | 40293e58 | bellard | |
289 | 40293e58 | bellard | ifeq ($(ARCH),ia64) |
290 | 40293e58 | bellard | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld |
291 | 40293e58 | bellard | endif |
292 | 40293e58 | bellard | |
293 | 40293e58 | bellard | ifeq ($(ARCH),arm) |
294 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
295 | 40293e58 | bellard | endif |
296 | 40293e58 | bellard | |
297 | 40293e58 | bellard | ifeq ($(ARCH),m68k) |
298 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
299 | 40293e58 | bellard | endif |
300 | 40293e58 | bellard | |
301 | 40293e58 | bellard | ifeq ($(ARCH),mips) |
302 | 40293e58 | bellard | ifeq ($(WORDS_BIGENDIAN),yes) |
303 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
304 | 40293e58 | bellard | else |
305 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
306 | 40293e58 | bellard | endif |
307 | 40293e58 | bellard | endif |
308 | 40293e58 | bellard | |
309 | 40293e58 | bellard | ifeq ($(ARCH),mips64) |
310 | 40293e58 | bellard | ifeq ($(WORDS_BIGENDIAN),yes) |
311 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
312 | 40293e58 | bellard | else |
313 | 40293e58 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
314 | 40293e58 | bellard | endif |
315 | 40293e58 | bellard | endif |
316 | 40293e58 | bellard | |
317 | 6d946cda | aurel32 | # profiling code |
318 | 6d946cda | aurel32 | ifdef TARGET_GPROF |
319 | 6d946cda | aurel32 | LDFLAGS+=-p |
320 | 6d946cda | aurel32 | CFLAGS+=-p |
321 | 6d946cda | aurel32 | endif |
322 | 6d946cda | aurel32 | |
323 | a8e492c0 | Juan Quintela | obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \ |
324 | 5f650495 | Isaku Yamahata | elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o \ |
325 | 5f650495 | Isaku Yamahata | ioport-user.o |
326 | e5d355d1 | aliguori | LIBS+= $(PTHREADLIBS) |
327 | e5d355d1 | aliguori | LIBS+= $(CLOCKLIBS) |
328 | 943e0a31 | Juan Quintela | obj-$(TARGET_HAS_BFLT) += flatload.o |
329 | 943e0a31 | Juan Quintela | |
330 | 40293e58 | bellard | ifdef TARGET_HAS_ELFLOAD32 |
331 | 40293e58 | bellard | elfload32.o: elfload.c |
332 | 40293e58 | bellard | endif |
333 | 943e0a31 | Juan Quintela | obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o |
334 | 40293e58 | bellard | |
335 | 40293e58 | bellard | ifeq ($(TARGET_ARCH), i386) |
336 | a8e492c0 | Juan Quintela | obj-y += vm86.o |
337 | 40293e58 | bellard | endif |
338 | 40293e58 | bellard | ifeq ($(TARGET_ARCH), arm) |
339 | a8e492c0 | Juan Quintela | obj-y += nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ |
340 | 40293e58 | bellard | nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ |
341 | 40293e58 | bellard | nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o |
342 | 40293e58 | bellard | endif |
343 | 40293e58 | bellard | ifeq ($(TARGET_ARCH), m68k) |
344 | a8e492c0 | Juan Quintela | obj-y += m68k-sim.o m68k-semi.o |
345 | 40293e58 | bellard | endif |
346 | 40293e58 | bellard | |
347 | 40293e58 | bellard | # Note: this is a workaround. The real fix is to avoid compiling |
348 | 40293e58 | bellard | # cpu_signal_handler() in cpu-exec.c. |
349 | 807544e2 | aliguori | signal.o: CFLAGS += $(HELPER_CFLAGS) |
350 | 626df76a | bellard | |
351 | 0bfe3ca5 | Anthony Liguori | $(QEMU_PROG): ARLIBS=../libqemu_user.a libqemu.a |
352 | a8e492c0 | Juan Quintela | $(QEMU_PROG): $(obj-y) ../libqemu_user.a libqemu.a |
353 | a8e492c0 | Juan Quintela | $(call LINK,$(obj-y)) |
354 | 626df76a | bellard | ifeq ($(ARCH),alpha) |
355 | 626df76a | bellard | # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of |
356 | 626df76a | bellard | # the address space (31 bit so sign extending doesn't matter) |
357 | 626df76a | bellard | echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc |
358 | 626df76a | bellard | endif |
359 | 626df76a | bellard | |
360 | 40293e58 | bellard | endif #CONFIG_LINUX_USER |
361 | 40293e58 | bellard | |
362 | 40293e58 | bellard | ######################################################### |
363 | 40293e58 | bellard | # Darwin user emulator target |
364 | 40293e58 | bellard | |
365 | 40293e58 | bellard | ifdef CONFIG_DARWIN_USER |
366 | 40293e58 | bellard | |
367 | 40293e58 | bellard | VPATH+=:$(SRC_PATH)/darwin-user |
368 | 40293e58 | bellard | CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH) |
369 | 40293e58 | bellard | |
370 | 40293e58 | bellard | # Leave some space for the regular program loading zone |
371 | 40293e58 | bellard | LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000 |
372 | 40293e58 | bellard | |
373 | 40293e58 | bellard | LIBS+=-lmx |
374 | 40293e58 | bellard | |
375 | a8e492c0 | Juan Quintela | obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \ |
376 | 5f650495 | Isaku Yamahata | gdbstub.o gdbstub-xml.o ioport-user.o |
377 | 40293e58 | bellard | |
378 | 40293e58 | bellard | # Note: this is a workaround. The real fix is to avoid compiling |
379 | 40293e58 | bellard | # cpu_signal_handler() in cpu-exec.c. |
380 | 807544e2 | aliguori | signal.o: CFLAGS += $(HELPER_CFLAGS) |
381 | 40293e58 | bellard | |
382 | 0bfe3ca5 | Anthony Liguori | $(QEMU_PROG): ARLIBS=libqemu.a |
383 | a8e492c0 | Juan Quintela | $(QEMU_PROG): $(obj-y) libqemu.a |
384 | a8e492c0 | Juan Quintela | $(call LINK,$(obj-y)) |
385 | 40293e58 | bellard | |
386 | 40293e58 | bellard | endif #CONFIG_DARWIN_USER |
387 | 40293e58 | bellard | |
388 | 40293e58 | bellard | ######################################################### |
389 | 84778508 | blueswir1 | # BSD user emulator target |
390 | 84778508 | blueswir1 | |
391 | 84778508 | blueswir1 | ifdef CONFIG_BSD_USER |
392 | 84778508 | blueswir1 | |
393 | 84778508 | blueswir1 | VPATH+=:$(SRC_PATH)/bsd-user |
394 | 84778508 | blueswir1 | CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH) |
395 | 84778508 | blueswir1 | |
396 | 84778508 | blueswir1 | ifdef CONFIG_STATIC |
397 | 84778508 | blueswir1 | LDFLAGS+=-static |
398 | 84778508 | blueswir1 | endif |
399 | 84778508 | blueswir1 | |
400 | 84778508 | blueswir1 | ifeq ($(ARCH),i386) |
401 | 84778508 | blueswir1 | ifdef TARGET_GPROF |
402 | 84778508 | blueswir1 | USE_I386_LD=y |
403 | 84778508 | blueswir1 | endif |
404 | 84778508 | blueswir1 | ifdef CONFIG_STATIC |
405 | 84778508 | blueswir1 | USE_I386_LD=y |
406 | 84778508 | blueswir1 | endif |
407 | 84778508 | blueswir1 | ifdef USE_I386_LD |
408 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
409 | 84778508 | blueswir1 | else |
410 | 84778508 | blueswir1 | # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object |
411 | 84778508 | blueswir1 | # that the kernel ELF loader considers as an executable. I think this |
412 | 84778508 | blueswir1 | # is the simplest way to make it self virtualizable! |
413 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-shared |
414 | 84778508 | blueswir1 | endif |
415 | 84778508 | blueswir1 | endif |
416 | 84778508 | blueswir1 | |
417 | 84778508 | blueswir1 | ifeq ($(ARCH),x86_64) |
418 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
419 | 84778508 | blueswir1 | endif |
420 | 84778508 | blueswir1 | |
421 | 84778508 | blueswir1 | ifeq ($(ARCH),ppc) |
422 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
423 | 84778508 | blueswir1 | endif |
424 | 84778508 | blueswir1 | |
425 | 84778508 | blueswir1 | ifeq ($(ARCH),ppc64) |
426 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
427 | 84778508 | blueswir1 | endif |
428 | 84778508 | blueswir1 | |
429 | 84778508 | blueswir1 | ifeq ($(ARCH),s390) |
430 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
431 | 84778508 | blueswir1 | endif |
432 | 84778508 | blueswir1 | |
433 | 84778508 | blueswir1 | ifeq ($(ARCH),sparc) |
434 | 84778508 | blueswir1 | # -static is used to avoid g1/g3 usage by the dynamic linker |
435 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static |
436 | 84778508 | blueswir1 | endif |
437 | 84778508 | blueswir1 | |
438 | 84778508 | blueswir1 | ifeq ($(ARCH),sparc64) |
439 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
440 | 84778508 | blueswir1 | endif |
441 | 84778508 | blueswir1 | |
442 | 84778508 | blueswir1 | ifeq ($(ARCH),alpha) |
443 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
444 | 84778508 | blueswir1 | endif |
445 | 84778508 | blueswir1 | |
446 | 84778508 | blueswir1 | ifeq ($(ARCH),ia64) |
447 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld |
448 | 84778508 | blueswir1 | endif |
449 | 84778508 | blueswir1 | |
450 | 84778508 | blueswir1 | ifeq ($(ARCH),arm) |
451 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
452 | 84778508 | blueswir1 | endif |
453 | 84778508 | blueswir1 | |
454 | 84778508 | blueswir1 | ifeq ($(ARCH),m68k) |
455 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
456 | 84778508 | blueswir1 | endif |
457 | 84778508 | blueswir1 | |
458 | 84778508 | blueswir1 | ifeq ($(ARCH),mips) |
459 | 84778508 | blueswir1 | ifeq ($(WORDS_BIGENDIAN),yes) |
460 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
461 | 84778508 | blueswir1 | else |
462 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
463 | 84778508 | blueswir1 | endif |
464 | 84778508 | blueswir1 | endif |
465 | 84778508 | blueswir1 | |
466 | 84778508 | blueswir1 | ifeq ($(ARCH),mips64) |
467 | 84778508 | blueswir1 | ifeq ($(WORDS_BIGENDIAN),yes) |
468 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
469 | 84778508 | blueswir1 | else |
470 | 84778508 | blueswir1 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
471 | 84778508 | blueswir1 | endif |
472 | 84778508 | blueswir1 | endif |
473 | 84778508 | blueswir1 | |
474 | a8e492c0 | Juan Quintela | obj-y = main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \ |
475 | 5f650495 | Isaku Yamahata | gdbstub.o gdbstub-xml.o ioport-user.o |
476 | a8e492c0 | Juan Quintela | obj-y += uaccess.o |
477 | 84778508 | blueswir1 | |
478 | 84778508 | blueswir1 | # Note: this is a workaround. The real fix is to avoid compiling |
479 | 84778508 | blueswir1 | # cpu_signal_handler() in cpu-exec.c. |
480 | 807544e2 | aliguori | signal.o: CFLAGS += $(HELPER_CFLAGS) |
481 | 84778508 | blueswir1 | |
482 | 0bfe3ca5 | Anthony Liguori | $(QEMU_PROG): ARLIBS=libqemu.a ../libqemu_user.a |
483 | a8e492c0 | Juan Quintela | $(QEMU_PROG): $(obj-y) libqemu.a ../libqemu_user.a |
484 | a8e492c0 | Juan Quintela | $(call LINK,$(obj-y)) |
485 | 84778508 | blueswir1 | |
486 | 84778508 | blueswir1 | endif #CONFIG_BSD_USER |
487 | 84778508 | blueswir1 | |
488 | 84778508 | blueswir1 | ######################################################### |
489 | 40293e58 | bellard | # System emulator target |
490 | 40293e58 | bellard | ifndef CONFIG_USER_ONLY |
491 | 40293e58 | bellard | |
492 | a8e492c0 | Juan Quintela | obj-y = vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o \ |
493 | 32993977 | Isaku Yamahata | gdbstub.o gdbstub-xml.o msix.o ioport.o |
494 | 1fd31ad7 | aliguori | # virtio has to be here due to weird dependency between PCI and virtio-net. |
495 | 1fd31ad7 | aliguori | # need to fix this properly |
496 | a8e492c0 | Juan Quintela | obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o |
497 | a8e492c0 | Juan Quintela | obj-$(CONFIG_KVM) += kvm.o kvm-all.o |
498 | a3392f9b | aliguori | |
499 | 40293e58 | bellard | LIBS+=-lz |
500 | 1d14ffa9 | bellard | ifdef CONFIG_ALSA |
501 | 1d14ffa9 | bellard | LIBS += -lasound |
502 | 1d14ffa9 | bellard | endif |
503 | ca9cc28c | balrog | ifdef CONFIG_ESD |
504 | ca9cc28c | balrog | LIBS += -lesd |
505 | ca9cc28c | balrog | endif |
506 | b8e59f18 | malc | ifdef CONFIG_PA |
507 | b8e59f18 | malc | LIBS += -lpulse-simple |
508 | b8e59f18 | malc | endif |
509 | 1d14ffa9 | bellard | ifdef CONFIG_DSOUND |
510 | 1d14ffa9 | bellard | LIBS += -lole32 -ldxguid |
511 | 85571bc7 | bellard | endif |
512 | 102a52e4 | bellard | ifdef CONFIG_FMOD |
513 | 102a52e4 | bellard | LIBS += $(CONFIG_FMOD_LIB) |
514 | 85571bc7 | bellard | endif |
515 | 2f6a1ab0 | blueswir1 | ifdef CONFIG_OSS |
516 | 2f6a1ab0 | blueswir1 | LIBS += $(CONFIG_OSS_LIB) |
517 | 2f6a1ab0 | blueswir1 | endif |
518 | 4fb240a4 | bellard | |
519 | b6271b48 | Juan Quintela | sound-obj-y = |
520 | b6271b48 | Juan Quintela | sound-obj-$(CONFIG_SB16) += sb16.o |
521 | b6271b48 | Juan Quintela | sound-obj-$(CONFIG_ES1370) += es1370.o |
522 | b6271b48 | Juan Quintela | sound-obj-$(CONFIG_AC97) += ac97.o |
523 | b6271b48 | Juan Quintela | sound-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o |
524 | b6271b48 | Juan Quintela | sound-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o |
525 | 57a943c4 | malc | sound-obj-$(CONFIG_CS4231A) += cs4231a.o |
526 | b6271b48 | Juan Quintela | |
527 | 1d14ffa9 | bellard | ifdef CONFIG_ADLIB |
528 | c40e866f | malc | adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0 |
529 | 1d14ffa9 | bellard | endif |
530 | 85571bc7 | bellard | |
531 | 8d5d2d4c | ths | ifdef CONFIG_VNC_TLS |
532 | 8d5d2d4c | ths | CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS) |
533 | 8d5d2d4c | ths | LIBS += $(CONFIG_VNC_TLS_LIBS) |
534 | 8d5d2d4c | ths | endif |
535 | 8d5d2d4c | ths | |
536 | 2f9606b3 | aliguori | ifdef CONFIG_VNC_SASL |
537 | 2f9606b3 | aliguori | CPPFLAGS += $(CONFIG_VNC_SASL_CFLAGS) |
538 | 2f9606b3 | aliguori | LIBS += $(CONFIG_VNC_SASL_LIBS) |
539 | 2f9606b3 | aliguori | endif |
540 | 2f9606b3 | aliguori | |
541 | fb599c9a | balrog | ifdef CONFIG_BLUEZ |
542 | fb599c9a | balrog | LIBS += $(CONFIG_BLUEZ_LIBS) |
543 | fb599c9a | balrog | endif |
544 | fb599c9a | balrog | |
545 | e37630ca | aliguori | # xen backend driver support |
546 | 943e0a31 | Juan Quintela | obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o |
547 | e37630ca | aliguori | ifeq ($(CONFIG_XEN), yes) |
548 | e37630ca | aliguori | LIBS += $(XEN_LIBS) |
549 | e37630ca | aliguori | endif |
550 | e37630ca | aliguori | |
551 | a594cfbf | bellard | # USB layer |
552 | a8e492c0 | Juan Quintela | obj-y += usb-ohci.o |
553 | a594cfbf | bellard | |
554 | a41b2ff2 | pbrook | # PCI network cards |
555 | a8e492c0 | Juan Quintela | obj-y += eepro100.o |
556 | a8e492c0 | Juan Quintela | obj-y += ne2000.o |
557 | a8e492c0 | Juan Quintela | obj-y += pcnet.o |
558 | a8e492c0 | Juan Quintela | obj-y += rtl8139.o |
559 | a8e492c0 | Juan Quintela | obj-y += e1000.o |
560 | a41b2ff2 | pbrook | |
561 | 9dd986cc | Richard W.M. Jones | # Generic watchdog support and some watchdog devices |
562 | a8e492c0 | Juan Quintela | obj-y += wdt_ib700.o wdt_i6300esb.o |
563 | 9dd986cc | Richard W.M. Jones | |
564 | 0b0babc6 | bellard | ifeq ($(TARGET_BASE_ARCH), i386) |
565 | a541f297 | bellard | # Hardware support |
566 | 5f877627 | Juan Quintela | obj-y += ide.o pckbd.o vga.o $(sound-obj-y) dma.o |
567 | a8e492c0 | Juan Quintela | obj-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o |
568 | a8e492c0 | Juan Quintela | obj-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o |
569 | a8e492c0 | Juan Quintela | obj-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o |
570 | a8e492c0 | Juan Quintela | obj-y += device-hotplug.o pci-hotplug.o smbios.o |
571 | b00052e4 | balrog | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
572 | 67b915a5 | bellard | endif |
573 | a2458627 | bellard | ifeq ($(TARGET_BASE_ARCH), ppc) |
574 | 70ad3dec | aurel32 | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
575 | 3cbee15b | j_mayer | # shared objects |
576 | 5f877627 | Juan Quintela | obj-y += ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o |
577 | 3cbee15b | j_mayer | # PREP target |
578 | a8e492c0 | Juan Quintela | obj-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o |
579 | a8e492c0 | Juan Quintela | obj-y += prep_pci.o ppc_prep.o |
580 | 3cbee15b | j_mayer | # Mac shared devices |
581 | a8e492c0 | Juan Quintela | obj-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o |
582 | 3cbee15b | j_mayer | # OldWorld PowerMac |
583 | a8e492c0 | Juan Quintela | obj-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o |
584 | 3cbee15b | j_mayer | # NewWorld PowerMac |
585 | a8e492c0 | Juan Quintela | obj-y += unin_pci.o ppc_newworld.o |
586 | 3cbee15b | j_mayer | # PowerPC 4xx boards |
587 | a8e492c0 | Juan Quintela | obj-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o |
588 | a8e492c0 | Juan Quintela | obj-y += ppc440.o ppc440_bamboo.o |
589 | 74c62ba8 | aurel32 | # PowerPC E500 boards |
590 | a8e492c0 | Juan Quintela | obj-y += ppce500_pci.o ppce500_mpc8544ds.o |
591 | f652e6af | aurel32 | ifdef FDT_LIBS |
592 | a8e492c0 | Juan Quintela | obj-y += device_tree.o |
593 | f652e6af | aurel32 | LIBS+= $(FDT_LIBS) |
594 | f652e6af | aurel32 | endif |
595 | 943e0a31 | Juan Quintela | obj-$(CONFIG_KVM) += kvm_ppc.o |
596 | a541f297 | bellard | endif |
597 | fbe4f65b | ths | ifeq ($(TARGET_BASE_ARCH), mips) |
598 | a8e492c0 | Juan Quintela | obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o |
599 | a8e492c0 | Juan Quintela | obj-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o |
600 | a8e492c0 | Juan Quintela | obj-y += g364fb.o jazz_led.o dp8393x.o |
601 | a8e492c0 | Juan Quintela | obj-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o |
602 | 5f877627 | Juan Quintela | obj-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y) |
603 | a8e492c0 | Juan Quintela | obj-y += mipsnet.o |
604 | a8e492c0 | Juan Quintela | obj-y += pflash_cfi01.o |
605 | a8e492c0 | Juan Quintela | obj-y += vmware_vga.o |
606 | 4ce7ff6e | aurel32 | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
607 | 6af0bf9c | bellard | endif |
608 | 72b675ca | Edgar E. Iglesias | ifeq ($(TARGET_BASE_ARCH), microblaze) |
609 | a8e492c0 | Juan Quintela | obj-y += petalogix_s3adsp1800_mmu.o |
610 | 72b675ca | Edgar E. Iglesias | |
611 | a8e492c0 | Juan Quintela | obj-y += microblaze_pic_cpu.o |
612 | a8e492c0 | Juan Quintela | obj-y += xilinx_intc.o |
613 | a8e492c0 | Juan Quintela | obj-y += xilinx_timer.o |
614 | a8e492c0 | Juan Quintela | obj-y += xilinx_uartlite.o |
615 | a8e492c0 | Juan Quintela | obj-y += xilinx_ethlite.o |
616 | 72b675ca | Edgar E. Iglesias | |
617 | a8e492c0 | Juan Quintela | obj-y += pflash_cfi02.o |
618 | 72b675ca | Edgar E. Iglesias | ifdef FDT_LIBS |
619 | a8e492c0 | Juan Quintela | obj-y += device_tree.o |
620 | 72b675ca | Edgar E. Iglesias | LIBS+= $(FDT_LIBS) |
621 | 72b675ca | Edgar E. Iglesias | endif |
622 | 72b675ca | Edgar E. Iglesias | endif |
623 | e7daa605 | ths | ifeq ($(TARGET_BASE_ARCH), cris) |
624 | 10c144e2 | edgar_igl | # Boards |
625 | a8e492c0 | Juan Quintela | obj-y += cris_pic_cpu.o etraxfs.o axis_dev88.o |
626 | 10c144e2 | edgar_igl | |
627 | 10c144e2 | edgar_igl | # IO blocks |
628 | a8e492c0 | Juan Quintela | obj-y += etraxfs_dma.o |
629 | a8e492c0 | Juan Quintela | obj-y += etraxfs_pic.o |
630 | a8e492c0 | Juan Quintela | obj-y += etraxfs_eth.o |
631 | a8e492c0 | Juan Quintela | obj-y += etraxfs_timer.o |
632 | a8e492c0 | Juan Quintela | obj-y += etraxfs_ser.o |
633 | e62b5b13 | edgar_igl | |
634 | a8e492c0 | Juan Quintela | obj-y += pflash_cfi02.o |
635 | e7daa605 | ths | endif |
636 | 64b3ab24 | bellard | ifeq ($(TARGET_BASE_ARCH), sparc) |
637 | 3475187d | bellard | ifeq ($(TARGET_ARCH), sparc64) |
638 | a8e492c0 | Juan Quintela | obj-y += sun4u.o ide.o pckbd.o vga.o apb_pci.o |
639 | a8e492c0 | Juan Quintela | obj-y += fdc.o mc146818rtc.o serial.o |
640 | a8e492c0 | Juan Quintela | obj-y += cirrus_vga.o parallel.o |
641 | 3475187d | bellard | else |
642 | a8e492c0 | Juan Quintela | obj-y += sun4m.o tcx.o iommu.o slavio_intctl.o |
643 | a8e492c0 | Juan Quintela | obj-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o |
644 | a8e492c0 | Juan Quintela | obj-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o |
645 | 3475187d | bellard | endif |
646 | e95c8d51 | bellard | endif |
647 | b5ff1b31 | bellard | ifeq ($(TARGET_BASE_ARCH), arm) |
648 | a8e492c0 | Juan Quintela | obj-y += integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o |
649 | a8e492c0 | Juan Quintela | obj-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o |
650 | a8e492c0 | Juan Quintela | obj-y += versatile_pci.o |
651 | a8e492c0 | Juan Quintela | obj-y += realview_gic.o realview.o arm_sysctl.o mpcore.o |
652 | a8e492c0 | Juan Quintela | obj-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o |
653 | a8e492c0 | Juan Quintela | obj-y += pl061.o |
654 | a8e492c0 | Juan Quintela | obj-y += arm-semi.o |
655 | a8e492c0 | Juan Quintela | obj-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o |
656 | a8e492c0 | Juan Quintela | obj-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o |
657 | a8e492c0 | Juan Quintela | obj-y += pflash_cfi01.o gumstix.o |
658 | a8e492c0 | Juan Quintela | obj-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o |
659 | a8e492c0 | Juan Quintela | obj-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o |
660 | a8e492c0 | Juan Quintela | obj-y += omap2.o omap_dss.o soc_dma.o |
661 | a8e492c0 | Juan Quintela | obj-y += omap_sx1.o palm.o tsc210x.o |
662 | a8e492c0 | Juan Quintela | obj-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o |
663 | a8e492c0 | Juan Quintela | obj-y += mst_fpga.o mainstone.o |
664 | a8e492c0 | Juan Quintela | obj-y += musicpal.o pflash_cfi02.o |
665 | a8e492c0 | Juan Quintela | obj-y += framebuffer.o |
666 | a8e492c0 | Juan Quintela | obj-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o |
667 | a8e492c0 | Juan Quintela | obj-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o |
668 | a8e492c0 | Juan Quintela | obj-y += syborg_virtio.o |
669 | 5a1237c4 | balrog | CPPFLAGS += -DHAS_AUDIO |
670 | b5ff1b31 | bellard | endif |
671 | fdf9b3e8 | bellard | ifeq ($(TARGET_BASE_ARCH), sh4) |
672 | a8e492c0 | Juan Quintela | obj-y += shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o |
673 | a8e492c0 | Juan Quintela | obj-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o |
674 | a8e492c0 | Juan Quintela | obj-y += ide.o |
675 | fdf9b3e8 | bellard | endif |
676 | 0633879f | pbrook | ifeq ($(TARGET_BASE_ARCH), m68k) |
677 | a8e492c0 | Juan Quintela | obj-y += an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o |
678 | a8e492c0 | Juan Quintela | obj-y += m68k-semi.o dummy_m68k.o |
679 | 0633879f | pbrook | endif |
680 | 5b0753e0 | bellard | ifdef CONFIG_COCOA |
681 | 1d14ffa9 | bellard | COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit |
682 | 1d14ffa9 | bellard | ifdef CONFIG_COREAUDIO |
683 | 1d14ffa9 | bellard | COCOA_LIBS+=-framework CoreAudio |
684 | 1d14ffa9 | bellard | endif |
685 | 5b0753e0 | bellard | endif |
686 | 7c1f25b4 | bellard | ifdef CONFIG_SLIRP |
687 | 6f30fa85 | ths | CPPFLAGS+=-I$(SRC_PATH)/slirp |
688 | 626df76a | bellard | endif |
689 | 626df76a | bellard | |
690 | e5d355d1 | aliguori | LIBS+=$(PTHREADLIBS) |
691 | e5d355d1 | aliguori | LIBS+=$(CLOCKLIBS) |
692 | c321f673 | bellard | # specific flags are needed for non soft mmu emulator |
693 | c321f673 | bellard | ifdef CONFIG_STATIC |
694 | 40293e58 | bellard | LDFLAGS+=-static |
695 | de5eaa64 | bellard | endif |
696 | 83fb7adf | bellard | ifndef CONFIG_DARWIN |
697 | 11d9f695 | bellard | ifndef CONFIG_WIN32 |
698 | ec530c81 | bellard | ifndef CONFIG_SOLARIS |
699 | b29fe3ed | malc | ifndef CONFIG_AIX |
700 | 40293e58 | bellard | LIBS+=-lutil |
701 | 11d9f695 | bellard | endif |
702 | b29fe3ed | malc | endif |
703 | 83fb7adf | bellard | endif |
704 | ec530c81 | bellard | endif |
705 | e3086fbf | bellard | ifdef TARGET_GPROF |
706 | 40293e58 | bellard | vl.o: CFLAGS+=-p |
707 | 40293e58 | bellard | LDFLAGS+=-p |
708 | e3086fbf | bellard | endif |
709 | c321f673 | bellard | |
710 | b8076a74 | bellard | ifeq ($(ARCH),ia64) |
711 | 40293e58 | bellard | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
712 | 74ccb34e | bellard | endif |
713 | 74ccb34e | bellard | |
714 | 1d14ffa9 | bellard | ifdef CONFIG_WIN32 |
715 | 1d14ffa9 | bellard | SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole |
716 | 1d14ffa9 | bellard | endif |
717 | 1d14ffa9 | bellard | |
718 | 40293e58 | bellard | # profiling code |
719 | 40293e58 | bellard | ifdef TARGET_GPROF |
720 | 40293e58 | bellard | LDFLAGS+=-p |
721 | 40293e58 | bellard | main.o: CFLAGS+=-p |
722 | 6e1b3e4d | bellard | endif |
723 | 6e1b3e4d | bellard | |
724 | 537fe2d6 | Anthony Liguori | vl.o: CFLAGS+=$(SDL_CFLAGS) |
725 | 537fe2d6 | Anthony Liguori | |
726 | 5824d651 | blueswir1 | vl.o: qemu-options.h |
727 | 5824d651 | blueswir1 | |
728 | 2313086a | Blue Swirl | monitor.o: qemu-monitor.h |
729 | 2313086a | Blue Swirl | |
730 | 769ce76d | Alexander Graf | $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS) |
731 | 79eb76ad | Anthony Liguori | $(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) |
732 | a8e492c0 | Juan Quintela | $(QEMU_PROG): $(obj-y) ../libqemu_common.a libqemu.a $(HWLIB) |
733 | a8e492c0 | Juan Quintela | $(call LINK,$(obj-y)) |
734 | 626df76a | bellard | |
735 | 40293e58 | bellard | endif # !CONFIG_USER_ONLY |
736 | 00a67ba1 | bellard | |
737 | 56aebc89 | pbrook | gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh |
738 | 56aebc89 | pbrook | ifeq ($(TARGET_XML_FILES),) |
739 | 1aef4c57 | aurel32 | $(call quiet-command,rm -f $@ && echo > $@," GEN $(TARGET_DIR)$@") |
740 | 56aebc89 | pbrook | else |
741 | 1aef4c57 | aurel32 | $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") |
742 | 56aebc89 | pbrook | endif |
743 | 56aebc89 | pbrook | |
744 | 5824d651 | blueswir1 | qemu-options.h: $(SRC_PATH)/qemu-options.hx |
745 | 0d00e563 | aliguori | $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") |
746 | 5824d651 | blueswir1 | |
747 | 2313086a | Blue Swirl | qemu-monitor.h: $(SRC_PATH)/qemu-monitor.hx |
748 | 2313086a | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") |
749 | 2313086a | Blue Swirl | |
750 | 626df76a | bellard | clean: |
751 | 2313086a | Blue Swirl | rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o |
752 | 57fec1fe | bellard | rm -f *.d */*.d tcg/*.o |
753 | 2313086a | Blue Swirl | rm -f qemu-options.h qemu-monitor.h gdbstub-xml.c |
754 | 1e43adfc | bellard | |
755 | 5fafdf24 | ths | install: all |
756 | 9b14bb04 | bellard | ifneq ($(PROGS),) |
757 | 1625af87 | aliguori | $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)" |
758 | 9b14bb04 | bellard | endif |
759 | 626df76a | bellard | |
760 | 2f96c28d | j_mayer | # Include automatically generated dependency files |
761 | 2f96c28d | j_mayer | -include $(wildcard *.d */*.d) |