Change parts of library to shared

libsqlite and libselinux are shipped with Android systems
We build them here for the compiler to link against it,
we actually use the one in /system/lib(64)
This commit is contained in:
topjohnwu
2017-04-05 09:14:33 +08:00
parent acfde9458d
commit f476daa041
4 changed files with 8 additions and 7 deletions

View File

@@ -2,7 +2,8 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := magisk LOCAL_MODULE := magisk
LOCAL_STATIC_LIBRARIES := libselinux libsepol libsqlite3 LOCAL_STATIC_LIBRARIES := libsepol
LOCAL_SHARED_LIBRARIES := libsqlite libselinux
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/utils \ $(LOCAL_PATH)/utils \
@@ -34,7 +35,7 @@ LOCAL_SRC_FILES := \
su/utils.c \ su/utils.c \
su/pts.c su/pts.c
LOCAL_CFLAGS := -static -Wno-implicit-exception-spec-mismatch LOCAL_CFLAGS := -Wno-implicit-exception-spec-mismatch
LOCAL_LDLIBS := -llog LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)

View File

@@ -1,10 +1,10 @@
LOCAL_PATH:= $(call my-dir) LOCAL_PATH:= $(call my-dir)
## ##
# libsqlite3.a # libsqlite.so
# #
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE:= libsqlite3 LOCAL_MODULE:= libsqlite
LOCAL_SRC_FILES := sqlite3.c shell.c LOCAL_SRC_FILES := sqlite3.c shell.c
include $(BUILD_STATIC_LIBRARY) include $(BUILD_SHARED_LIBRARY)