Home | History | Annotate | Download | only in opengl
      1 # This contains common definitions used to define a host module
      2 # to link GoogleTest with the EmuGL test programs.
      3 #
      4 # This is used instead of including external/gtest/Android.mk to
      5 # be able to build both the 32-bit and 64-bit binaries while
      6 # building a 32-bit only SDK (sdk-eng, sdk_x86-eng, sdk_mips-eng).
      7 
      8 
      9 ifeq (true,$(BUILD_STANDALONE_EMULATOR))
     10 LOCAL_PATH := $(EMULATOR_GTEST_SOURCES_DIR)
     11 else
     12 LOCAL_PATH := $(EMUGL_PATH)/../../../external/gtest
     13 endif
     14 
     15 common_SRC_FILES := \
     16     src/gtest-all.cc \
     17     src/gtest_main.cc
     18 
     19 common_CFLAGS := -O0
     20 
     21 ifneq (windows,$(HOST_OS))
     22     common_LDLIBS += -lpthread
     23 endif
     24 
     25 $(call emugl-begin-host-static-library,libemugl_gtest)
     26 LOCAL_SRC_FILES := $(common_SRC_FILES)
     27 LOCAL_CFLAGS += $(common_CFLAGS)
     28 LOCAL_CPP_EXTENSION := .cc
     29 $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/include)
     30 $(call emugl-export,LDLIBS,$(common_LDLIBS))
     31 $(call emugl-end-module)
     32 
     33 ifdef EMUGL_BUILD_64BITS
     34     $(call emugl-begin-host64-static-library,lib64emugl_gtest)
     35     LOCAL_SRC_FILES := $(common_SRC_FILES)
     36     LOCAL_CFLAGS += $(common_CFLAGS)
     37     LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
     38     LOCAL_CPP_EXTENSION := .cc
     39     $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/include)
     40     $(call emugl-export,CFLAGS,-m64)
     41     $(call emugl-export,LDLIBS,$(common_LDLIBS) -m64)
     42     $(call emugl-end-module)
     43 endif  # EMUGL_BUILD_64BITS
     44