Statistics
| Branch: | Revision:

root / Makefile.target @ 0d00e563

History | View | Annotate | Download (17 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 626df76a bellard
LIBS+=-lm
115 67b915a5 bellard
ifdef CONFIG_WIN32
116 3db38e87 bellard
LIBS+=-lwinmm -lws2_32 -liphlpapi
117 67b915a5 bellard
endif
118 ec530c81 bellard
ifdef CONFIG_SOLARIS
119 ec530c81 bellard
LIBS+=-lsocket -lnsl -lresolv
120 0475a5ca ths
ifdef NEEDS_LIBSUNMATH
121 0475a5ca ths
LIBS+=-lsunmath
122 0475a5ca ths
LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
123 40293e58 bellard
CFLAGS+=-I/opt/SUNWspro/prod/include/cc
124 f72b519c bellard
endif
125 831b7825 ths
endif
126 831b7825 ths
127 7ba1e619 aliguori
kvm.o: CFLAGS+=$(KVM_CFLAGS)
128 7ba1e619 aliguori
kvm-all.o: CFLAGS+=$(KVM_CFLAGS)
129 7ba1e619 aliguori
130 40293e58 bellard
all: $(PROGS)
131 626df76a bellard
132 40293e58 bellard
#########################################################
133 626df76a bellard
# cpu emulator library
134 57fec1fe bellard
LIBOBJS=exec.o kqemu.o translate-all.o cpu-exec.o\
135 cf2be984 blueswir1
        translate.o host-utils.o
136 57fec1fe bellard
# TCG code generator
137 49516bc0 aurel32
LIBOBJS+= tcg/tcg.o tcg/tcg-runtime.o
138 57fec1fe bellard
CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
139 8289b279 blueswir1
ifeq ($(ARCH),sparc64)
140 8289b279 blueswir1
CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
141 8289b279 blueswir1
endif
142 158142c2 bellard
ifdef CONFIG_SOFTFLOAT
143 158142c2 bellard
LIBOBJS+=fpu/softfloat.o
144 158142c2 bellard
else
145 158142c2 bellard
LIBOBJS+=fpu/softfloat-native.o
146 158142c2 bellard
endif
147 6f30fa85 ths
CPPFLAGS+=-I$(SRC_PATH)/fpu
148 e95c8d51 bellard
LIBOBJS+= op_helper.o helper.o
149 e95c8d51 bellard
150 b7bcbe95 bellard
ifeq ($(TARGET_BASE_ARCH), arm)
151 eaa728ee bellard
LIBOBJS+= neon_helper.o iwmmxt_helper.o
152 e6e5906b pbrook
endif
153 e6e5906b pbrook
154 cf6c1b16 j_mayer
ifeq ($(TARGET_BASE_ARCH), alpha)
155 eaa728ee bellard
LIBOBJS+= alpha_palcode.o
156 cf6c1b16 j_mayer
endif
157 cf6c1b16 j_mayer
158 e7daa605 ths
ifeq ($(TARGET_BASE_ARCH), cris)
159 e7daa605 ths
LIBOBJS+= cris-dis.o
160 e7daa605 ths
161 e7daa605 ths
ifndef CONFIG_USER_ONLY
162 e7daa605 ths
LIBOBJS+= mmu.o
163 e7daa605 ths
endif
164 e7daa605 ths
endif
165 e7daa605 ths
166 626df76a bellard
# NOTE: the disassembler code is only needed for debugging
167 5fafdf24 ths
LIBOBJS+=disas.o
168 626df76a bellard
ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
169 bc51c5c9 bellard
USE_I386_DIS=y
170 bc51c5c9 bellard
endif
171 0b0babc6 bellard
ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
172 bc51c5c9 bellard
USE_I386_DIS=y
173 bc51c5c9 bellard
endif
174 bc51c5c9 bellard
ifdef USE_I386_DIS
175 626df76a bellard
LIBOBJS+=i386-dis.o
176 626df76a bellard
endif
177 626df76a bellard
ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha)
178 626df76a bellard
LIBOBJS+=alpha-dis.o
179 626df76a bellard
endif
180 a2458627 bellard
ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc)
181 626df76a bellard
LIBOBJS+=ppc-dis.o
182 626df76a bellard
endif
183 fbe4f65b ths
ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips)
184 6af0bf9c bellard
LIBOBJS+=mips-dis.o
185 6af0bf9c bellard
endif
186 64b3ab24 bellard
ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc)
187 626df76a bellard
LIBOBJS+=sparc-dis.o
188 626df76a bellard
endif
189 626df76a bellard
ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
190 626df76a bellard
LIBOBJS+=arm-dis.o
191 626df76a bellard
endif
192 48024e4a bellard
ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k)
193 48024e4a bellard
LIBOBJS+=m68k-dis.o
194 48024e4a bellard
endif
195 fdf9b3e8 bellard
ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4)
196 fdf9b3e8 bellard
LIBOBJS+=sh4-dis.o
197 fdf9b3e8 bellard
endif
198 f54b3f92 aurel32
ifeq ($(findstring hppa, $(TARGET_BASE_ARCH) $(ARCH)),hppa)
199 f54b3f92 aurel32
LIBOBJS+=hppa-dis.o
200 f54b3f92 aurel32
endif
201 8f860bb8 ths
ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390)
202 8f860bb8 ths
LIBOBJS+=s390-dis.o
203 8f860bb8 ths
endif
204 626df76a bellard
205 40293e58 bellard
# libqemu
206 40293e58 bellard
207 40293e58 bellard
libqemu.a: $(LIBOBJS)
208 40293e58 bellard
209 86e840ee aurel32
translate.o: translate.c cpu.h
210 40293e58 bellard
211 86e840ee aurel32
translate-all.o: translate-all.c cpu.h
212 40293e58 bellard
213 86e840ee aurel32
tcg/tcg.o: cpu.h
214 40293e58 bellard
215 40293e58 bellard
# HELPER_CFLAGS is used for all the code compiled with static register
216 40293e58 bellard
# variables
217 807544e2 aliguori
op_helper.o: CFLAGS += $(HELPER_CFLAGS) $(I386_CFLAGS)
218 40293e58 bellard
219 807544e2 aliguori
cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
220 40293e58 bellard
221 40293e58 bellard
#########################################################
222 40293e58 bellard
# Linux user emulator target
223 40293e58 bellard
224 40293e58 bellard
ifdef CONFIG_LINUX_USER
225 40293e58 bellard
226 40293e58 bellard
ifndef TARGET_ABI_DIR
227 40293e58 bellard
  TARGET_ABI_DIR=$(TARGET_ARCH)
