blob: c4540360f74d792db3c55a72eed956145b87a980 [file] [log] [blame]
# This build script corresponds to a library containing many definitions
# common to both the guest and the host. They relate to
#
LOCAL_PATH := $(call my-dir)
### emugl_common host library ###########################################
commonSources := \
crash_reporter.cpp \
id_to_object_map.cpp \
logging.cpp \
shared_library.cpp \
stringparsing.cpp \
sockets.cpp \
host_commonSources := $(commonSources)
host_commonLdLibs := $(CXX_STD_LIB)
ifneq (windows,$(BUILD_TARGET_OS))
host_commonLdLibs += -ldl -lpthread
endif
$(call emugl-begin-static-library,libemugl_common)
LOCAL_SRC_FILES := $(host_commonSources)
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/shared)
$(call emugl-export,LDLIBS,$(host_commonLdLibs))
$(call emugl-end-module)
### emugl_common_unittests ##############################################
host_commonSources := \
id_to_object_map_unittest.cpp \
shared_library_unittest.cpp \
unique_integer_map_unittest.cpp \
stringparsing_unittest.cpp
$(call emugl-begin-executable,emugl$(BUILD_TARGET_SUFFIX)_common_host_unittests)
LOCAL_SRC_FILES := $(host_commonSources)
$(call emugl-import,libemugl_common libemugl_gtest)
$(call emugl-end-module)
$(call emugl-begin-shared-library,lib$(BUILD_TARGET_SUFFIX)emugl_test_shared_library)
LOCAL_SRC_FILES := testing/test_shared_library.cpp
LOCAL_CFLAGS := -fvisibility=default
$(call emugl-end-module)