[Replicant] [libsamsung-ipc][PATCH] Android.mk: Also ship headers
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Tue Feb 25 01:01:16 UTC 2020
Without that, the Android components that are using
libsamsung-ipc have to hardcode the location of
libsamsung-ipc to be able to access the headers.
LOCAL_EXPORT_C_INCLUDE_DOS'S also enables the other
components depending on libsamsung-ipc to automatically add
the exported header directory to the header search path
during compilation.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
Android.mk | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/Android.mk b/Android.mk
index 391185c..9fa2c7d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -77,6 +77,29 @@ libsamsung_ipc_local_src_files := \
samsung-ipc/rfs.c \
samsung-ipc/gen.c
+libsamsung_ipc_local_copy_headers := \
+ include/call.h \
+ include/disp.h \
+ include/gen.h \
+ include/gprs.h \
+ include/imei.h \
+ include/misc.h \
+ include/net.h \
+ include/pb.h \
+ include/protocol.h \
+ include/pwr.h \
+ include/rfs.h \
+ include/samsung-ipc.h \
+ include/sat.h \
+ include/sec.h \
+ include/sms.h \
+ include/snd.h \
+ include/ss.h \
+ include/svc.h \
+
+local_export_c_include_dirs := \
+ $(TARGET_OUT_HEADERS)/libsamsung-ipc
+
libsamsung_ipc_local_c_includes := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/samsung-ipc \
@@ -108,6 +131,11 @@ LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes)
LOCAL_CFLAGS := $(libsamsung_local_cflags)
LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries)
+LOCAL_COPY_HEADERS_TO := libsamsung-ipc
+LOCAL_COPY_HEADERS := $(libsamsung_ipc_local_copy_headers)
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(local_export_c_include_dirs)
+
include $(BUILD_STATIC_LIBRARY)
############################################
@@ -125,6 +153,8 @@ LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes)
LOCAL_CFLAGS := $(libsamsung_local_cflags)
LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(local_export_c_include_dirs)
+
include $(BUILD_SHARED_LIBRARY)
##################
--
2.25.1
More information about the Replicant
mailing list