From fc568111ee52494c28bedfd72f5bc6e35649c646 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sat, 22 Feb 2020 21:34:10 +0100 Subject: Android.mk: Also ship headers 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_DIRS 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 --- 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) ################## -- cgit v1.2.3