LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libuapi_otpbasic LOCAL_MULTILIB := both LOCAL_BUILD_STATIC := true LOCAL_SRC_FILES := iapi_otp.c mpi_otp.c mpi_otp_teec.c LOCAL_CFLAGS := -Ivendor/platform/secure_c/include \ -Ivendor/platform/libteec_vendor/include \ -Ivendor/huanglong/linux/include/generic \ -Ivendor/huanglong/uapi/otp/basic/include \ -Ivendor/huanglong/uapi/otp/parser/include OTP_VERSION ?= $(CHIP_VERSION) ifeq ($(CHIP_VERSION), reserved26) OTP_VERSION := reserved13 endif $(warning OTP_VERSION=$(OTP_VERSION)) LOCAL_LDFLAGS := -lpthread LOCAL_LDFLAGS += -Wl,-z,relro,-z,now,-z,noexecstack -s LOCAL_CFLAGS += -Wformat -Wpointer-arith LOCAL_CFLAGS += -DOTP_DATA_FILE_BASE=\"./data/otp_data_$(OTP_VERSION).txt\" \ -DOTP_DATA_FILE_C1=\"./data/null.txt\" LOCAL_STATIC_LIBRARIES += libuapi_otpdata LOCAL_SHARED_LIBRARIES := libuapi_memory \ libuapi_securec \ libuapi_common \ libteec_vendor include $(BUILD_LINUX_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := otptool LOCAL_MULTILIB := both LOCAL_BUILD_STATIC := true LOCAL_SRC_FILES := test_code/otptool.c LOCAL_CFLAGS := -Ivendor/platform/secure_c/include\ -Ivendor/platform/libteec_vendor/include \ -Ivendor/huanglong/linux/include/generic \ -Ivendor/huanglong/linux/include/ssm \ -Ivendor/huanglong/uapi/otp/basic/include \ -Ivendor/huanglong/uapi/otp/parser/include \ -Ivendor/huanglong/uapi/otp/memory/include \ -Ivendor/huanglong/uapi/otp/common/include LOCAL_CFLAGS += -fPIE -pie -Wl,-z,relro,-z,now,-z,noexecstack -fstack-protector-all -s LOCAL_CFLAGS += -Wno-error LOCAL_LDFLAGS := -lpthread LOCAL_STATIC_LIBRARIES := libuapi_otpbasic libuapi_otpdata LOCAL_SHARED_LIBRARIES := libuapi_memory \ libuapi_securec \ libuapi_common \ libteec_vendor include $(BUILD_LINUX_EXECUTABLE)