Files
oemcrypto/oemcrypto/opk/ports/trusty/ta/reference/liboemcrypto/liboemcrypto-inc.mk
2024-11-26 20:08:25 +00:00

46 lines
1.5 KiB
Makefile

#
# Copyright (c) 2021, Google, Inc. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ifeq ($(strip $(LIBOEMCRYPTO_BUILD_DIR)),)
$(error LIBOEMCRYPTO_BUILD_DIR must be specified)
endif
ifeq ($(strip $(LIBOEMCRYPTO_OUT_DIR)),)
$(error LIBOEMCRYPTO_OUT_DIR must be specified)
endif
LIBOEMCRYPTO_SO := $(LIBOEMCRYPTO_OUT_DIR)/lib/arm64-v8a/liboemcrypto.so
.PHONY: $(LIBOEMCRYPTO_SO)
$(LIBOEMCRYPTO_SO): LOCAL_DIR := $(GET_LOCAL_DIR)
$(LIBOEMCRYPTO_SO): LIBOEMCRYPTO_BUILD_DIR := $(LIBOEMCRYPTO_BUILD_DIR)
$(LIBOEMCRYPTO_SO): LIBOEMCRYPTO_OUT_DIR := $(LIBOEMCRYPTO_OUT_DIR)
$(LIBOEMCRYPTO_SO): NDK_ROOT := $(TRUSTY_TOP)/prebuilts/ndk/r26
$(LIBOEMCRYPTO_SO):
$(NOECHO)$(NDK_ROOT)/ndk-build \
-C $(LOCAL_DIR) \
NDK_PROJECT_PATH=$(LIBOEMCRYPTO_BUILD_DIR) \
NDK_LIBS_OUT=$(LIBOEMCRYPTO_OUT_DIR)/lib \
NDK_APPLICATION_MK=Application.mk \
-j`nproc`
# Ensure liboemcrypto.so is built
EXTRA_BUILDDEPS += $(LIBOEMCRYPTO_SO)
LIBOEMCRYPTO_SO :=
LIBOEMCRYPTO_OUT_DIR :=
LIBOEMCRYPTO_BUILD_DIR :=