diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:06:04 -0800 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:06:04 -0800 |
commit | 99bbbfb6563690c84256779f91a51c8084de6a30 (patch) | |
tree | e1d70bd0e9a025921c4aff48a47295b2c0e38df1 /Makefile.android | |
parent | 63a13ab8230560f5b9610bb0fa6a47a54ebf8e9c (diff) | |
parent | 9ef4f0907e2cf82108d85b96887e06e92d70204c (diff) | |
download | external_qemu-99bbbfb6563690c84256779f91a51c8084de6a30.zip external_qemu-99bbbfb6563690c84256779f91a51c8084de6a30.tar.gz external_qemu-99bbbfb6563690c84256779f91a51c8084de6a30.tar.bz2 |
merge from eclair
Diffstat (limited to 'Makefile.android')
-rw-r--r-- | Makefile.android | 155 |
1 files changed, 137 insertions, 18 deletions
diff --git a/Makefile.android b/Makefile.android index 734991e..982c0cd 100644 --- a/Makefile.android +++ b/Makefile.android @@ -9,10 +9,12 @@ CONFIG_DIRS := \ CONFIG_INCLUDES := $(CONFIG_DIRS:%=-I%) -MY_CFLAGS := $(CONFIG_INCLUDES) -O2 -g \ - -fno-PIC \ - -falign-functions=0 \ - -fomit-frame-pointer \ +MY_OPTIM := -O2 -g -fno-PIC -falign-functions=0 -fomit-frame-pointer +ifeq ($(BUILD_DEBUG_EMULATOR),true) + MY_OPTIM := -O0 -g +endif + +MY_CFLAGS := $(CONFIG_INCLUDES) $(MY_OPTIM) # Overwrite configuration for debug builds. # @@ -121,7 +123,6 @@ LOCAL_CFLAGS += $(TCG_CFLAGS) \ LOCAL_SRC_FILES := \ tcg/tcg.c \ - tcg/tcg-dyngen.c \ tcg/tcg-runtime.c \ include $(BUILD_HOST_STATIC_LIBRARY) @@ -144,6 +145,11 @@ LOCAL_CFLAGS += $(ZLIB_CFLAGS) -I$(LOCAL_PATH)/$(ZLIB_DIR) HW_SOURCES := \ android_arm.c \ arm_pic.c \ + bt.c \ + bt-hci.c \ + bt-hid.c \ + bt-l2cap.c \ + bt-sdp.c \ cdrom.c \ dma.c \ irq.c \ @@ -160,14 +166,18 @@ HW_SOURCES := \ goldfish_timer.c \ goldfish_trace.c \ goldfish_tty.c \ + msmouse.c \ pci.c \ + qdev.c \ scsi-disk.c \ smc91c111.c \ + sysbus.c \ usb-hid.c \ usb-hub.c \ usb-msd.c \ usb-ohci.c \ usb.c \ + watchdog.c \ LOCAL_SRC_FILES += $(HW_SOURCES:%=hw/%) @@ -243,6 +253,7 @@ AUDIO_LDLIBS := ifeq ($(HOST_OS),darwin) CONFIG_COREAUDIO ?= yes + AUDIO_CFLAGS += -DHOST_BSD=1 endif ifeq ($(HOST_OS),windows) @@ -344,9 +355,9 @@ LOCAL_STATIC_LIBRARIES := emulator-hw emulator-arm emulator-tcg LOCAL_LDLIBS := $(MY_LDLIBS) # don't remove the -fno-strict-aliasing, or you'll break things -# (e.g. slirp2/network support) +# (e.g. slirp-android/network support) # -LOCAL_CFLAGS := -fno-PIC -fomit-frame-pointer -Wno-sign-compare \ +LOCAL_CFLAGS := -fno-PIC -Wno-sign-compare \ -fno-strict-aliasing -g -W -Wall -Wno-unused-parameter LOCAL_CFLAGS := $(MY_CFLAGS) $(LOCAL_CFLAGS) @@ -370,6 +381,9 @@ LOCAL_CFLAGS += -I$(LOCAL_PATH)/ \ $(TCG_CFLAGS) \ $(HW_CFLAGS) \ +# 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 @@ -392,14 +406,14 @@ endif # !QEMU_AUDIO_LIB LOCAL_CFLAGS += $(AUDIO_CFLAGS) LOCAL_LDLIBS += $(AUDIO_LDLIBS) -# include slirp2 code, i.e. the user-level networking stuff +# 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:%=slirp2/%) -LOCAL_CFLAGS += -I$(LOCAL_PATH)/slirp2 +LOCAL_SRC_FILES += $(SLIRP_SOURCES:%=slirp-android/%) +LOCAL_CFLAGS += -I$(LOCAL_PATH)/slirp-android # socket proxy support # @@ -441,16 +455,37 @@ endif # include other sources # -VL_SOURCES := vl.c osdep.c cutils.c \ +VL_SOURCES := vl-android.c osdep.c cutils.c \ block.c readline.c monitor.c console.c loader.c sockets.c \ - block-qcow.c aes.c d3des.c block-cloop.c block-dmg.c block-vvfat.c \ - block-qcow2.c block-cow.c \ + aes.c d3des.c \ + block/qcow.c \ + block/qcow2.c \ + block/qcow2-refcount.c \ + block/qcow2-snapshot.c \ + block/qcow2-cluster.c \ + block/cloop.c \ + block/dmg.c \ + block/vvfat.c \ + buffered_file.c \ cbuffer.c \ - gdbstub.c usb-linux.c \ - vnc.c disas.c arm-dis.c \ + gdbstub.c \ + vnc-android.c disas.c arm-dis.c \ shaper.c charpipe.c loadpng.c \ framebuffer.c \ tcpdump.c \ + qemu-char-android.c \ + qemu-malloc.c \ + qemu-option.c \ + savevm.c \ + net-android.c \ + acl.c \ + aio-android.c \ + dma-helpers.c \ + qemu-sockets-android.c \ + keymaps.c \ + bt-host.c \ + bt-vhci.c \ + module.c \ android/boot-properties.c \ android/charmap.c \ android/cmdline-option.c \ @@ -464,6 +499,7 @@ VL_SOURCES := vl.c osdep.c cutils.c \ android/hw-lcd.c \ android/hw-qemud.c \ android/hw-sensors.c \ + android/keycode.c \ android/main.c \ android/resource.c \ android/user-config.c \ @@ -486,13 +522,23 @@ VL_SOURCES += hw/arm_boot.c \ hw/android_arm.c \ ifeq ($(HOST_OS),windows) - VL_SOURCES += block-raw-win32.c + VL_SOURCES += block/raw-win32.c \ + migration-dummy-android.c \ + iolooper-select.c else - VL_SOURCES += block-raw-posix.c + VL_SOURCES += block/raw-posix.c \ + migration.c \ + migration-exec.c \ + migration-tcp-android.c \ + iolooper-select.c endif ifeq ($(HOST_OS),linux) + VL_SOURCES += usb-linux.c \ + qemu-thread.c LOCAL_LDLIBS += -lX11 +else + VL_SOURCES += usb-dummy-android.c endif ifeq ($(HOST_ARCH),x86) @@ -506,7 +552,7 @@ ifeq ($(HOST_ARCH),ppc) endif ifeq ($(HOST_OS),windows) - #VL_SOURCES += tap-win32.c + VL_SOURCES += tap-win32.c LOCAL_LDLIBS += -mno-cygwin -mwindows -mconsole endif @@ -546,6 +592,79 @@ $(ANDROID_ICON_PATH)/$(ANDROID_ICON_OBJ): $(ANDROID_ICON_PATH)/android_icon.rc LOCAL_PREBUILT_OBJ_FILES += images/$(ANDROID_ICON_OBJ) endif +# qemu-options.h is generated from qemu-options.hx with the "hxtool" shell script +# +intermediates := $(call intermediates-dir-for,EXECUTABLES,$(LOCAL_MODULE),true) + +QEMU_OPTIONS_H := $(intermediates)/qemu-options.h +$(QEMU_OPTIONS_H): PRIVATE_PATH := $(LOCAL_PATH) +$(QEMU_OPTIONS_H): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PATH)/hxtool -h < $< > $@ +$(QEMU_OPTIONS_H): $(LOCAL_PATH)/qemu-options.hx $(LOCAL_PATH)/hxtool + $(transform-generated-source) + +$(intermediates)/vl-android.o: $(QEMU_OPTIONS_H) + +LOCAL_GENERATED_SOURCES += $(QEMU_OPTIONS_H) + +# qemu-monitor.h is generated from qemu-monitor.hx with the "hxtool" shell script +# +intermediates := $(call intermediates-dir-for,EXECUTABLES,$(LOCAL_MODULE),true) + +QEMU_MONITOR_H := $(intermediates)/qemu-monitor.h +$(QEMU_MONITOR_H): PRIVATE_PATH := $(LOCAL_PATH) +$(QEMU_MONITOR_H): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PATH)/hxtool -h < $< > $@ +$(QEMU_MONITOR_H): $(LOCAL_PATH)/qemu-monitor.hx $(LOCAL_PATH)/hxtool + $(transform-generated-source) + +$(intermediates)/vl-android.o: $(QEMU_MONITOR_H) + +LOCAL_GENERATED_SOURCES += $(QEMU_MONITOR_H) + + +# gdbstub-xml.c contains C-compilable arrays corresponding to the content +# of $(LOCAL_PATH)/gdb-xml/, and is generated with the 'feature_to_c.sh' script. +# +ifeq ($(QEMU_TARGET_XML_SOURCES),) + QEMU_TARGET_XML_SOURCES := arm-core arm-neon arm-vfp arm-vfp3 + QEMU_TARGET_XML_SOURCES := $(QEMU_TARGET_XML_SOURCES:%=$(LOCAL_PATH)/gdb-xml/%.xml) +endif + +QEMU_GDBSTUB_XML_C := $(intermediates)/gdbstub-xml.c +$(QEMU_GDBSTUB_XML_C): PRIVATE_PATH := $(LOCAL_PATH) +$(QEMU_GDBSTUB_XML_C): PRIVATE_SOURCES := $(TARGET_XML_SOURCES) +$(QEMU_GDBSTUB_XML_C): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PATH)/feature_to_c.sh $@ $(QEMU_TARGET_XML_SOURCES) +$(QEMU_GDBSTUB_XML_C): $(QEMU_TARGET_XML_SOURCES) $(LOCAL_PATH)/feature_to_c.sh + $(hide) rm -f $@ + $(transform-generated-source) + +$(intermediates)/vl-android.o: $(QEMU_GDBSTUB_XML_C) + +LOCAL_GENERATED_SOURCES += $(QEMU_GDBSTUB_XML_C) + +# hw-config-defs.h is generated from android/avd/hardware-properties.ini +# +QEMU_HARDWARE_PROPERTIES_INI := $(LOCAL_PATH)/android/avd/hardware-properties.ini +QEMU_HW_CONFIG_DEFS_H := $(LOCAL_PATH)/android/avd/hw-config-defs.h +$(QEMU_HW_CONFIG_DEFS_H): PRIVATE_PATH := $(LOCAL_PATH) +$(QEMU_HW_CONFIG_DEFS_H): PRIVATE_SOURCES := $(QEMU_HARDWARE_PROPERTIES_INI) +$(QEMU_HW_CONFIG_DEFS_H): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PATH)/android/tools/gen-hw-config.py $(QEMU_HARDWARE_PROPERTIES_INI) $@ +$(QEMU_HW_CONFIG_DEFS_H): $(QEMU_HARDWARE_PROPERTIES_INI) $(LOCAL_PATH)/android/tools/gen-hw-config.py + $(hide) rm -f $@ + $(transform-generated-source) + +$(LOCAL_PATH)/android/avd/hw-config.h: $(QEMU_HW_CONFIG_DEFS_H) + +LOCAL_GENERATED_SOURCES += $(QEMU_HW_CONFIG_DEFS_H) + +# this is already done by the Android build system, but is done for the +# benefit of the stand-alone one. +# +ifeq ($(BUILD_STANDALONE_EMULATOR),true) + LOCAL_CFLAGS += -I$(intermediates) +endif + + + # other flags LOCAL_CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE LOCAL_LDLIBS += -lm -lpthread |