228 40293e58 bellard
endif
229 3ebdd119 aurel32
VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
230 40293e58 bellard
CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
231 40293e58 bellard
232 40293e58 bellard
ifdef CONFIG_STATIC
233 40293e58 bellard
LDFLAGS+=-static
234 40293e58 bellard
endif
235 40293e58 bellard
236 40293e58 bellard
ifeq ($(ARCH),i386)
237 40293e58 bellard
ifdef TARGET_GPROF
238 40293e58 bellard
USE_I386_LD=y
239 40293e58 bellard
endif
240 40293e58 bellard
ifdef CONFIG_STATIC
241 40293e58 bellard
USE_I386_LD=y
242 40293e58 bellard
endif
243 40293e58 bellard
ifdef USE_I386_LD
244 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
245 40293e58 bellard
else
246 40293e58 bellard
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
247 40293e58 bellard
# that the kernel ELF loader considers as an executable. I think this
248 40293e58 bellard
# is the simplest way to make it self virtualizable!
249 40293e58 bellard
LDFLAGS+=-Wl,-shared
250 40293e58 bellard
endif
251 40293e58 bellard
endif
252 40293e58 bellard
253 40293e58 bellard
ifeq ($(ARCH),x86_64)
254 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
255 40293e58 bellard
endif
256 40293e58 bellard
257 40293e58 bellard
ifeq ($(ARCH),ppc)
258 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
259 40293e58 bellard
endif
260 40293e58 bellard
261 810260a8 malc
ifeq ($(ARCH),ppc64)
262 810260a8 malc
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
263 810260a8 malc
endif
264 810260a8 malc
265 40293e58 bellard
ifeq ($(ARCH),s390)
266 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
267 40293e58 bellard
endif
268 40293e58 bellard
269 40293e58 bellard
ifeq ($(ARCH),sparc)
270 40293e58 bellard
# -static is used to avoid g1/g3 usage by the dynamic linker	
271 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
272 40293e58 bellard
endif
273 40293e58 bellard
274 40293e58 bellard
ifeq ($(ARCH),sparc64)
275 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
276 40293e58 bellard
endif
277 40293e58 bellard
278 40293e58 bellard
ifeq ($(ARCH),alpha)
279 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
280 40293e58 bellard
endif
281 40293e58 bellard
282 40293e58 bellard
ifeq ($(ARCH),ia64)
283 40293e58 bellard
LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
284 40293e58 bellard
endif
285 40293e58 bellard
286 40293e58 bellard
ifeq ($(ARCH),arm)
287 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
288 40293e58 bellard
endif
289 40293e58 bellard
290 40293e58 bellard
ifeq ($(ARCH),m68k)
291 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
292 40293e58 bellard
endif
293 40293e58 bellard
294 40293e58 bellard
ifeq ($(ARCH),mips)
295 40293e58 bellard
ifeq ($(WORDS_BIGENDIAN),yes)
296 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
297 40293e58 bellard
else
298 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
299 40293e58 bellard
endif
300 40293e58 bellard
endif
301 40293e58 bellard
302 40293e58 bellard
ifeq ($(ARCH),mips64)
303 40293e58 bellard
ifeq ($(WORDS_BIGENDIAN),yes)
304 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
305 40293e58 bellard
else
306 40293e58 bellard
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
307 40293e58 bellard
endif
308 40293e58 bellard
endif
309 40293e58 bellard
310 6d946cda aurel32
# profiling code
311 6d946cda aurel32
ifdef TARGET_GPROF
312 6d946cda aurel32
LDFLAGS+=-p
313 6d946cda aurel32
CFLAGS+=-p
314 6d946cda aurel32
endif
315 6d946cda aurel32
316 17e2377a pbrook
OBJS= main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
317 04a6dfeb aurel32
      elfload.o linuxload.o uaccess.o envlist.o
