[script] Android AOSP generate mk from file in dir

This commit is contained in:
Mathieu Maret 2016-02-15 16:40:37 +01:00
parent ba1e7ca123
commit a7caac3dc2

17
scripts/lib_to_mk.sh Executable file
View File

@ -0,0 +1,17 @@
DEPS=""
LIBS=""
for file in $(ls $@);
do echo -e "
include \$(CLEAR_VARS)
LOCAL_MODULE := ${file%.so}
LOCAL_SRC_FILES := vendor/lib/$file
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_PATH := \$(TARGET_OUT)/vendor/lib
include \$(BUILD_PREBUILT)";
DEPS+=" ${file%.so}"
LIBS+=" $file"
done
echo -e "\n$DEPS"
echo -e "\n$LIBS"