diff options
Diffstat (limited to 'Makefile.target')
-rw-r--r-- | Makefile.target | 92 |
1 files changed, 66 insertions, 26 deletions
diff --git a/Makefile.target b/Makefile.target index 916ab21..3e45c61 100644 --- a/Makefile.target +++ b/Makefile.target @@ -1,6 +1,6 @@ # This file is included several times to build target-specific # modules for the Android emulator. It will be called several times -# (e.g. once for the arm target, and once for the x86 target). +# for arm, x86 and mips # ifndef EMULATOR_TARGET_ARCH @@ -26,7 +26,7 @@ EMULATOR_TARGET_CFLAGS := \ -I$(LOCAL_PATH)/android/config/target-$(EMULATOR_TARGET_ARCH) \ -I$(LOCAL_PATH)/target-$(EMULATOR_TARGET_CPU) \ -I$(LOCAL_PATH)/fpu \ - -DNEED_CPU_H \ + -DNEED_CPU_H TCG_TARGET := $(HOST_ARCH) ifeq ($(HOST_ARCH),x86) @@ -96,7 +96,7 @@ HW_SOURCES += android_arm.c \ goldfish_switch.c \ goldfish_timer.c \ goldfish_trace.c \ - arm_boot.c \ + arm_boot.c # The following sources must be compiled with the final executables # because they contain device_init() or machine_init() statements. @@ -135,6 +135,31 @@ HW_OBJ_CFLAGS := $(EMULATOR_TARGET_CFLAGS) endif +ifeq ($(EMULATOR_TARGET_ARCH),mips) +HW_SOURCES += \ + android_mips.c \ + mips_pic.c \ + goldfish_interrupt.c \ + goldfish_switch.c \ + goldfish_timer.c \ + goldfish_trace.c \ + mips_timer.c \ + mips_int.c + +# The following sources must be compiled with the final executables +# because they contain device_init() or machine_init() statements. +HW_OBJ_SOURCES := hw/smc91c111.c +HW_OBJ_CFLAGS := $(EMULATOR_TARGET_CFLAGS) + +common_LOCAL_SRC_FILES += mips-dis.c + +# smc91c111.c requires <zlib.h> +LOCAL_CFLAGS += $(ZLIB_CFLAGS) +ifeq ($(ARCH_HAS_BIGENDIAN),true) + LOCAL_CFLAGS += -DTARGET_WORDS_BIGENDIAN +endif + +endif common_LOCAL_SRC_FILES += $(HW_SOURCES:%=hw/%) common_LOCAL_SRC_FILES += \ @@ -143,7 +168,7 @@ common_LOCAL_SRC_FILES += \ translate-all.c \ trace.c \ varint.c \ - softmmu_outside_jit.c \ + softmmu_outside_jit.c ############################################################################## # CPU-specific emulation. @@ -165,7 +190,7 @@ common_LOCAL_SRC_FILES += \ target-arm/machine.c \ hw/armv7m.c \ hw/armv7m_nvic.c \ - arm-semi.c \ + arm-semi.c common_LOCAL_SRC_FILES += fpu/softfloat.c endif @@ -192,6 +217,16 @@ endif common_LOCAL_SRC_FILES += fpu/softfloat-native.c endif +ifeq ($(EMULATOR_TARGET_ARCH), mips) +common_LOCAL_SRC_FILES += \ + target-mips/op_helper.c \ + target-mips/helper.c \ + target-mips/translate.c \ + target-mips/machine.c + +common_LOCAL_SRC_FILES += fpu/softfloat.c +endif + # compile KVM only if target is x86 on x86 Linux QEMU_KVM_TAG := $(QEMU_HOST_TAG)-$(EMULATOR_TARGET_ARCH) QEMU_DO_KVM := $(if $(filter linux-x86-x86 linux-x86_64-x86,$(QEMU_KVM_TAG)),true,false) @@ -220,7 +255,7 @@ MCHK_SOURCES := \ memcheck_proc_management.c \ memcheck_malloc_map.c \ memcheck_mmrange_map.c \ - memcheck_util.c \ + memcheck_util.c common_LOCAL_SRC_FILES += $(MCHK_SOURCES:%=memcheck/%) @@ -246,8 +281,7 @@ $(call gen-hx-header,qemu-options.hx,qemu-options.def,os-posix.c os-win32.c) $(call end-emulator-library) ## another for 64-bit, see note in file Makefile.common emulator64-common -ifeq ($(HOST_OS),linux) - ifeq ($(HOST_BITS),64) +ifneq ($(filter linux darwin,$(HOST_OS)),) ifneq ($(BUILD_STANDALONE_EMULATOR),true) $(call start-emulator-library, emulator64-target-$(EMULATOR_TARGET_CPU)) LOCAL_CFLAGS += $(common_LOCAL_CFLAGS) -m64 @@ -256,8 +290,7 @@ ifeq ($(HOST_OS),linux) $(call gen-hx-header,qemu-options.hx,qemu-options.def,os-posix.c os-win32.c) $(call end-emulator-library) endif # BUILD_STANDALONE_EMULATOR == nil - endif # HOST_BITS == 64 -endif # HOST_OS == linux +endif # HOST_OS == linux || darwin @@ -274,22 +307,25 @@ LOCAL_CFLAGS += \ $(ELFF_CFLAGS) \ $(EMULATOR_LIBQEMU_CFLAGS) \ $(EMULATOR_TARGET_CFLAGS) \ - -DCONFIG_STANDALONE_CORE \ + -DCONFIG_STANDALONE_CORE -LOCAL_CFLAGS += -Wno-missing-field-initializers +ifneq ($(QEMU_OPENGLES_INCLUDE),) + LOCAL_CFLAGS += -I$(QEMU_OPENGLES_INCLUDE) +endif +LOCAL_CFLAGS += -Wno-missing-field-initializers LOCAL_STATIC_LIBRARIES := \ emulator-libqemu \ emulator-target-$(EMULATOR_TARGET_CPU) \ + emulator-libjpeg \ emulator-libelff \ - emulator-common \ - + emulator-common LOCAL_LDLIBS += \ $(EMULATOR_COMMON_LDLIBS) \ $(EMULATOR_LIBQEMU_LDLIBS) \ - $(ELFF_LDLIBS) \ + $(ELFF_LDLIBS) LOCAL_SRC_FILES := \ audio/audio.c \ @@ -311,7 +347,7 @@ LOCAL_SRC_FILES := \ android/protocol/user-events-impl.c \ android/protocol/ui-commands-proxy.c \ android/protocol/core-commands-impl.c \ - android/protocol/core-commands-qemu.c \ + android/protocol/core-commands-qemu.c $(call gen-hx-header,qemu-monitor.hx,qemu-monitor.h,monitor.c) $(call gen-hx-header,qemu-options.hx,qemu-options.def,vl-android.c qemu-options.h) @@ -325,7 +361,7 @@ endif # Generate a completely static executable if needed. # Note that this means no sound and graphics on Linux. # -ifeq ($(CONFIG_STATIC_EXECUTABLE),true) +ifneq ($(strip $(CONFIG_STATIC_EXECUTABLE)$(BUILD_HOST_static)),) LOCAL_SRC_FILES += dynlink-static.c LOCAL_LDLIBS += -static endif @@ -338,8 +374,6 @@ LOCAL_CFLAGS += $(HW_OBJ_CFLAGS) LOCAL_SRC_FILES += $(BLOCK_SOURCES) LOCAL_CFLAGS += $(BLOCK_CFLAGS) -LOCAL_MODULE_TAGS := debug - $(call end-emulator-program) ############################################################################## @@ -359,13 +393,13 @@ common_LOCAL_STATIC_LIBRARIES := \ emulator-libqemu \ emulator-target-$(EMULATOR_TARGET_CPU) \ emulator-libelff \ - emulator-common \ + emulator-common common_LOCAL_LDLIBS += \ $(EMULATOR_COMMON_LDLIBS) \ $(EMULATOR_LIBQEMU_LDLIBS) \ $(EMULATOR_LIBUI_LDLIBS) \ - $(ELFF_LDLIBS) \ + $(ELFF_LDLIBS) common_LOCAL_CFLAGS += \ $(EMULATOR_TARGET_CFLAGS) \ @@ -411,7 +445,7 @@ common_LOCAL_SRC_FILES += $(SDLMAIN_SOURCES) # Generate a completely static executable if needed. # Note that this means no sound and graphics on Linux. # -ifeq ($(CONFIG_STATIC_EXECUTABLE),true) +ifneq ($(strip $(CONFIG_STATIC_EXECUTABLE)$(BUILD_HOST_static)),) common_LOCAL_SRC_FILES += dynlink-static.c common_LOCAL_LDLIBS += -static endif @@ -422,6 +456,7 @@ LOCAL_STATIC_LIBRARIES += \ emulator-libui \ emulator-libqemu \ emulator-target-$(EMULATOR_TARGET_CPU) \ + emulator-libjpeg \ emulator-libelff \ emulator-common \ $(SDL_STATIC_LIBRARIES) @@ -431,18 +466,23 @@ LOCAL_SRC_FILES += $(common_LOCAL_SRC_FILES) $(call gen-hx-header,qemu-monitor.hx,qemu-monitor.h,monitor.c) $(call gen-hx-header,qemu-options.hx,qemu-options.def,vl-android.c qemu-options.h) $(call gen-hw-config-defs) + +ifeq ($(HOST_OS),windows) +$(eval $(call insert-windows-icon)) +endif + $(call end-emulator-program) ## another for 64-bit, see note in file Makefile.common emulator64-common -ifeq ($(HOST_OS),linux) - ifeq ($(HOST_BITS),64) +ifneq ($(filter linux darwin,$(HOST_OS)),) ifneq ($(BUILD_STANDALONE_EMULATOR),true) $(call start-emulator-program, emulator64-$(EMULATOR_TARGET_ARCH)) LOCAL_STATIC_LIBRARIES += \ emulator64-libui \ emulator64-libqemu \ emulator64-target-$(EMULATOR_TARGET_CPU) \ + emulator64-libjpeg \ emulator64-libelff \ emulator64-common \ $(SDL_STATIC_LIBRARIES_64) @@ -454,5 +494,5 @@ ifeq ($(HOST_OS),linux) $(call gen-hw-config-defs) $(call end-emulator-program) endif # BUILD_STANDALONE_EMULATOR == nil - endif # HOST_BITS == 64 -endif # HOST_OS == linux +endif # HOST_OS == linux || darwin + |