aboutsummaryrefslogtreecommitdiff
path: root/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/Makefile
blob: 3b0114ccb1a7c9ff9d17a240fc8e64ebde64f9c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#-------------------------------------------------------------------------------
# Copyright (c) 2001-2019, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------

# Makefile for managing build and installation

# shared library to build
UTIL_ROOT = $(PWD)
UTILS_DIR_ROOT = $(UTIL_ROOT)/../..
HOST_DIR_ROOT = $(UTIL_ROOT)/../host
UTILS_LIB_PATH = ./lib
UTILS_LIB_NAME = lib_cmpuutil_crypto.so
UTILS_SCRIPTS_DIRNAME = $(UTIL_ROOT)


DEPENDENCY_ON_EXISTENCE_OF = $(filter-out $(wildcard $(1)), $(1))

INSTALL_LIST = install_lib install_scripts

all:   $(INSTALL_LIST)



install_lib: build_lib $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/lib)
	@echo Installing produtil_crypto library
	@cp $(UTILS_LIB_PATH)/$(UTILS_LIB_NAME) $(UTILS_DIR_ROOT)/lib

build_lib:
	@echo build_lib for cmpu_asset_pkg_util.py.
	@make -C $(UTILS_LIB_PATH)

install_scripts: $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin)  $(call DEPENDENCY_ON_EXISTENCE_OF,$(UTILS_DIR_ROOT)/bin/example)
	@echo Installing scripts for cmpu_asset_pkg_util.py.
	@cp $(UTIL_ROOT)/*.py $(UTILS_DIR_ROOT)/bin
	@cp $(UTIL_ROOT)/examples/*.cfg $(UTILS_DIR_ROOT)/bin/example

$(UTILS_DIR_ROOT)/%:
	@echo Creating directory  prod package
	@mkdir $@


clean:
	@make -C $(UTILS_LIB_PATH) clean

.PHONY: install_lib install_sd_scripts clean