1# This build script corresponds to a library containing many definitions 2# common to both the guest and the host. They relate to 3# 4LOCAL_PATH := $(call my-dir) 5 6### emugl_common host library ########################################### 7 8commonSources := \ 9 id_to_object_map.cpp \ 10 lazy_instance.cpp \ 11 pod_vector.cpp \ 12 smart_ptr.cpp \ 13 sockets.cpp \ 14 thread_store.cpp \ 15 16host_commonSources := $(commonSources) 17 18$(call emugl-begin-host-static-library,libemugl_common) 19LOCAL_SRC_FILES := $(host_commonSources) 20$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/shared) 21$(call emugl-export,LDLIBS,-lstdc++) 22$(call emugl-end-module) 23 24ifdef EMUGL_BUILD_64BITS 25 $(call emugl-begin-host64-static-library,lib64emugl_common) 26 LOCAL_SRC_FILES := $(host_commonSources) 27 $(call emugl-export,CFLAGS,-m64 -fPIC) 28 $(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/shared) 29 $(call emugl-export,LDLIBS,-lstdc++) 30 $(call emugl-end-module) 31endif 32 33 34### emugl_common_unittests ############################################## 35 36host_commonSources := \ 37 id_to_object_map_unittest.cpp \ 38 lazy_instance_unittest.cpp \ 39 pod_vector_unittest.cpp \ 40 mutex_unittest.cpp \ 41 smart_ptr_unittest.cpp \ 42 thread_store_unittest.cpp \ 43 44$(call emugl-begin-host-executable,emugl_common_host_unittests) 45LOCAL_SRC_FILES := $(host_commonSources) 46$(call emugl-import,libemugl_common libemugl_gtest) 47$(call emugl-end-module) 48 49ifdef EMUGL_BUILD_64BITS 50 $(call emugl-begin-host64-executable,emugl64_common_host_unittests) 51 LOCAL_SRC_FILES := $(host_commonSources) 52 $(call emugl-import,lib64emugl_common lib64emugl_gtest) 53 $(call emugl-end-module) 54endif 55