318 40293e58 bellard
LIBS+= $(AIOLIBS)
319 40293e58 bellard
ifdef TARGET_HAS_BFLT
320 40293e58 bellard
OBJS+= flatload.o
321 40293e58 bellard
endif
322 40293e58 bellard
ifdef TARGET_HAS_ELFLOAD32
323 40293e58 bellard
OBJS+= elfload32.o
324 40293e58 bellard
elfload32.o: elfload.c
325 40293e58 bellard
endif
326 40293e58 bellard
327 40293e58 bellard
ifeq ($(TARGET_ARCH), i386)
328 40293e58 bellard
OBJS+= vm86.o
329 40293e58 bellard
endif
330 40293e58 bellard
ifeq ($(TARGET_ARCH), arm)
331 40293e58 bellard
OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \
332 40293e58 bellard
nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \
333 40293e58 bellard
 nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o
334 40293e58 bellard
endif
335 40293e58 bellard
ifeq ($(TARGET_ARCH), m68k)
336 40293e58 bellard
OBJS+= m68k-sim.o m68k-semi.o
337 40293e58 bellard
endif
338 40293e58 bellard
339 1fddef4b bellard
ifdef CONFIG_GDBSTUB
340 56aebc89 pbrook
OBJS+=gdbstub.o gdbstub-xml.o
341 1fddef4b bellard
endif
342 626df76a bellard
343 40293e58 bellard
OBJS+= libqemu.a
344 40293e58 bellard
345 40293e58 bellard
# Note: this is a workaround. The real fix is to avoid compiling
346 40293e58 bellard
# cpu_signal_handler() in cpu-exec.c.
347 807544e2 aliguori
signal.o: CFLAGS += $(HELPER_CFLAGS)
348 626df76a bellard
349 cec7d0b6 pbrook
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
350 3aa892d7 aliguori
	$(LINK)
351 626df76a bellard
ifeq ($(ARCH),alpha)
352 626df76a bellard
# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
353 626df76a bellard
# the address space (31 bit so sign extending doesn't matter)
354 626df76a bellard
	echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc
