Skip to content

Commit

Permalink
Build su as static.
Browse files Browse the repository at this point in the history
With so many different versions of Android, using a dynamically linked
binary is just not practical, since things can be wildly different on
different versions.
  • Loading branch information
ChainsDD committed Jun 4, 2012
1 parent 382d1e3 commit d86184a
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE := su
LOCAL_SRC_FILES := su.c db.c activity.cpp

SU_SHARED_LIBRARIES := liblog libsqlite
ifeq ($(PLATFORM_SDK_VERSION),4)
LOCAL_CFLAGS += -DSU_LEGACY_BUILD
SU_SHARED_LIBRARIES += libandroid_runtime
else
SU_SHARED_LIBRARIES += libcutils libbinder libutils
LOCAL_MODULE_TAGS := debug,eng
endif
LOCAL_SRC_FILES := su.c db.c activity.c

LOCAL_C_INCLUDES += external/sqlite/dist

LOCAL_SHARED_LIBRARIES := $(SU_SHARED_LIBRARIES)
LOCAL_STATIC_LIBRARIES := \
liblog \
libsqlite \
libc \

LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_MODULE_TAGS := eng debug
LOCAL_FORCE_STATIC_EXECUTABLE := true

include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)

0 comments on commit d86184a

Please sign in to comment.