diff options
author | David 'Digit' Turner <digit@google.com> | 2014-03-01 12:21:39 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2014-03-11 18:03:08 +0100 |
commit | 56b89bc863d1a5da6234f05923f63b5466e1ce3f (patch) | |
tree | 4204ae9b54bec017c7d8e2e9688ba1120b6af89a /emulator/opengl/googletest.mk | |
parent | 829f46fdcd3136e2b97c310538cb27881ff3733b (diff) | |
download | sdk-56b89bc863d1a5da6234f05923f63b5466e1ce3f.zip sdk-56b89bc863d1a5da6234f05923f63b5466e1ce3f.tar.gz sdk-56b89bc863d1a5da6234f05923f63b5466e1ce3f.tar.bz2 |
emulator/opengl: Allow standalone build.
This patch improves the build files for the GPU emulation
libraries to allow them to be built directly with the emulator's
own standalone build system.
Change-Id: I205392bdfe4223a5c43fa67e24a2beffcbcbc07a
Diffstat (limited to 'emulator/opengl/googletest.mk')
-rw-r--r-- | emulator/opengl/googletest.mk | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/emulator/opengl/googletest.mk b/emulator/opengl/googletest.mk index 9719138..a49789a 100644 --- a/emulator/opengl/googletest.mk +++ b/emulator/opengl/googletest.mk @@ -5,26 +5,39 @@ # 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) +ifeq (true,$(BUILD_STANDALONE_EMULATOR)) +LOCAL_PATH := $(EMULATOR_GTEST_SOURCES_DIR) +else +LOCAL_PATH := $(EMUGL_PATH)/../../../external/gtest +endif -$(call emugl-begin-host-static-library,lib64emugl_gtest) -LOCAL_SRC_FILES := \ +common_SRC_FILES := \ src/gtest-all.cc \ src/gtest_main.cc -LOCAL_CFLAGS += -O0 -LOCAL_C_INCLUDES += $(LOCAL_PATH)/include + +common_CFLAGS := -O0 + +ifneq (windows,$(HOST_OS)) + common_LDLIBS += -lpthread +endif + +$(call emugl-begin-host-static-library,libemugl_gtest) +LOCAL_SRC_FILES := $(common_SRC_FILES) +LOCAL_CFLAGS += $(common_CFLAGS) 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-export,LDLIBS,$(common_LDLIBS)) $(call emugl-end-module) + +ifdef EMUGL_BUILD_64BITS + $(call emugl-begin-host-static-library,lib64emugl_gtest) + LOCAL_SRC_FILES := $(common_SRC_FILES) + LOCAL_CFLAGS += $(common_CFLAGS) + 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,$(common_LDLIBS) -m64) + $(call emugl-end-module) +endif # EMUGL_BUILD_64BITS |