aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2014-03-06 16:57:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-03-06 16:57:29 +0000
commitfd8752eb6a438832e0ba9a19db896614403f8945 (patch)
tree4e5d810cfb9605cde4a158adbe129dbe739d9543
parent33dbfca01d61ae2c839bc9a55f20e3c2eaf5757a (diff)
parent32851ad05bd779ed04d5992ec241d54238c12fbc (diff)
downloadsdk-fd8752eb6a438832e0ba9a19db896614403f8945.zip
sdk-fd8752eb6a438832e0ba9a19db896614403f8945.tar.gz
sdk-fd8752eb6a438832e0ba9a19db896614403f8945.tar.bz2
Merge "emulator/opengl: Build 64-bit unit tests." into idea133
-rw-r--r--emulator/opengl/Android.mk10
-rw-r--r--emulator/opengl/googletest.mk30
-rw-r--r--emulator/opengl/shared/emugl/common/Android.mk9
3 files changed, 45 insertions, 4 deletions
diff --git a/emulator/opengl/Android.mk b/emulator/opengl/Android.mk
index da29214..0f5b856 100644
--- a/emulator/opengl/Android.mk
+++ b/emulator/opengl/Android.mk
@@ -30,6 +30,12 @@ endif
#
EMUGL_COMMON_CFLAGS := -DWITH_GLES2
+# Define EMUGL_BUILD_DEBUG=1 in your environment to build a
+# debug version of the EmuGL host binaries.
+ifneq (,$(strip $(EMUGL_BUILD_DEBUG)))
+EMUGL_COMMON_CFLAGS += -O0 -g -DEMUGL_DEBUG=1
+endif
+
# Uncomment the following line if you want to enable debug traces
# in the GLES emulation libraries.
# EMUGL_COMMON_CFLAGS += -DEMUGL_DEBUG=1
@@ -59,6 +65,10 @@ include $(EMUGL_PATH)/common.mk
# source files (see all emugl-gen-decoder/encoder in common.mk)
#
include $(EMUGL_PATH)/host/tools/emugen/Android.mk
+
+# Required by our units test.
+include $(EMUGL_PATH)/googletest.mk
+
include $(EMUGL_PATH)/shared/emugl/common/Android.mk
include $(EMUGL_PATH)/shared/OpenglOsUtils/Android.mk
include $(EMUGL_PATH)/shared/OpenglCodecCommon/Android.mk
diff --git a/emulator/opengl/googletest.mk b/emulator/opengl/googletest.mk
new file mode 100644
index 0000000..9719138
--- /dev/null
+++ b/emulator/opengl/googletest.mk
@@ -0,0 +1,30 @@
+# This contains common definitions used to define a host module
+# to link GoogleTest with the EmuGL test programs.
+#
+# This is used instead of including external/gtest/Android.mk to
+# be able to build both the 32-bit and 64-bit binaries while
+# building a 32-bit only SDK (sdk-eng, sdk_x86-eng, sdk_mips-eng).
+
+LOCAL_PATH := external/gtest
+
+$(call emugl-begin-host-static-library,libemugl_gtest)
+LOCAL_SRC_FILES := \
+ src/gtest-all.cc \
+ src/gtest_main.cc
+LOCAL_CFLAGS += -O0
+LOCAL_CPP_EXTENSION := .cc
+$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/include)
+$(call emugl-export,LDLIBS,-lpthread)
+$(call emugl-end-module)
+
+$(call emugl-begin-host-static-library,lib64emugl_gtest)
+LOCAL_SRC_FILES := \
+ src/gtest-all.cc \
+ src/gtest_main.cc
+LOCAL_CFLAGS += -O0
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
+LOCAL_CPP_EXTENSION := .cc
+$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/include)
+$(call emugl-export,CFLAGS,-m64)
+$(call emugl-export,LDLIBS,-lpthread -m64)
+$(call emugl-end-module)
diff --git a/emulator/opengl/shared/emugl/common/Android.mk b/emulator/opengl/shared/emugl/common/Android.mk
index d0b9d4e..5c444fd 100644
--- a/emulator/opengl/shared/emugl/common/Android.mk
+++ b/emulator/opengl/shared/emugl/common/Android.mk
@@ -27,9 +27,10 @@ host_commonSources := \
$(call emugl-begin-host-executable,emugl_common_host_unittests)
LOCAL_SRC_FILES := $(host_commonSources)
-LOCAL_C_INCLUDES += external/gtest/include
-LOCAL_LDFLAGS += -lpthread
-$(call emugl-export,STATIC_LIBRARIES, libemugl_common libgtest_host libgtest_main_host)
+$(call emugl-import,libemugl_common libemugl_gtest)
$(call emugl-end-module)
-# TODO(digit): 64-bit version, once we have 64-bit gtest.
+$(call emugl-begin-host-executable,emugl64_common_host_unittests)
+LOCAL_SRC_FILES := $(host_commonSources)
+$(call emugl-import,lib64emugl_common lib64emugl_gtest)
+$(call emugl-end-module)