aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.android
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2012-05-04 15:04:27 -0700
committerRaphael Moll <ralf@android.com>2012-05-04 15:24:01 -0700
commitcdbea233d20daa19ce1d43da32e8154a7a2aca33 (patch)
tree831c9edba45480a76db7d579c2dd1e5e7fb392c5 /Makefile.android
parentb868827a61162e0345537b293b92a96e3784d516 (diff)
downloadexternal_qemu-cdbea233d20daa19ce1d43da32e8154a7a2aca33.zip
external_qemu-cdbea233d20daa19ce1d43da32e8154a7a2aca33.tar.gz
external_qemu-cdbea233d20daa19ce1d43da32e8154a7a2aca33.tar.bz2
Win SDK: Fix missing emulator icon
History: It had been inadvertedly removed by the makefile reorg done in aff94b88c4ec057f20950d5e7a88b90cc4d97dce. SDK Bug: 21709 Change-Id: Icd147a1edb363e1ccbee2c3cade4ed34beceeeff
Diffstat (limited to 'Makefile.android')
-rw-r--r--Makefile.android29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile.android b/Makefile.android
index f5c008b..797bb71 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -219,6 +219,31 @@ endif
include $(LOCAL_PATH)/Makefile.common
+ifeq ($(HOST_OS),windows)
+ # on Windows, link the icon file as well into the executable
+ # unfortunately, our build system doesn't help us much, so we need
+ # to use some weird pathnames to make this work...
+
+ # Locate windres executable
+ WINDRES := windres
+ ifneq ($(USE_MINGW),)
+ # When building the Windows emulator under Linux, use the MinGW one
+ WINDRES := i586-mingw32msvc-windres
+ endif
+
+ # Usage: $(eval $(call insert-windows-icon))
+ define insert-windows-icon
+ LOCAL_PREBUILT_OBJ_FILES += images/emulator_icon.o
+ endef
+
+# This seems to be the only way to add an object file that was not generated from
+# a C/C++/Java source file to our build system. and very unfortunately,
+# $(TOPDIR)/$(LOCALPATH) will always be prepended to this value, which forces
+# us to put the object file in the source directory.
+$(LOCAL_PATH)/images/emulator_icon.o: $(LOCAL_PATH)/images/android_icon.rc
+ $(WINDRES) $< -I $(LOCAL_PATH)/images -o $@
+endif
+
# We want to build all variants of the emulator binaries. This makes
# it easier to catch target-specific regressions during emulator development.
EMULATOR_TARGET_ARCH := arm
@@ -238,6 +263,10 @@ $(call start-emulator-program, emulator)
LOCAL_SRC_FILES := android/main-emulator.c
LOCAL_STATIC_LIBRARIES := emulator-common
+ifeq ($(HOST_OS),windows)
+$(eval $(call insert-windows-icon))
+endif
+
$(call end-emulator-program)
##############################################################################