aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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