355 626df76a bellard
endif
356 626df76a bellard
357 40293e58 bellard
endif #CONFIG_LINUX_USER
358 40293e58 bellard
359 40293e58 bellard
#########################################################
360 40293e58 bellard
# Darwin user emulator target
361 40293e58 bellard
362 40293e58 bellard
ifdef CONFIG_DARWIN_USER
363 40293e58 bellard
364 40293e58 bellard
VPATH+=:$(SRC_PATH)/darwin-user
365 40293e58 bellard
CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
366 40293e58 bellard
367 40293e58 bellard
# Leave some space for the regular program loading zone
368 40293e58 bellard
LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
369 40293e58 bellard
370 40293e58 bellard
LIBS+=-lmx
371 40293e58 bellard
372 17e2377a pbrook
OBJS= main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o
373 40293e58 bellard
374 40293e58 bellard
OBJS+= libqemu.a
375 40293e58 bellard
376 40293e58 bellard
ifdef CONFIG_GDBSTUB
377 56aebc89 pbrook
OBJS+=gdbstub.o gdbstub-xml.o
378 40293e58 bellard
endif
379 40293e58 bellard
380 40293e58 bellard
# Note: this is a workaround. The real fix is to avoid compiling
381 40293e58 bellard
# cpu_signal_handler() in cpu-exec.c.
382 807544e2 aliguori
signal.o: CFLAGS += $(HELPER_CFLAGS)
383 40293e58 bellard
384 40293e58 bellard
$(QEMU_PROG): $(OBJS)
385 3aa892d7 aliguori
	$(LINK)
386 40293e58 bellard
387 40293e58 bellard
endif #CONFIG_DARWIN_USER
388 40293e58 bellard
389 40293e58 bellard
#########################################################
390 84778508 blueswir1
# BSD user emulator target
391 84778508 blueswir1
392 84778508 blueswir1
ifdef CONFIG_BSD_USER
393 84778508 blueswir1
394 84778508 blueswir1
VPATH+=:$(SRC_PATH)/bsd-user
395 84778508 blueswir1
CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
396 84778508 blueswir1
397 84778508 blueswir1
ifdef CONFIG_STATIC
398 84778508 blueswir1
LDFLAGS+=-static
399 84778508 blueswir1
endif
400 84778508 blueswir1
401 84778508 blueswir1
ifeq ($(ARCH),i386)
402 84778508 blueswir1
ifdef TARGET_GPROF
403 84778508 blueswir1
USE_I386_LD=y
404 84778508 blueswir1
endif
405 84778508 blueswir1
ifdef CONFIG_STATIC
406 84778508 blueswir1
USE_I386_LD=y
407 84778508 blueswir1
endif
408 84778508 blueswir1
ifdef USE_I386_LD
409 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
410 84778508 blueswir1
else
411 84778508 blueswir1
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
412 84778508 blueswir1
# that the kernel ELF loader considers as an executable. I think this
413 84778508 blueswir1
# is the simplest way to make it self virtualizable!
414 84778508 blueswir1
LDFLAGS+=-Wl,-shared
415 84778508 blueswir1
endif
416 84778508 blueswir1
endif
417 84778508 blueswir1
418 84778508 blueswir1
ifeq ($(ARCH),x86_64)
419 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
420 84778508 blueswir1
endif
421 84778508 blueswir1
422 84778508 blueswir1
ifeq ($(ARCH),ppc)
423 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
424 84778508 blueswir1
endif
425 84778508 blueswir1
426 84778508 blueswir1
ifeq ($(ARCH),ppc64)
427 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
428 84778508 blueswir1
endif
429 84778508 blueswir1
430 84778508 blueswir1
ifeq ($(ARCH),s390)
431 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
432 84778508 blueswir1
endif
433 84778508 blueswir1
434 84778508 blueswir1
ifeq ($(ARCH),sparc)
435 84778508 blueswir1
# -static is used to avoid g1/g3 usage by the dynamic linker
436 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
437 84778508 blueswir1
endif
438 84778508 blueswir1
439 84778508 blueswir1
ifeq ($(ARCH),sparc64)
440 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
441 84778508 blueswir1
endif
442 84778508 blueswir1
443 84778508 blueswir1
ifeq ($(ARCH),alpha)
444 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
445 84778508 blueswir1
endif
446 84778508 blueswir1
447 84778508 blueswir1
ifeq ($(ARCH),ia64)
448 84778508 blueswir1
LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
449 84778508 blueswir1
endif
450 84778508 blueswir1
451 84778508 blueswir1
ifeq ($(ARCH),arm)
452 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
453 84778508 blueswir1
endif
454 84778508 blueswir1
455 84778508 blueswir1
ifeq ($(ARCH),m68k)
456 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
457 84778508 blueswir1
endif
458 84778508 blueswir1
459 84778508 blueswir1
ifeq ($(ARCH),mips)
460 84778508 blueswir1
ifeq ($(WORDS_BIGENDIAN),yes)
461 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
462 84778508 blueswir1
else
463 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
464 84778508 blueswir1
endif
465 84778508 blueswir1
endif
466 84778508 blueswir1
467 84778508 blueswir1
ifeq ($(ARCH),mips64)
468 84778508 blueswir1
ifeq ($(WORDS_BIGENDIAN),yes)
469 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
470 84778508 blueswir1
else
471 84778508 blueswir1
LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
472 84778508 blueswir1
endif
473 84778508 blueswir1
endif
474 84778508 blueswir1
475 84778508 blueswir1
OBJS= main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o
476 84778508 blueswir1
OBJS+= uaccess.o
477 84778508 blueswir1
478 84778508 blueswir1
OBJS+= libqemu.a
479 84778508 blueswir1
480 84778508 blueswir1
ifdef CONFIG_GDBSTUB
481 84778508 blueswir1
OBJS+=gdbstub.o
482 84778508 blueswir1
endif
483 84778508 blueswir1
484 84778508 blueswir1
# Note: this is a workaround. The real fix is to avoid compiling
485 84778508 blueswir1
# cpu_signal_handler() in cpu-exec.c.
486 807544e2 aliguori
signal.o: CFLAGS += $(HELPER_CFLAGS)
487 84778508 blueswir1
488 84778508 blueswir1
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
489 3aa892d7 aliguori
	$(LINK)
