diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2010-06-10 11:01:14 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2010-06-10 11:01:14 -0700 |
commit | 34b3574329c59095b4c4d443e33095c5e8e60fc5 (patch) | |
tree | 60377db998fdda8ac6e424fb7f64c26bb4a1b7e1 | |
parent | 111d6f8ed6dea6e651ab450e1ea11310ff0b2857 (diff) | |
parent | a05284df475307e9a73e6d44ca077aa72371ef34 (diff) | |
download | external_qemu-34b3574329c59095b4c4d443e33095c5e8e60fc5.zip external_qemu-34b3574329c59095b4c4d443e33095c5e8e60fc5.tar.gz external_qemu-34b3574329c59095b4c4d443e33095c5e8e60fc5.tar.bz2 |
Merge "Separate emulator build into three parts: core lib, UI lib, and the executable."
-rw-r--r-- | Makefile.android | 147 |
1 files changed, 105 insertions, 42 deletions
diff --git a/Makefile.android b/Makefile.android index 2e51d5f..7cd692b 100644 --- a/Makefile.android +++ b/Makefile.android @@ -455,6 +455,106 @@ ifeq ($(BUILD_QEMU_AUDIO_LIB),true) endif # !QEMU_AUDIO_LIB ############################################################################## +# Build emulator core library. +# This library contains "pure" emulation code separated from the intricacies +# of the UI. +# +include $(CLEAR_VARS) + +LOCAL_NO_DEFAULT_COMPILER_FLAGS := true +LOCAL_CC := $(MY_CC) +LOCAL_LDLIBS := $(MY_LDLIBS) +LOCAL_MODULE := emulator-core + +# don't remove the -fno-strict-aliasing, or you'll break things +# (e.g. slirp-android/network support) +# +LOCAL_CFLAGS := -fno-PIC -Wno-sign-compare \ + -fno-strict-aliasing -g -W -Wall -Wno-unused-parameter + +LOCAL_CFLAGS := $(MY_CFLAGS) $(LOCAL_CFLAGS) + +# Common includes for the emulator +LOCAL_CFLAGS += -I$(LOCAL_PATH)/ \ + -I$(LOCAL_PATH)/target-arm \ + -I$(LOCAL_PATH)/fpu \ + $(TCG_CFLAGS) \ + $(HW_CFLAGS) \ + +# include slirp-android code, i.e. the user-level networking stuff +# +SLIRP_SOURCES := bootp.c cksum.c debug.c if.c ip_icmp.c ip_input.c ip_output.c \ + mbuf.c misc.c sbuf.c slirp.c socket.c tcp_input.c tcp_output.c \ + tcp_subr.c tcp_timer.c tftp.c udp.c + +LOCAL_SRC_FILES += $(SLIRP_SOURCES:%=slirp-android/%) +LOCAL_CFLAGS += -I$(LOCAL_PATH)/slirp-android + +# socket proxy support +# +PROXY_SOURCES := \ + proxy_common.c \ + proxy_http.c \ + proxy_http_connector.c \ + proxy_http_rewriter.c \ + +LOCAL_SRC_FILES += $(PROXY_SOURCES:%=proxy/%) +LOCAL_CFLAGS += -I$(LOCAL_PATH)/proxy + +# include telephony stuff +# +TELEPHONY_SOURCES := android_modem.c modem_driver.c gsm.c sim_card.c sysdeps_qemu.c sms.c remote_call.c +LOCAL_SRC_FILES += $(TELEPHONY_SOURCES:%=telephony/%) +LOCAL_CFLAGS += -I$(LOCAL_PATH)/telephony + +include $(BUILD_HOST_STATIC_LIBRARY) + +############################################################################## +# Build emulator UI library. +# This library contains some emulator related UI components. +# +include $(CLEAR_VARS) + +LOCAL_NO_DEFAULT_COMPILER_FLAGS := true +LOCAL_CC := $(MY_CC) +LOCAL_LDLIBS := $(MY_LDLIBS) +LOCAL_MODULE := emulator-ui + +LOCAL_CFLAGS := $(MY_CFLAGS) $(LOCAL_CFLAGS) + +# Common includes for the emulator +LOCAL_CFLAGS += -I$(LOCAL_PATH)/ \ + -I$(LOCAL_PATH)/target-arm \ + -I$(LOCAL_PATH)/fpu \ + $(TCG_CFLAGS) \ + $(HW_CFLAGS) \ + +# include the SDL sources +# +LOCAL_SRC_FILES += $(SDL_SOURCES) $(SDLMAIN_SOURCES) +LOCAL_CFLAGS += $(SDL_CFLAGS) -I$(LOCAL_PATH)/$(SDL_DIR)/include + +# the skin support sources +# +SKIN_SOURCES := rect.c \ + region.c \ + image.c \ + trackball.c \ + keyboard.c \ + keyset.c \ + file.c \ + window.c \ + scaler.c \ + composer.c \ + surface.c \ + +LOCAL_SRC_FILES += $(SKIN_SOURCES:%=android/skin/%) +LOCAL_CFLAGS += -I$(LOCAL_PATH)/skin + +include $(BUILD_HOST_STATIC_LIBRARY) + + +############################################################################## # now build the emulator itself # include $(CLEAR_VARS) @@ -464,6 +564,7 @@ LOCAL_CC := $(MY_CC) LOCAL_MODULE := emulator LOCAL_STATIC_LIBRARIES := emulator-memcheck emulator-hw emulator-arm emulator-tcg LOCAL_STATIC_LIBRARIES += emulator-elff +LOCAL_STATIC_LIBRARIES += emulator-core emulator-ui LOCAL_LDLIBS := $(MY_LDLIBS) # don't remove the -fno-strict-aliasing, or you'll break things @@ -500,7 +601,7 @@ LOCAL_CFLAGS += $(LIBPNG_CFLAGS) -I$(LOCAL_PATH)/$(LIBPNG_DIR) # include the SDL sources # -LOCAL_SRC_FILES += $(SDL_SOURCES) $(SDLMAIN_SOURCES) +#LOCAL_SRC_FILES += $(SDL_SOURCES) $(SDLMAIN_SOURCES) LOCAL_CFLAGS += $(SDL_CFLAGS) -I$(LOCAL_PATH)/$(SDL_DIR)/include # @@ -513,10 +614,9 @@ LOCAL_CFLAGS += -I$(LOCAL_PATH)/ \ # Needed by the upstream code LOCAL_CFLAGS += -DNEED_CPU_H -# include telephony stuff -# -TELEPHONY_SOURCES := android_modem.c modem_driver.c gsm.c sim_card.c sysdeps_qemu.c sms.c remote_call.c -LOCAL_SRC_FILES += $(TELEPHONY_SOURCES:%=telephony/%) +# Include emulator-core definitions +LOCAL_CFLAGS += -I$(LOCAL_PATH)/slirp-android +LOCAL_CFLAGS += -I$(LOCAL_PATH)/proxy LOCAL_CFLAGS += -I$(LOCAL_PATH)/telephony # include sound support source files. we first try to see if we have a prebuilt audio @@ -535,48 +635,11 @@ endif # !QEMU_AUDIO_LIB LOCAL_CFLAGS += $(AUDIO_CFLAGS) LOCAL_LDLIBS += $(AUDIO_LDLIBS) -# include slirp-android code, i.e. the user-level networking stuff -# -SLIRP_SOURCES := bootp.c cksum.c debug.c if.c ip_icmp.c ip_input.c ip_output.c \ - mbuf.c misc.c sbuf.c slirp.c socket.c tcp_input.c tcp_output.c \ - tcp_subr.c tcp_timer.c tftp.c udp.c - -LOCAL_SRC_FILES += $(SLIRP_SOURCES:%=slirp-android/%) -LOCAL_CFLAGS += -I$(LOCAL_PATH)/slirp-android - -# socket proxy support -# -PROXY_SOURCES := \ - proxy_common.c \ - proxy_http.c \ - proxy_http_connector.c \ - proxy_http_rewriter.c \ - -LOCAL_SRC_FILES += $(PROXY_SOURCES:%=proxy/%) -LOCAL_CFLAGS += -I$(LOCAL_PATH)/proxy - # the linux-user sources, I doubt we really need these # #LINUX_SOURCES := main.c elfload.c mmap.c signal.c path.c syscall.c #LOCAL_SRC_FILES += $(LINUX_SOURCES:%=linux-user/%) -# the skin support sources -# -SKIN_SOURCES := rect.c \ - region.c \ - image.c \ - trackball.c \ - keyboard.c \ - keyset.c \ - file.c \ - window.c \ - scaler.c \ - composer.c \ - surface.c \ - -LOCAL_SRC_FILES += $(SKIN_SOURCES:%=android/skin/%) -#LOCAL_CFLAGS += -I$(LOCAL_PATH)/skin - ifeq ($(HOST_ARCH),x86) # enable MMX code for our skin scaler LOCAL_CFLAGS += -DUSE_MMX=1 -mmmx |