diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-08-04 23:42:03 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-09-10 00:44:11 +0200 |
commit | fd8ff5abd5c1b1394c81bf472d726940c1c893cf (patch) | |
tree | e0839d7ffe12e4224dedb21725ef38af11a993ac /Android.mk | |
parent | 95165600e98134f8c7d3fe9957fed0a8c5ac5041 (diff) | |
download | hardware_replicant_libsamsung-ipc-fd8ff5abd5c1b1394c81bf472d726940c1c893cf.tar.gz hardware_replicant_libsamsung-ipc-fd8ff5abd5c1b1394c81bf472d726940c1c893cf.tar.bz2 hardware_replicant_libsamsung-ipc-fd8ff5abd5c1b1394c81bf472d726940c1c893cf.zip |
Android: also build as a shared libarry
On Android, libsamsung-ipc is dynamically linked
to libcrypto.
However libsamsung-ril uses libsamsung-ipc
as a static library.
Without that fix, on Android 9, linking libsamsung-ril
to libsamsung-ipc fails with the following errors:
rfs.c:50: error: undefined reference to 'MD5_Init'
rfs.c:51: error: undefined reference to 'MD5_Update'
rfs.c:52: error: undefined reference to 'MD5_Update'
rfs.c:53: error: undefined reference to 'MD5_Final'
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'Android.mk')
-rw-r--r-- | Android.mk | 59 |
1 files changed, 47 insertions, 12 deletions
@@ -17,8 +17,6 @@ LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - ifneq (,$(filter crespo,$(TARGET_DEVICE))) ipc_device_name := crespo endif @@ -51,7 +49,7 @@ ifneq (,$(filter n5100,$(TARGET_DEVICE))) ipc_device_name := n5100 endif -LOCAL_SRC_FILES := \ +libsamsung_ipc_local_src_files := \ samsung-ipc/ipc.c \ samsung-ipc/ipc_devices.c \ samsung-ipc/ipc_utils.c \ @@ -79,26 +77,63 @@ LOCAL_SRC_FILES := \ samsung-ipc/rfs.c \ samsung-ipc/gen.c -LOCAL_C_INCLUDES := \ +libsamsung_ipc_local_c_includes := \ $(LOCAL_PATH)/include \ $(LOCAL_PATH)/samsung-ipc \ $(LOCAL_PATH)/samsung-ipc/devices/xmm616/ \ $(LOCAL_PATH)/samsung-ipc/devices/xmm626/ \ external/openssl/include -LOCAL_CFLAGS := \ +libsamsung_local_cflags := \ -DIPC_DEVICE_NAME=\"$(ipc_device_name)\" \ -DDEBUG -LOCAL_SHARED_LIBRARIES := libutils libcrypto +libsamsung_ipc_local_shared_libraries := \ + libutils \ + libcrypto + +############################################ +# Static library version of libsamsung-ipc # +############################################ +include $(CLEAR_VARS) LOCAL_MODULE := libsamsung-ipc LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := $(libsamsung_ipc_local_src_files) + +LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes) + +LOCAL_CFLAGS := $(libsamsung_local_cflags) +LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries) + include $(BUILD_STATIC_LIBRARY) +############################################ +# Shared library version of libsamsung-ipc # +############################################ +include $(CLEAR_VARS) + +LOCAL_MODULE := libsamsung-ipc +LOCAL_MODULE_TAGS := optional + +LOCAL_SRC_FILES := $(libsamsung_ipc_local_src_files) + +LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes) + +LOCAL_CFLAGS := $(libsamsung_local_cflags) +LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries) + +include $(BUILD_SHARED_LIBRARY) + +################## +# ipc-modem tool # +################## include $(CLEAR_VARS) +LOCAL_MODULE := ipc-modem +LOCAL_MODULE_TAGS := optional + LOCAL_SRC_FILES := tools/ipc-modem.c LOCAL_C_INCLUDES := $(LOCAL_PATH)/include @@ -106,13 +141,16 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_STATIC_LIBRARIES := libsamsung-ipc LOCAL_SHARED_LIBRARIES := libutils -LOCAL_MODULE := ipc-modem -LOCAL_MODULE_TAGS := optional - include $(BUILD_EXECUTABLE) +################# +# ipc-test tool # +################# include $(CLEAR_VARS) +LOCAL_MODULE := ipc-test +LOCAL_MODULE_TAGS := optional + LOCAL_SRC_FILES := tools/ipc-test.c LOCAL_C_INCLUDES := $(LOCAL_PATH)/include @@ -120,7 +158,4 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_STATIC_LIBRARIES := libsamsung-ipc LOCAL_SHARED_LIBRARIES := libutils -LOCAL_MODULE := ipc-test -LOCAL_MODULE_TAGS := optional - include $(BUILD_EXECUTABLE) |