490 84778508 blueswir1
491 84778508 blueswir1
endif #CONFIG_BSD_USER
492 84778508 blueswir1
493 84778508 blueswir1
#########################################################
494 40293e58 bellard
# System emulator target
495 40293e58 bellard
ifndef CONFIG_USER_ONLY
496 40293e58 bellard
497 244ab90e aliguori
OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o dma-helpers.o
498 1fd31ad7 aliguori
# virtio has to be here due to weird dependency between PCI and virtio-net.
499 1fd31ad7 aliguori
# need to fix this properly
500 9ede2fde aliguori
OBJS+=virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
501 559b90fb aliguori
OBJS+=fw_cfg.o
502 7ba1e619 aliguori
ifdef CONFIG_KVM
503 7ba1e619 aliguori
OBJS+=kvm.o kvm-all.o
504 7ba1e619 aliguori
endif
505 223d4670 ths
ifdef CONFIG_WIN32
506 40293e58 bellard
OBJS+=block-raw-win32.o
507 223d4670 ths
else
508 3c529d93 aliguori
ifdef CONFIG_AIO
509 3c529d93 aliguori
OBJS+=posix-aio-compat.o
510 3c529d93 aliguori
endif
511 559b90fb aliguori
OBJS+=block-raw-posix.o
512 a3392f9b aliguori
endif
513 a3392f9b aliguori
514 40293e58 bellard
LIBS+=-lz
515 1d14ffa9 bellard
ifdef CONFIG_ALSA
516 1d14ffa9 bellard
LIBS += -lasound
517 1d14ffa9 bellard
endif
518 ca9cc28c balrog
ifdef CONFIG_ESD
519 ca9cc28c balrog
LIBS += -lesd
520 ca9cc28c balrog
endif
521 b8e59f18 malc
ifdef CONFIG_PA
522 b8e59f18 malc
LIBS += -lpulse-simple
523 b8e59f18 malc
endif
524 1d14ffa9 bellard
ifdef CONFIG_DSOUND
525 1d14ffa9 bellard
LIBS += -lole32 -ldxguid
526 85571bc7 bellard
endif
527 102a52e4 bellard
ifdef CONFIG_FMOD
528 102a52e4 bellard
LIBS += $(CONFIG_FMOD_LIB)
529 85571bc7 bellard
endif
530 2f6a1ab0 blueswir1
ifdef CONFIG_OSS
531 2f6a1ab0 blueswir1
LIBS += $(CONFIG_OSS_LIB)
532 2f6a1ab0 blueswir1
endif
533 4fb240a4 bellard
534 b0f3b8fa aliguori
SOUND_HW = sb16.o es1370.o ac97.o
535 1d14ffa9 bellard
ifdef CONFIG_ADLIB
536 1d14ffa9 bellard
SOUND_HW += fmopl.o adlib.o
537 c40e866f malc
adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
538 1d14ffa9 bellard
endif
539 423d65f4 balrog
ifdef CONFIG_GUS
540 423d65f4 balrog
SOUND_HW += gus.o gusemu_hal.o gusemu_mixer.o
541 423d65f4 balrog
endif
542 cc53d26d malc
ifdef CONFIG_CS4231A
543 cc53d26d malc
SOUND_HW += cs4231a.o
544 cc53d26d malc
endif
545 85571bc7 bellard
546 8d5d2d4c ths
ifdef CONFIG_VNC_TLS
547 8d5d2d4c ths
CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
548 8d5d2d4c ths
LIBS += $(CONFIG_VNC_TLS_LIBS)
549 8d5d2d4c ths
endif
550 8d5d2d4c ths
551 2f9606b3 aliguori
ifdef CONFIG_VNC_SASL
552 2f9606b3 aliguori
CPPFLAGS += $(CONFIG_VNC_SASL_CFLAGS)
553 2f9606b3 aliguori
LIBS += $(CONFIG_VNC_SASL_LIBS)
554 2f9606b3 aliguori
endif
555 2f9606b3 aliguori
556 fb599c9a balrog
ifdef CONFIG_BLUEZ
557 fb599c9a balrog
LIBS += $(CONFIG_BLUEZ_LIBS)
558 fb599c9a balrog
endif
559 fb599c9a balrog
560 2e5d83bb pbrook
# SCSI layer
561 8b17de88 blueswir1
OBJS+= lsi53c895a.o esp.o
562 2e5d83bb pbrook
563 a594cfbf bellard
# USB layer
564 40293e58 bellard
OBJS+= usb-ohci.o
565 a594cfbf bellard
566 663e8e51 ths
# EEPROM emulation
567 40293e58 bellard
OBJS += eeprom93xx.o
568 663e8e51 ths
569 a41b2ff2 pbrook
# PCI network cards
570 40293e58 bellard
OBJS += eepro100.o
571 40293e58 bellard
OBJS += ne2000.o
572 40293e58 bellard
OBJS += pcnet.o
573 40293e58 bellard
OBJS += rtl8139.o
574 7c23b892 balrog
OBJS += e1000.o
575 a41b2ff2 pbrook
576 aa71cf80 aurel32
# Serial mouse
577 aa71cf80 aurel32
OBJS += msmouse.o
578 aa71cf80 aurel32
579 0b0babc6 bellard
ifeq ($(TARGET_BASE_ARCH), i386)
580 a541f297 bellard
# Hardware support
581 40293e58 bellard
OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o
582 40293e58 bellard
OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
583 610626af aliguori
OBJS+= cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
584 16b29ae1 aliguori
OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
585 6f338c34 aliguori
OBJS += device-hotplug.o pci-hotplug.o
586 b00052e4 balrog
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
587 67b915a5 bellard
endif
588 a2458627 bellard
ifeq ($(TARGET_BASE_ARCH), ppc)
589 70ad3dec aurel32
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
590 3cbee15b j_mayer
# shared objects
591 40293e58 bellard
OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o
592 3cbee15b j_mayer
# PREP target
593 40293e58 bellard
OBJS+= pckbd.o ps2.o serial.o i8259.o i8254.o fdc.o m48t59.o mc146818rtc.o
594 40293e58 bellard
OBJS+= prep_pci.o ppc_prep.o
595 3cbee15b j_mayer
# Mac shared devices
596 7fa9ae1a blueswir1
OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o escc.o
597 3cbee15b j_mayer
# OldWorld PowerMac
598 40293e58 bellard
OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
599 3cbee15b j_mayer
# NewWorld PowerMac
600 b98a003c blueswir1
OBJS+= unin_pci.o ppc_newworld.o
601 3cbee15b j_mayer
# PowerPC 4xx boards
602 825bb581 aurel32
OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
603 2c9fade2 aurel32
OBJS+= ppc440.o ppc440_bamboo.o
604 74c62ba8 aurel32
# PowerPC E500 boards
605 1db09b84 aurel32
OBJS+= ppce500_pci.o ppce500_mpc8544ds.o
606 f652e6af aurel32
ifdef FDT_LIBS
607 f652e6af aurel32
OBJS+= device_tree.o
608 f652e6af aurel32
LIBS+= $(FDT_LIBS)
609 f652e6af aurel32
endif
610 d76d1650 aurel32
ifdef CONFIG_KVM
611 d76d1650 aurel32
OBJS+= kvm_ppc.o
612 d76d1650 aurel32
endif
613 a541f297 bellard
endif
614 fbe4f65b ths
ifeq ($(TARGET_BASE_ARCH), mips)
615 c171148c aurel32
OBJS+= mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
616 4ce7ff6e aurel32
OBJS+= mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o
617 4ce7ff6e aurel32
OBJS+= g364fb.o jazz_led.o
618 40293e58 bellard
OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
619 4ce7ff6e aurel32
OBJS+= piix_pci.o parallel.o cirrus_vga.o pcspk.o $(SOUND_HW)
620 40293e58 bellard
OBJS+= mipsnet.o
621 40293e58 bellard
OBJS+= pflash_cfi01.o
622 1f605a76 aurel32
OBJS+= vmware_vga.o
623 4ce7ff6e aurel32
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
624 6af0bf9c bellard
endif
625 e7daa605 ths
ifeq ($(TARGET_BASE_ARCH), cris)
626 10c144e2 edgar_igl
# Boards
627 10c144e2 edgar_igl
OBJS+= etraxfs.o axis_dev88.o
628 10c144e2 edgar_igl
629 10c144e2 edgar_igl
# IO blocks
630 48318011 edgar_igl
OBJS+= etraxfs_dma.o
631 e62b5b13 edgar_igl
OBJS+= etraxfs_pic.o
632 48318011 edgar_igl
OBJS+= etraxfs_eth.o
633 40293e58 bellard
OBJS+= etraxfs_timer.o
634 40293e58 bellard
OBJS+= etraxfs_ser.o
635 e62b5b13 edgar_igl
636 e62b5b13 edgar_igl
OBJS+= ptimer.o
637 10c144e2 edgar_igl
OBJS+= pflash_cfi02.o nand.o
638 e7daa605 ths
endif
639 64b3ab24 bellard
ifeq ($(TARGET_BASE_ARCH), sparc)
640 3475187d bellard
ifeq ($(TARGET_ARCH), sparc64)
641 40293e58 bellard
OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o
642 40293e58 bellard
OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o
643 40293e58 bellard
OBJS+= cirrus_vga.o parallel.o ptimer.o
644 3475187d bellard
else
645 40293e58 bellard
OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o
646 2aa2ab3a blueswir1
OBJS+= slavio_timer.o escc.o slavio_misc.o fdc.o sparc32_dma.o
647 40293e58 bellard
OBJS+= cs4231.o ptimer.o eccmemctl.o sbi.o sun4c_intctl.o
648 3475187d bellard
endif
649 e95c8d51 bellard
endif
650 b5ff1b31 bellard
ifeq ($(TARGET_BASE_ARCH), arm)
651 40293e58 bellard
OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o
652 40293e58 bellard
OBJS+= arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
653 40293e58 bellard
OBJS+= versatile_pci.o ptimer.o
654 40293e58 bellard
OBJS+= realview_gic.o realview.o arm_sysctl.o mpcore.o
655 40293e58 bellard
OBJS+= armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
656 40293e58 bellard
OBJS+= pl061.o
657 40293e58 bellard
OBJS+= arm-semi.o
658 40293e58 bellard
OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
659 40293e58 bellard
OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
660 40293e58 bellard
OBJS+= pflash_cfi01.o gumstix.o
661 88d2c950 balrog
OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o
662 b4e3104b balrog
OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o
663 afbb5194 balrog
OBJS+= omap2.o omap_dss.o soc_dma.o
664 997641a8 balrog
OBJS+= omap_sx1.o palm.o tsc210x.o
665 942ac052 balrog
OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
666 58a26b47 balrog
OBJS+= tsc2005.o bt-hci-csr.o
667 40293e58 bellard
OBJS+= mst_fpga.o mainstone.o
668 24859b68 balrog
OBJS+= musicpal.o pflash_cfi02.o
669 714fa308 pbrook
OBJS+= framebuffer.o
670 5a1237c4 balrog
CPPFLAGS += -DHAS_AUDIO
671 b5ff1b31 bellard
endif
672 fdf9b3e8 bellard
ifeq ($(TARGET_BASE_ARCH), sh4)
673 40293e58 bellard
OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
674 1e5459a3 balrog
OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
675 a4a771c0 balrog
OBJS+= ide.o
676 fdf9b3e8 bellard
endif
677 0633879f pbrook
ifeq ($(TARGET_BASE_ARCH), m68k)
678 40293e58 bellard
OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
679 40293e58 bellard
OBJS+= m68k-semi.o dummy_m68k.o
680 0633879f pbrook
endif
681 a541f297 bellard
ifdef CONFIG_GDBSTUB
682 56aebc89 pbrook
OBJS+=gdbstub.o gdbstub-xml.o
683 728c9fd5 bellard
endif
684 5b0753e0 bellard
ifdef CONFIG_COCOA
685 1d14ffa9 bellard
COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
686 1d14ffa9 bellard
ifdef CONFIG_COREAUDIO
687 1d14ffa9 bellard
COCOA_LIBS+=-framework CoreAudio
688 1d14ffa9 bellard
endif
689 5b0753e0 bellard
endif
690 7c1f25b4 bellard
ifdef CONFIG_SLIRP
691 6f30fa85 ths
CPPFLAGS+=-I$(SRC_PATH)/slirp
692 626df76a bellard
endif
693 626df76a bellard
694 40293e58 bellard
LIBS+=$(AIOLIBS)
695 c321f673 bellard
# specific flags are needed for non soft mmu emulator
696 c321f673 bellard
ifdef CONFIG_STATIC
697 40293e58 bellard
LDFLAGS+=-static
698 de5eaa64 bellard
endif
699 83fb7adf bellard
ifndef CONFIG_DARWIN
700 11d9f695 bellard
ifndef CONFIG_WIN32
701 ec530c81 bellard
ifndef CONFIG_SOLARIS
702 b29fe3ed malc
ifndef CONFIG_AIX
703 40293e58 bellard
LIBS+=-lutil
704 11d9f695 bellard
endif
705 b29fe3ed malc
endif
706 83fb7adf bellard
endif
707 ec530c81 bellard
endif
708 e3086fbf bellard
ifdef TARGET_GPROF
709 40293e58 bellard
vl.o: CFLAGS+=-p
710 40293e58 bellard
LDFLAGS+=-p
711 e3086fbf bellard
endif
712 c321f673 bellard
713 b8076a74 bellard
ifeq ($(ARCH),ia64)
714 40293e58 bellard
LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
715 74ccb34e bellard
endif
716 74ccb34e bellard
717 1d14ffa9 bellard
ifdef CONFIG_WIN32
718 1d14ffa9 bellard
SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
719 1d14ffa9 bellard
endif
720 1d14ffa9 bellard
721 40293e58 bellard
# profiling code
722 40293e58 bellard
ifdef TARGET_GPROF
723 40293e58 bellard
LDFLAGS+=-p
724 40293e58 bellard
main.o: CFLAGS+=-p
725 6e1b3e4d bellard
endif
726 6e1b3e4d bellard
727 5824d651 blueswir1
vl.o: qemu-options.h
728 5824d651 blueswir1
729 3aa892d7 aliguori
$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
730 3aa892d7 aliguori
731 40293e58 bellard
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
732 3aa892d7 aliguori
	$(LINK)
