Skip to content

Commit 4b6c559

Browse files
committed
libtinycompress: use kernel headers when used as a shared lib
Change-Id: Ib6ceff06cf8f9b2780523b673f46b6dba6f46320 Signed-off-by: Paul Beeler <[email protected]>
1 parent a0a11c2 commit 4b6c559

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

core/binary.mk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,22 @@ ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),true)
137137
endif
138138
endif
139139

140+
# Have anything that builds with libtinycompress as a shared lib use kernel headers.
141+
142+
ifdef LOCAL_SHARED_LIBRARIES
143+
ifneq (1,$(words $(filter libtinycompress, $(LOCAL_SHARED_LIBRARIES))))
144+
ifdef LOCAL_C_INCLUDES
145+
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
146+
else
147+
LOCAL_C_INCLUDES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
148+
endif
149+
ifdef LOCAL_ADDITIONAL_DEPENDENCIES
150+
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
151+
else
152+
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
153+
endif
154+
endif
155+
endif
140156

141157
#end SaberMod
142158

0 commit comments

Comments
 (0)