aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/opengl/shared/emugl/common/Android.mk
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2014-07-08 21:45:47 +0200
committerDavid 'Digit' Turner <digit@google.com>2014-07-09 18:12:08 +0200
commit242a075e3256fc7f369f0e5f93fd2ae91c255774 (patch)
tree93d82dee2d537a506bd5b204df65495fbc21d663 /emulator/opengl/shared/emugl/common/Android.mk
parentd1dd8ee1e85f60569ddf6ebc7fe1cbde7ebb6f38 (diff)
downloadsdk-242a075e3256fc7f369f0e5f93fd2ae91c255774.zip
sdk-242a075e3256fc7f369f0e5f93fd2ae91c255774.tar.gz
sdk-242a075e3256fc7f369f0e5f93fd2ae91c255774.tar.bz2
emulator/opengl: refactor shared library handling.
+ Add a unit test. Change-Id: I27c993d1dc819e5bd89fc1e9ae266e11e6ef9a76
Diffstat (limited to 'emulator/opengl/shared/emugl/common/Android.mk')
-rw-r--r--emulator/opengl/shared/emugl/common/Android.mk21
1 files changed, 19 insertions, 2 deletions
diff --git a/emulator/opengl/shared/emugl/common/Android.mk b/emulator/opengl/shared/emugl/common/Android.mk
index 58dd6da..e75f887 100644
--- a/emulator/opengl/shared/emugl/common/Android.mk
+++ b/emulator/opengl/shared/emugl/common/Android.mk
@@ -9,16 +9,22 @@ 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_commonLdLibs += -ldl
+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 +32,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,6 +44,7 @@ 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 \
@@ -52,3 +59,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