root / Makefile.target @ 977d5710
History | View | Annotate | Download (9.2 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 | 0b0babc6 | bellard | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
8 | 85571bc7 | bellard | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio |
9 | 3035f7ff | bellard | DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) |
10 | 3035f7ff | bellard | ifdef CONFIG_USER_ONLY |
11 | 3035f7ff | bellard | VPATH+=:$(SRC_PATH)/linux-user |
12 | 3035f7ff | bellard | DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) |
13 | 3035f7ff | bellard | endif |
14 | ab2572d7 | bellard | CFLAGS=-Wall -O2 -g -fno-strict-aliasing |
15 | 0b0babc6 | bellard | #CFLAGS+=-Werror |
16 | 626df76a | bellard | LDFLAGS=-g |
17 | 626df76a | bellard | LIBS= |
18 | 626df76a | bellard | HELPER_CFLAGS=$(CFLAGS) |
19 | 67b915a5 | bellard | DYNGEN=../dyngen$(EXESUF) |
20 | 1e43adfc | bellard | # user emulator name |
21 | 808c4954 | bellard | ifeq ($(TARGET_ARCH),arm) |
22 | 808c4954 | bellard | ifeq ($(TARGET_WORDS_BIGENDIAN),yes) |
23 | 808c4954 | bellard | QEMU_USER=qemu-armeb |
24 | 808c4954 | bellard | else |
25 | 808c4954 | bellard | QEMU_USER=qemu-arm |
26 | 808c4954 | bellard | endif |
27 | 808c4954 | bellard | else |
28 | 808c4954 | bellard | QEMU_USER=qemu-$(TARGET_ARCH) |
29 | 808c4954 | bellard | endif |
30 | 1e43adfc | bellard | # system emulator name |
31 | 1e43adfc | bellard | ifdef CONFIG_SOFTMMU |
32 | a541f297 | bellard | ifeq ($(TARGET_ARCH), i386) |
33 | 67b915a5 | bellard | QEMU_SYSTEM=qemu$(EXESUF) |
34 | 0db63474 | bellard | else |
35 | a541f297 | bellard | QEMU_SYSTEM=qemu-system-$(TARGET_ARCH)$(EXESUF) |
36 | a541f297 | bellard | endif |
37 | a541f297 | bellard | else |
38 | 0db63474 | bellard | QEMU_SYSTEM=qemu-fast |
39 | 1e43adfc | bellard | endif |
40 | 1e43adfc | bellard | |
41 | 16e9b7de | bellard | ifdef CONFIG_USER_ONLY |
42 | 1e43adfc | bellard | PROGS=$(QEMU_USER) |
43 | 16e9b7de | bellard | else |
44 | 16e9b7de | bellard | ifeq ($(TARGET_ARCH), i386) |
45 | c321f673 | bellard | |
46 | c321f673 | bellard | ifeq ($(ARCH), i386) |
47 | c321f673 | bellard | PROGS+=$(QEMU_SYSTEM) |
48 | de5eaa64 | bellard | ifndef CONFIG_SOFTMMU |
49 | de5eaa64 | bellard | CONFIG_STATIC=y |
50 | de5eaa64 | bellard | endif |
51 | 38ca2abc | bellard | else |
52 | 38ca2abc | bellard | # the system emulator using soft mmu is portable |
53 | c321f673 | bellard | ifdef CONFIG_SOFTMMU |
54 | 16e9b7de | bellard | PROGS+=$(QEMU_SYSTEM) |
55 | 16e9b7de | bellard | endif |
56 | 38ca2abc | bellard | endif # ARCH != i386 |
57 | c321f673 | bellard | |
58 | 38ca2abc | bellard | endif # TARGET_ARCH = i386 |
59 | 728c9fd5 | bellard | |
60 | 0b0babc6 | bellard | ifeq ($(TARGET_ARCH), x86_64) |
61 | 0b0babc6 | bellard | ifdef CONFIG_SOFTMMU |
62 | 0b0babc6 | bellard | PROGS+=$(QEMU_SYSTEM) |
63 | 0b0babc6 | bellard | endif |
64 | 0b0babc6 | bellard | endif # TARGET_ARCH = x86_64 |
65 | 0b0babc6 | bellard | |
66 | 728c9fd5 | bellard | ifeq ($(TARGET_ARCH), ppc) |
67 | 728c9fd5 | bellard | |
68 | 728c9fd5 | bellard | ifeq ($(ARCH), ppc) |
69 | 728c9fd5 | bellard | PROGS+=$(QEMU_SYSTEM) |
70 | 728c9fd5 | bellard | endif |
71 | 728c9fd5 | bellard | |
72 | 728c9fd5 | bellard | ifeq ($(ARCH), i386) |
73 | 728c9fd5 | bellard | ifdef CONFIG_SOFTMMU |
74 | 728c9fd5 | bellard | PROGS+=$(QEMU_SYSTEM) |
75 | 626df76a | bellard | endif |
76 | 728c9fd5 | bellard | endif # ARCH = i386 |
77 | 728c9fd5 | bellard | |
78 | 0b0babc6 | bellard | ifeq ($(ARCH), x86_64) |
79 | 75dfaa1e | bellard | ifdef CONFIG_SOFTMMU |
80 | 75dfaa1e | bellard | PROGS+=$(QEMU_SYSTEM) |
81 | 75dfaa1e | bellard | endif |
82 | 0b0babc6 | bellard | endif # ARCH = x86_64 |
83 | 75dfaa1e | bellard | |
84 | 728c9fd5 | bellard | endif # TARGET_ARCH = ppc |
85 | e95c8d51 | bellard | |
86 | e95c8d51 | bellard | ifeq ($(TARGET_ARCH), sparc) |
87 | e95c8d51 | bellard | |
88 | e95c8d51 | bellard | ifeq ($(ARCH), ppc) |
89 | e95c8d51 | bellard | PROGS+=$(QEMU_SYSTEM) |
90 | e95c8d51 | bellard | endif |
91 | e95c8d51 | bellard | |
92 | e95c8d51 | bellard | ifeq ($(ARCH), i386) |
93 | e95c8d51 | bellard | ifdef CONFIG_SOFTMMU |
94 | e95c8d51 | bellard | PROGS+=$(QEMU_SYSTEM) |
95 | e95c8d51 | bellard | endif |
96 | e95c8d51 | bellard | endif # ARCH = i386 |
97 | e95c8d51 | bellard | |
98 | 0b0babc6 | bellard | ifeq ($(ARCH), x86_64) |
99 | e95c8d51 | bellard | ifdef CONFIG_SOFTMMU |
100 | e95c8d51 | bellard | PROGS+=$(QEMU_SYSTEM) |
101 | e95c8d51 | bellard | endif |
102 | 0b0babc6 | bellard | endif # ARCH = x86_64 |
103 | e95c8d51 | bellard | |
104 | e95c8d51 | bellard | endif # TARGET_ARCH = sparc |
105 | 728c9fd5 | bellard | endif # !CONFIG_USER_ONLY |
106 | 626df76a | bellard | |
107 | 626df76a | bellard | ifdef CONFIG_STATIC |
108 | 626df76a | bellard | LDFLAGS+=-static |
109 | 626df76a | bellard | endif |
110 | 626df76a | bellard | |
111 | 626df76a | bellard | ifeq ($(ARCH),i386) |
112 | 626df76a | bellard | CFLAGS+=-fomit-frame-pointer |
113 | 626df76a | bellard | OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 |
114 | 626df76a | bellard | ifeq ($(HAVE_GCC3_OPTIONS),yes) |
115 | 3611a29c | bellard | OP_CFLAGS+= -falign-functions=0 -fno-gcse |
116 | 626df76a | bellard | else |
117 | 626df76a | bellard | OP_CFLAGS+= -malign-functions=0 |
118 | 626df76a | bellard | endif |
119 | 3a4739d6 | bellard | |
120 | 626df76a | bellard | ifdef TARGET_GPROF |
121 | 3a4739d6 | bellard | USE_I386_LD=y |
122 | 3a4739d6 | bellard | endif |
123 | 3a4739d6 | bellard | ifdef CONFIG_STATIC |
124 | 3a4739d6 | bellard | USE_I386_LD=y |
125 | 3a4739d6 | bellard | endif |
126 | 3a4739d6 | bellard | ifdef USE_I386_LD |
127 | 626df76a | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld |
128 | 626df76a | bellard | else |
129 | 626df76a | bellard | # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object |
130 | 626df76a | bellard | # that the kernel ELF loader considers as an executable. I think this |
131 | 626df76a | bellard | # is the simplest way to make it self virtualizable! |
132 | 626df76a | bellard | LDFLAGS+=-Wl,-shared |
133 | 626df76a | bellard | endif |
134 | 626df76a | bellard | endif |
135 | 626df76a | bellard | |
136 | 0b0babc6 | bellard | ifeq ($(ARCH),x86_64) |
137 | bc51c5c9 | bellard | OP_CFLAGS=$(CFLAGS) -falign-functions=0 |
138 | 0b0babc6 | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/x86_64.ld |
139 | bc51c5c9 | bellard | endif |
140 | bc51c5c9 | bellard | |
141 | 626df76a | bellard | ifeq ($(ARCH),ppc) |
142 | 83fb7adf | bellard | CFLAGS+= -D__powerpc__ |
143 | 626df76a | bellard | OP_CFLAGS=$(CFLAGS) |
144 | 626df76a | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/ppc.ld |
145 | 626df76a | bellard | endif |
146 | 626df76a | bellard | |
147 | 626df76a | bellard | ifeq ($(ARCH),s390) |
148 | 626df76a | bellard | OP_CFLAGS=$(CFLAGS) |
149 | 626df76a | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld |
150 | 626df76a | bellard | endif |
151 | 626df76a | bellard | |
152 | 626df76a | bellard | ifeq ($(ARCH),sparc) |
153 | 626df76a | bellard | CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 |
154 | 626df76a | bellard | LDFLAGS+=-m32 |
155 | 626df76a | bellard | OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 |
156 | 626df76a | bellard | HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat |
157 | 626df76a | bellard | # -static is used to avoid g1/g3 usage by the dynamic linker |
158 | 626df76a | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc.ld -static |
159 | 626df76a | bellard | endif |
160 | 626df76a | bellard | |
161 | 626df76a | bellard | ifeq ($(ARCH),sparc64) |
162 | 626df76a | bellard | CFLAGS+=-m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 |
163 | 626df76a | bellard | LDFLAGS+=-m64 |
164 | 626df76a | bellard | OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 |
165 | 626df76a | bellard | endif |
166 | 626df76a | bellard | |
167 | 626df76a | bellard | ifeq ($(ARCH),alpha) |
168 | 626df76a | bellard | # -msmall-data is not used because we want two-instruction relocations |
169 | 626df76a | bellard | # for the constant constructions |
170 | 626df76a | bellard | OP_CFLAGS=-Wall -O2 -g |
171 | 626df76a | bellard | # Ensure there's only a single GP |
172 | 626df76a | bellard | CFLAGS += -msmall-data |
173 | 626df76a | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/alpha.ld |
174 | 626df76a | bellard | endif |
175 | 626df76a | bellard | |
176 | 626df76a | bellard | ifeq ($(ARCH),ia64) |
177 | 626df76a | bellard | OP_CFLAGS=$(CFLAGS) |
178 | 626df76a | bellard | endif |
179 | 626df76a | bellard | |
180 | 626df76a | bellard | ifeq ($(ARCH),arm) |
181 | 626df76a | bellard | OP_CFLAGS=$(CFLAGS) -mno-sched-prolog |
182 | 626df76a | bellard | LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld |
183 | 626df76a | bellard | endif |
184 | 626df76a | bellard | |
185 | 38e584a0 | bellard | ifeq ($(ARCH),m68k) |
186 | 38e584a0 | bellard | OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer |
187 | 38e584a0 | bellard | LDFLAGS+=-Wl,-T,m68k.ld |
188 | 38e584a0 | bellard | endif |
189 | 38e584a0 | bellard | |
190 | 626df76a | bellard | ifeq ($(HAVE_GCC3_OPTIONS),yes) |
191 | 626df76a | bellard | # very important to generate a return at the end of every operation |
192 | 626df76a | bellard | OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls |
193 | 626df76a | bellard | endif |
194 | 626df76a | bellard | |
195 | 83fb7adf | bellard | ifeq ($(CONFIG_DARWIN),yes) |
196 | 83fb7adf | bellard | OP_CFLAGS+= -mdynamic-no-pic |
197 | e80cfcfc | bellard | LIBS+=-lmx |
198 | 83fb7adf | bellard | endif |
199 | 83fb7adf | bellard | |
200 | 626df76a | bellard | ######################################################### |
201 | 626df76a | bellard | |
202 | d5249393 | bellard | DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
203 | 626df76a | bellard | LIBS+=-lm |
204 | b932caba | bellard | ifndef CONFIG_USER_ONLY |
205 | b932caba | bellard | LIBS+=-lz |
206 | b932caba | bellard | endif |
207 | 67b915a5 | bellard | ifdef CONFIG_WIN32 |
208 | 3db38e87 | bellard | LIBS+=-lwinmm -lws2_32 -liphlpapi |
209 | 67b915a5 | bellard | endif |
210 | 626df76a | bellard | |
211 | 626df76a | bellard | # profiling code |
212 | 626df76a | bellard | ifdef TARGET_GPROF |
213 | 626df76a | bellard | LDFLAGS+=-p |
214 | 626df76a | bellard | main.o: CFLAGS+=-p |
215 | 626df76a | bellard | endif |
216 | 626df76a | bellard | |
217 | 3035f7ff | bellard | OBJS= elfload.o main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o |
218 | 626df76a | bellard | ifeq ($(TARGET_ARCH), i386) |
219 | 626df76a | bellard | OBJS+= vm86.o |
220 | 626df76a | bellard | endif |
221 | f72b519c | bellard | ifeq ($(TARGET_ARCH), arm) |
222 | f72b519c | bellard | OBJS+=nwfpe/softfloat.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ |
223 | f72b519c | bellard | nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ |
224 | f72b519c | bellard | nwfpe/double_cpdo.o nwfpe/extended_cpdo.o |
225 | f72b519c | bellard | endif |
226 | 626df76a | bellard | SRCS:= $(OBJS:.o=.c) |
227 | 626df76a | bellard | OBJS+= libqemu.a |
228 | 626df76a | bellard | |
229 | 626df76a | bellard | # cpu emulator library |
230 | 858693c6 | bellard | LIBOBJS=exec.o translate-all.o cpu-exec.o\ |
231 | 1e43adfc | bellard | translate.o op.o |
232 | 626df76a | bellard | |
233 | 626df76a | bellard | ifeq ($(TARGET_ARCH), i386) |
234 | 1e43adfc | bellard | LIBOBJS+=helper.o helper2.o |
235 | f72b519c | bellard | ifeq ($(ARCH), i386) |
236 | f72b519c | bellard | LIBOBJS+=translate-copy.o |
237 | f72b519c | bellard | endif |
238 | 626df76a | bellard | endif |
239 | 626df76a | bellard | |
240 | 0b0babc6 | bellard | ifeq ($(TARGET_ARCH), x86_64) |
241 | 0b0babc6 | bellard | LIBOBJS+=helper.o helper2.o |
242 | 0b0babc6 | bellard | endif |
243 | 0b0babc6 | bellard | |
244 | 67867308 | bellard | ifeq ($(TARGET_ARCH), ppc) |
245 | 728c9fd5 | bellard | LIBOBJS+= op_helper.o helper.o |
246 | 67867308 | bellard | endif |
247 | 67867308 | bellard | |
248 | e95c8d51 | bellard | ifeq ($(TARGET_ARCH), sparc) |
249 | e95c8d51 | bellard | LIBOBJS+= op_helper.o helper.o |
250 | e95c8d51 | bellard | endif |
251 | e95c8d51 | bellard | |
252 | 626df76a | bellard | # NOTE: the disassembler code is only needed for debugging |
253 | 626df76a | bellard | LIBOBJS+=disas.o |
254 | 626df76a | bellard | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
255 | bc51c5c9 | bellard | USE_I386_DIS=y |
256 | bc51c5c9 | bellard | endif |
257 | 0b0babc6 | bellard | ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) |
258 | bc51c5c9 | bellard | USE_I386_DIS=y |
259 | bc51c5c9 | bellard | endif |
260 | bc51c5c9 | bellard | ifdef USE_I386_DIS |
261 | 626df76a | bellard | LIBOBJS+=i386-dis.o |
262 | 626df76a | bellard | endif |
263 | 626df76a | bellard | ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) |
264 | 626df76a | bellard | LIBOBJS+=alpha-dis.o |
265 | 626df76a | bellard | endif |
266 | 626df76a | bellard | ifeq ($(findstring ppc, $(TARGET_ARCH) $(ARCH)),ppc) |
267 | 626df76a | bellard | LIBOBJS+=ppc-dis.o |
268 | 626df76a | bellard | endif |
269 | 626df76a | bellard | ifeq ($(findstring sparc, $(TARGET_ARCH) $(ARCH)),sparc) |
270 | 626df76a | bellard | LIBOBJS+=sparc-dis.o |
271 | 626df76a | bellard | endif |
272 | 626df76a | bellard | ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) |
273 | 626df76a | bellard | LIBOBJS+=arm-dis.o |
274 | 626df76a | bellard | endif |
275 | 626df76a | bellard | |
276 | 626df76a | bellard | ifeq ($(ARCH),ia64) |
277 | 626df76a | bellard | OBJS += ia64-syscall.o |
278 | 626df76a | bellard | endif |
279 | 626df76a | bellard | |
280 | 1e43adfc | bellard | all: $(PROGS) |
281 | 626df76a | bellard | |
282 | 1e43adfc | bellard | $(QEMU_USER): $(OBJS) |
283 | 626df76a | bellard | $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
284 | 626df76a | bellard | ifeq ($(ARCH),alpha) |
285 | 626df76a | bellard | # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of |
286 | 626df76a | bellard | # the address space (31 bit so sign extending doesn't matter) |
287 | 626df76a | bellard | echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc |
288 | 626df76a | bellard | endif |
289 | 626df76a | bellard | |
290 | 626df76a | bellard | # must use static linking to avoid leaving stuff in virtual address space |
291 | b932caba | bellard | VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o |
292 | 585d0ed9 | bellard | VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o |
293 | a541f297 | bellard | |
294 | 85571bc7 | bellard | SOUND_HW = sb16.o |
295 | 7372f88d | bellard | AUDIODRV = audio.o noaudio.o wavaudio.o |
296 | fb065187 | bellard | ifdef CONFIG_SDL |
297 | fb065187 | bellard | AUDIODRV += sdlaudio.o |
298 | fb065187 | bellard | endif |
299 | fb065187 | bellard | ifdef CONFIG_OSS |
300 | fb065187 | bellard | AUDIODRV += ossaudio.o |
301 | fb065187 | bellard | endif |
302 | fb065187 | bellard | |
303 | fb065187 | bellard | pc.o: DEFINES := -DUSE_SB16 $(DEFINES) |
304 | 85571bc7 | bellard | |
305 | fb065187 | bellard | ifdef CONFIG_ADLIB |
306 | 85571bc7 | bellard | SOUND_HW += fmopl.o adlib.o |
307 | 85571bc7 | bellard | endif |
308 | 85571bc7 | bellard | |
309 | 102a52e4 | bellard | ifdef CONFIG_FMOD |
310 | 85571bc7 | bellard | AUDIODRV += fmodaudio.o |
311 | 102a52e4 | bellard | audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES) |
312 | 102a52e4 | bellard | LIBS += $(CONFIG_FMOD_LIB) |
313 | 85571bc7 | bellard | endif |
314 | 85571bc7 | bellard | |
315 | 0b0babc6 | bellard | ifeq ($(TARGET_BASE_ARCH), i386) |
316 | a541f297 | bellard | # Hardware support |
317 | 85571bc7 | bellard | VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
318 | 85571bc7 | bellard | VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o |
319 | 0b0babc6 | bellard | VL_OBJS+= cirrus_vga.o mixeng.o apic.o |
320 | 67b915a5 | bellard | endif |
321 | 728c9fd5 | bellard | ifeq ($(TARGET_ARCH), ppc) |
322 | 85571bc7 | bellard | VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
323 | 64201201 | bellard | VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o |
324 | 85571bc7 | bellard | VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o mixeng.o |
325 | a541f297 | bellard | endif |
326 | e95c8d51 | bellard | ifeq ($(TARGET_ARCH), sparc) |
327 | e80cfcfc | bellard | VL_OBJS+= sun4m.o tcx.o lance.o iommu.o m48t08.o magic-load.o slavio_intctl.o slavio_timer.o slavio_serial.o fdc.o |
328 | e95c8d51 | bellard | endif |
329 | a541f297 | bellard | ifdef CONFIG_GDBSTUB |
330 | a541f297 | bellard | VL_OBJS+=gdbstub.o |
331 | 728c9fd5 | bellard | endif |
332 | 626df76a | bellard | ifdef CONFIG_SDL |
333 | 626df76a | bellard | VL_OBJS+=sdl.o |
334 | de5eaa64 | bellard | endif |
335 | 7c1f25b4 | bellard | ifdef CONFIG_SLIRP |
336 | 7c1f25b4 | bellard | DEFINES+=-I$(SRC_PATH)/slirp |
337 | 7c1f25b4 | bellard | SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \ |
338 | 7c1f25b4 | bellard | slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \ |
339 | c7f74643 | bellard | tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o |
340 | 7c1f25b4 | bellard | VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) |
341 | 626df76a | bellard | endif |
342 | 626df76a | bellard | |
343 | c321f673 | bellard | VL_LDFLAGS= |
344 | c321f673 | bellard | # specific flags are needed for non soft mmu emulator |
345 | c321f673 | bellard | ifdef CONFIG_STATIC |
346 | c321f673 | bellard | VL_LDFLAGS+=-static |
347 | c321f673 | bellard | endif |
348 | de5eaa64 | bellard | ifndef CONFIG_SOFTMMU |
349 | de5eaa64 | bellard | VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld |
350 | de5eaa64 | bellard | endif |
351 | 83fb7adf | bellard | ifndef CONFIG_DARWIN |
352 | 11d9f695 | bellard | ifndef CONFIG_WIN32 |
353 | 11d9f695 | bellard | VL_LIBS=-lutil |
354 | 11d9f695 | bellard | endif |
355 | 83fb7adf | bellard | endif |
356 | c321f673 | bellard | |
357 | 1e43adfc | bellard | $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a |
358 | 11d9f695 | bellard | $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(VL_LIBS) |
359 | 626df76a | bellard | |
360 | 3d11d0eb | bellard | sdl.o: sdl.c keymaps.c sdl_keysym.h |
361 | 626df76a | bellard | $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $< |
362 | 626df76a | bellard | |
363 | 9f059eca | bellard | sdlaudio.o: sdlaudio.c |
364 | 9f059eca | bellard | $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $< |
365 | 9f059eca | bellard | |
366 | 626df76a | bellard | depend: $(SRCS) |
367 | 16e9b7de | bellard | $(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend |
368 | 626df76a | bellard | |
369 | 626df76a | bellard | # libqemu |
370 | 626df76a | bellard | |
371 | 626df76a | bellard | libqemu.a: $(LIBOBJS) |
372 | 626df76a | bellard | rm -f $@ |
373 | 626df76a | bellard | $(AR) rcs $@ $(LIBOBJS) |
374 | 626df76a | bellard | |
375 | 1e43adfc | bellard | translate.o: translate.c gen-op.h opc.h cpu.h |
376 | 626df76a | bellard | |
377 | 1e43adfc | bellard | translate-all.o: translate-all.c op.h opc.h cpu.h |
378 | 626df76a | bellard | |
379 | 1e43adfc | bellard | op.h: op.o $(DYNGEN) |
380 | 626df76a | bellard | $(DYNGEN) -o $@ $< |
381 | 626df76a | bellard | |
382 | 1e43adfc | bellard | opc.h: op.o $(DYNGEN) |
383 | 626df76a | bellard | $(DYNGEN) -c -o $@ $< |
384 | 626df76a | bellard | |
385 | 1e43adfc | bellard | gen-op.h: op.o $(DYNGEN) |
386 | 626df76a | bellard | $(DYNGEN) -g -o $@ $< |
387 | 626df76a | bellard | |
388 | 1e43adfc | bellard | op.o: op.c |
389 | 626df76a | bellard | $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $< |
390 | 626df76a | bellard | |
391 | 1e43adfc | bellard | helper.o: helper.c |
392 | 626df76a | bellard | $(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $< |
393 | 626df76a | bellard | |
394 | 0b0babc6 | bellard | ifeq ($(TARGET_BASE_ARCH), i386) |
395 | 664e0f19 | bellard | op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h |
396 | 1e43adfc | bellard | endif |
397 | 1e43adfc | bellard | |
398 | 1e43adfc | bellard | ifeq ($(TARGET_ARCH), arm) |
399 | 1e43adfc | bellard | op.o: op.c op_template.h |
400 | 1e43adfc | bellard | endif |
401 | 626df76a | bellard | |
402 | 1e43adfc | bellard | ifeq ($(TARGET_ARCH), sparc) |
403 | e95c8d51 | bellard | op.o: op.c op_template.h op_mem.h |
404 | 1e43adfc | bellard | endif |
405 | 626df76a | bellard | |
406 | 728c9fd5 | bellard | ifeq ($(TARGET_ARCH), ppc) |
407 | 728c9fd5 | bellard | op.o: op.c op_template.h op_mem.h |
408 | 728c9fd5 | bellard | op_helper.o: op_helper_mem.h |
409 | 728c9fd5 | bellard | endif |
410 | 728c9fd5 | bellard | |
411 | 85571bc7 | bellard | mixeng.o: mixeng.c mixeng.h mixeng_template.h |
412 | 85571bc7 | bellard | |
413 | 626df76a | bellard | %.o: %.c |
414 | 626df76a | bellard | $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< |
415 | 626df76a | bellard | |
416 | f72b519c | bellard | %.o: %.S |
417 | f72b519c | bellard | $(CC) $(DEFINES) -c -o $@ $< |
418 | f72b519c | bellard | |
419 | 626df76a | bellard | clean: |
420 | 7c1f25b4 | bellard | rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o |
421 | 1e43adfc | bellard | |
422 | 1e43adfc | bellard | install: all |
423 | 9b14bb04 | bellard | ifneq ($(PROGS),) |
424 | 11d9f695 | bellard | install -m 755 -s $(PROGS) "$(bindir)" |
425 | 9b14bb04 | bellard | endif |
426 | 626df76a | bellard | |
427 | 626df76a | bellard | ifneq ($(wildcard .depend),) |
428 | 626df76a | bellard | include .depend |
429 | 626df76a | bellard | endif |