1
1
# This file is included several times to build target-specific
2
2
# modules for the Android emulator. It will be called several times
3
- # (e.g. once for the arm target, and once for the x86 target).
3
+ # for arm, x86 and mips
4
4
#
5
5
6
6
ifndef EMULATOR_TARGET_ARCH
@@ -26,7 +26,7 @@ EMULATOR_TARGET_CFLAGS := \
26
26
-I$(LOCAL_PATH)/android/config/target-$(EMULATOR_TARGET_ARCH) \
27
27
-I$(LOCAL_PATH)/target-$(EMULATOR_TARGET_CPU) \
28
28
-I$(LOCAL_PATH)/fpu \
29
- -DNEED_CPU_H \
29
+ -DNEED_CPU_H
30
30
31
31
TCG_TARGET := $(HOST_ARCH)
32
32
ifeq ($(HOST_ARCH),x86)
@@ -96,7 +96,7 @@ HW_SOURCES += android_arm.c \
96
96
goldfish_switch.c \
97
97
goldfish_timer.c \
98
98
goldfish_trace.c \
99
- arm_boot.c \
99
+ arm_boot.c
100
100
101
101
# The following sources must be compiled with the final executables
102
102
# because they contain device_init() or machine_init() statements.
@@ -135,6 +135,31 @@ HW_OBJ_CFLAGS := $(EMULATOR_TARGET_CFLAGS)
135
135
136
136
endif
137
137
138
+ ifeq ($(EMULATOR_TARGET_ARCH),mips)
139
+ HW_SOURCES += \
140
+ android_mips.c \
141
+ mips_pic.c \
142
+ goldfish_interrupt.c \
143
+ goldfish_switch.c \
144
+ goldfish_timer.c \
145
+ goldfish_trace.c \
146
+ mips_timer.c \
147
+ mips_int.c
148
+
149
+ # The following sources must be compiled with the final executables
150
+ # because they contain device_init() or machine_init() statements.
151
+ HW_OBJ_SOURCES := hw/smc91c111.c
152
+ HW_OBJ_CFLAGS := $(EMULATOR_TARGET_CFLAGS)
153
+
154
+ common_LOCAL_SRC_FILES += mips-dis.c
155
+
156
+ # smc91c111.c requires <zlib.h>
157
+ LOCAL_CFLAGS += $(ZLIB_CFLAGS)
158
+ ifeq ($(ARCH_HAS_BIGENDIAN),true)
159
+ LOCAL_CFLAGS += -DTARGET_WORDS_BIGENDIAN
160
+ endif
161
+
162
+ endif
138
163
common_LOCAL_SRC_FILES += $(HW_SOURCES:%=hw/%)
139
164
140
165
common_LOCAL_SRC_FILES += \
@@ -143,7 +168,7 @@ common_LOCAL_SRC_FILES += \
143
168
translate-all.c \
144
169
trace.c \
145
170
varint.c \
146
- softmmu_outside_jit.c \
171
+ softmmu_outside_jit.c
147
172
148
173
##############################################################################
149
174
# CPU-specific emulation.
@@ -165,7 +190,7 @@ common_LOCAL_SRC_FILES += \
165
190
target-arm/machine.c \
166
191
hw/armv7m.c \
167
192
hw/armv7m_nvic.c \
168
- arm-semi.c \
193
+ arm-semi.c
169
194
170
195
common_LOCAL_SRC_FILES += fpu/softfloat.c
171
196
endif
@@ -192,6 +217,16 @@ endif
192
217
common_LOCAL_SRC_FILES += fpu/softfloat-native.c
193
218
endif
194
219
220
+ ifeq ($(EMULATOR_TARGET_ARCH), mips)
221
+ common_LOCAL_SRC_FILES += \
222
+ target-mips/op_helper.c \
223
+ target-mips/helper.c \
224
+ target-mips/translate.c \
225
+ target-mips/machine.c
226
+
227
+ common_LOCAL_SRC_FILES += fpu/softfloat.c
228
+ endif
229
+
195
230
# compile KVM only if target is x86 on x86 Linux
196
231
QEMU_KVM_TAG := $(QEMU_HOST_TAG)-$(EMULATOR_TARGET_ARCH)
197
232
QEMU_DO_KVM := $(if $(filter linux-x86-x86 linux-x86_64-x86,$(QEMU_KVM_TAG)),true,false)
@@ -220,7 +255,7 @@ MCHK_SOURCES := \
220
255
memcheck_proc_management.c \
221
256
memcheck_malloc_map.c \
222
257
memcheck_mmrange_map.c \
223
- memcheck_util.c \
258
+ memcheck_util.c
224
259
225
260
common_LOCAL_SRC_FILES += $(MCHK_SOURCES:%=memcheck/%)
226
261
@@ -272,7 +307,7 @@ LOCAL_CFLAGS += \
272
307
$(ELFF_CFLAGS) \
273
308
$(EMULATOR_LIBQEMU_CFLAGS) \
274
309
$(EMULATOR_TARGET_CFLAGS) \
275
- -DCONFIG_STANDALONE_CORE \
310
+ -DCONFIG_STANDALONE_CORE
276
311
277
312
ifneq ($(QEMU_OPENGLES_INCLUDE),)
278
313
LOCAL_CFLAGS += -I$(QEMU_OPENGLES_INCLUDE)
@@ -284,13 +319,12 @@ LOCAL_STATIC_LIBRARIES := \
284
319
emulator-libqemu \
285
320
emulator-target-$(EMULATOR_TARGET_CPU) \
286
321
emulator-libelff \
287
- emulator-common \
288
-
322
+ emulator-common
289
323
290
324
LOCAL_LDLIBS += \
291
325
$(EMULATOR_COMMON_LDLIBS) \
292
326
$(EMULATOR_LIBQEMU_LDLIBS) \
293
- $(ELFF_LDLIBS) \
327
+ $(ELFF_LDLIBS)
294
328
295
329
LOCAL_SRC_FILES := \
296
330
audio/audio.c \
@@ -312,7 +346,7 @@ LOCAL_SRC_FILES := \
312
346
android/protocol/user-events-impl.c \
313
347
android/protocol/ui-commands-proxy.c \
314
348
android/protocol/core-commands-impl.c \
315
- android/protocol/core-commands-qemu.c \
349
+ android/protocol/core-commands-qemu.c
316
350
317
351
$(call gen-hx-header,qemu-monitor.hx,qemu-monitor.h,monitor.c)
318
352
$(call gen-hx-header,qemu-options.hx,qemu-options.def,vl-android.c qemu-options.h)
@@ -360,13 +394,13 @@ common_LOCAL_STATIC_LIBRARIES := \
360
394
emulator-libqemu \
361
395
emulator-target-$(EMULATOR_TARGET_CPU) \
362
396
emulator-libelff \
363
- emulator-common \
397
+ emulator-common
364
398
365
399
common_LOCAL_LDLIBS += \
366
400
$(EMULATOR_COMMON_LDLIBS) \
367
401
$(EMULATOR_LIBQEMU_LDLIBS) \
368
402
$(EMULATOR_LIBUI_LDLIBS) \
369
- $(ELFF_LDLIBS) \
403
+ $(ELFF_LDLIBS)
370
404
371
405
common_LOCAL_CFLAGS += \
372
406
$(EMULATOR_TARGET_CFLAGS) \
0 commit comments