Magisk/native/jni/base/Android.mk

32 lines
890 B
Makefile
Raw Normal View History

LOCAL_PATH := $(call my-dir)
# Magisk project-wide common code
include $(CLEAR_VARS)
2022-05-30 03:47:31 -07:00
LOCAL_MODULE := libbase
LOCAL_C_INCLUDES := jni/include $(LOCAL_PATH)/include out/generated
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_EXPORT_STATIC_LIBRARIES := libcxx
LOCAL_STATIC_LIBRARIES := libcxx
LOCAL_SRC_FILES := \
new.cpp \
files.cpp \
misc.cpp \
selinux.cpp \
logging.cpp \
xwrap.cpp \
stream.cpp
2021-10-20 03:17:42 -07:00
include $(BUILD_STATIC_LIBRARY)
2022-05-30 03:47:31 -07:00
# All static executables should link with libcompat
2021-10-20 03:17:42 -07:00
include $(CLEAR_VARS)
2022-05-30 03:47:31 -07:00
LOCAL_MODULE := libcompat
# Workaround "hacky" libc.a missing symbols
# To build Magisk with vanilla NDK, comment out the next line
LOCAL_SRC_FILES := compat/compat.cpp
2022-05-30 03:47:31 -07:00
# Fix static variables' ctor/dtor when using LTO
# See: https://github.com/android/ndk/issues/1461
LOCAL_EXPORT_LDLIBS := -static -T jni/lto_fix.lds
include $(BUILD_STATIC_LIBRARY)