aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/opengl/shared/emugl/common/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'emulator/opengl/shared/emugl/common/Android.mk')
-rw-r--r--emulator/opengl/shared/emugl/common/Android.mk26
1 files changed, 24 insertions, 2 deletions
diff --git a/emulator/opengl/shared/emugl/common/Android.mk b/emulator/opengl/shared/emugl/common/Android.mk
index 58dd6da..fb9ab57 100644
--- a/emulator/opengl/shared/emugl/common/Android.mk
+++ b/emulator/opengl/shared/emugl/common/Android.mk
@@ -9,16 +9,26 @@ commonSources := \
id_to_object_map.cpp \
lazy_instance.cpp \
pod_vector.cpp \
+ shared_library.cpp \
smart_ptr.cpp \
sockets.cpp \
thread_store.cpp \
host_commonSources := $(commonSources)
+host_commonLdLibs := -lstdc++
+
+ifneq (windows,$(HOST_OS))
+ host_commonSources += thread_pthread.cpp
+ host_commonLdLibs += -ldl -lpthread
+else
+ host_commonSources += thread_win32.cpp
+endif
+
$(call emugl-begin-host-static-library,libemugl_common)
LOCAL_SRC_FILES := $(host_commonSources)
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/shared)
-$(call emugl-export,LDLIBS,-lstdc++)
+$(call emugl-export,LDLIBS,$(host_commonLdLibs))
$(call emugl-end-module)
ifdef EMUGL_BUILD_64BITS
@@ -26,7 +36,7 @@ ifdef EMUGL_BUILD_64BITS
LOCAL_SRC_FILES := $(host_commonSources)
$(call emugl-export,CFLAGS,-m64 -fPIC)
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/shared)
- $(call emugl-export,LDLIBS,-lstdc++)
+ $(call emugl-export,LDLIBS,$(host_commonLdLibs))
$(call emugl-end-module)
endif
@@ -38,8 +48,10 @@ host_commonSources := \
lazy_instance_unittest.cpp \
pod_vector_unittest.cpp \
mutex_unittest.cpp \
+ shared_library_unittest.cpp \
smart_ptr_unittest.cpp \
thread_store_unittest.cpp \
+ thread_unittest.cpp \
$(call emugl-begin-host-executable,emugl_common_host_unittests)
LOCAL_SRC_FILES := $(host_commonSources)
@@ -52,3 +64,13 @@ ifdef EMUGL_BUILD_64BITS
$(call emugl-import,lib64emugl_common lib64emugl_gtest)
$(call emugl-end-module)
endif
+
+$(call emugl-begin-host-shared-library,libemugl_test_shared_library)
+LOCAL_SRC_FILES := testing/test_shared_library.cpp
+$(call emugl-end-module)
+
+ifdef EMUGL_BUILD_64BITS
+ $(call emugl-begin-host64-shared-library,lib64emugl_test_shared_library)
+ LOCAL_SRC_FILES := testing/test_shared_library.cpp
+ $(call emugl-end-module)
+endif