aboutsummaryrefslogtreecommitdiffstats
path: root/emulator
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2014-03-11 22:40:01 +0100
committerDavid 'Digit' Turner <digit@google.com>2014-03-11 22:47:32 +0100
commit68fbb34a4539d55ea788d6ee28676012810df535 (patch)
treef8429744386edb3ac11de98be0eeeb253a0c5c97 /emulator
parent84b68033f6b92a3c35ac1d3ab7f8278c54744cff (diff)
downloadsdk-68fbb34a4539d55ea788d6ee28676012810df535.zip
sdk-68fbb34a4539d55ea788d6ee28676012810df535.tar.gz
sdk-68fbb34a4539d55ea788d6ee28676012810df535.tar.bz2
emulator/opengl: Fix Windows SDK build.
This patch fixes the Windows SDK build. A previous patch apparently broke it even though I could not reproduce this locally before submitting. What it does is, when using the platform build to generate Windows binaries, use the host Linux binary instead of rebuilding the 'emugen' tool from sources. Note that the emulator's standalone build supports building host Linux binaries even when targetting Windows by default. + Add a missing module import that got lost in translation for some odd reason. Change-Id: I2ccd962d8b3df859b2cba82573225820b69b0d32
Diffstat (limited to 'emulator')
-rw-r--r--emulator/opengl/host/tools/emugen/Android.mk27
-rw-r--r--emulator/opengl/shared/OpenglOsUtils/Android.mk3
2 files changed, 29 insertions, 1 deletions
diff --git a/emulator/opengl/host/tools/emugen/Android.mk b/emulator/opengl/host/tools/emugen/Android.mk
index ae1b3ac..e2f3939 100644
--- a/emulator/opengl/host/tools/emugen/Android.mk
+++ b/emulator/opengl/host/tools/emugen/Android.mk
@@ -1,5 +1,23 @@
+# Determine if the emugen build needs to be builts from
+# sources.
+EMUGL_BUILD_EMUGEN :=
+ifeq (true,$(BUILD_STANDALONE_EMULATOR))
+ # The emulator's standalone build system can build host Linux
+ # binaries even when it targets Windows by setting
+ # LOCAL_HOST_BUILD to true, so rebuild from sources.
+ EMUGL_BUILD_EMUGEN := true
+else
+ ifneq ($(HOST_OS),windows)
+ # The platform build can only build emugen when targetting
+ # the same host sytem.
+ EMUGL_BUILD_EMUGEN := true
+ endif
+endif
+
LOCAL_PATH:=$(call my-dir)
+ifeq (true,$(EMUGL_BUILD_EMUGEN))
+
$(call emugl-begin-host-executable,emugen)
LOCAL_SRC_FILES := \
@@ -9,7 +27,9 @@ LOCAL_SRC_FILES := \
strUtils.cpp \
TypeFactory.cpp \
+ifeq (true,$(BUILD_STANDALONE_EMULATOR))
LOCAL_HOST_BUILD := true
+endif
$(call emugl-end-module)
@@ -17,3 +37,10 @@ $(call emugl-end-module)
# protocol encoders/ decoders. This variable is used by other emugl modules.
EMUGL_EMUGEN := $(LOCAL_BUILT_MODULE)
+else # windows platform build
+
+# on windows use the build host emugen executable
+# (that will be the linux exeutable when using mingw build)
+EMUGL_EMUGEN := $(BUILD_OUT_EXECUTABLES)/emugen
+
+endif
diff --git a/emulator/opengl/shared/OpenglOsUtils/Android.mk b/emulator/opengl/shared/OpenglOsUtils/Android.mk
index 566fd10..a3dd3c2 100644
--- a/emulator/opengl/shared/OpenglOsUtils/Android.mk
+++ b/emulator/opengl/shared/OpenglOsUtils/Android.mk
@@ -42,6 +42,7 @@ ifdef EMUGL_BUILD_64BITS
$(call emugl-export,C_INCLUDES,$(host_common_INCLUDES))
LOCAL_SRC_FILES = $(host_common_SRC_FILES)
$(call emugl-export,LDLIBS,$(host_common_LDLIBS))
+ $(call emugl-import,lib64emugl_common)
$(call emugl-export,CFLAGS,-m64 -fPIC)
$(call emugl-end-module)
-endif \ No newline at end of file
+endif