733 626df76a bellard
734 40293e58 bellard
endif # !CONFIG_USER_ONLY
735 00a67ba1 bellard
736 56aebc89 pbrook
gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh
737 56aebc89 pbrook
ifeq ($(TARGET_XML_FILES),)
738 1aef4c57 aurel32
	$(call quiet-command,rm -f $@ && echo > $@,"  GEN   $(TARGET_DIR)$@")
739 56aebc89 pbrook
else
740 1aef4c57 aurel32
	$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES),"  GEN   $(TARGET_DIR)$@")
741 56aebc89 pbrook
endif
742 56aebc89 pbrook
743 5824d651 blueswir1
qemu-options.h: $(SRC_PATH)/qemu-options.hx
744 0d00e563 aliguori
	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
745 5824d651 blueswir1
746 626df76a bellard
clean:
747 5824d651 blueswir1
	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o qemu-options.h
748 57fec1fe bellard
	rm -f *.d */*.d tcg/*.o
749 1e43adfc bellard
750 5fafdf24 ths
install: all
751 9b14bb04 bellard
ifneq ($(PROGS),)
752 6a882643 pbrook
	$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
753 9b14bb04 bellard
endif
754 626df76a bellard
755 2f96c28d j_mayer
# Include automatically generated dependency files
756 2f96c28d j_mayer
-include $(wildcard *.d */*.d)