File: Makefile

package info (click to toggle)
imx-code-signing-tool 3.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,336 kB
  • sloc: ansic: 10,752; sh: 1,167; python: 384; yacc: 245; makefile: 117; lex: 59
file content (75 lines) | stat: -rw-r--r-- 2,231 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#==============================================================================
#
#    File Name:  Makefile
#
#    General Description:  This is the release Makefile for the CST.
#                          Builds the SIS, API library and CST executable
#                          for the selected configurations.
#
#==============================================================================
#
#             Freescale Semiconductor
#    (c) Freescale Semiconductor, Inc. 2011-2015. All rights reserved.
#    Copyright 2017-2019 NXP
#
#==============================================================================

# COMMON MAKEFILE VARIABLES
#==============================================================================
ifndef VERBOSE
.SILENT:
endif

OSTYPES := linux64 linux32 mingw32 osx

OSTYPE ?= $(word 1,$(OSTYPES))

ifeq ($(filter-out $(OSTYPE),$(OSTYPES)),$(OSTYPES))
$(error OSTYPE is not correct (expected values: $(OSTYPES)))
endif

include code/build/make/$(OSTYPE).mk

# Before including init.mk we need to set relative path to root
ROOTPATH := $(PWD)
include code/build/make/init.mk

# RELEASE SPECIFIC VARIABLE DEFINITIONS
#==============================================================================
export DST := $(PWD)/release


# OPENSSL
#===============================================================================
OPENSSL_PATH ?= $(PWD)/../openssl
export _OPENSSL_PATH := $(realpath $(OPENSSL_PATH))

OPENSSL_CONFIG += no-deprecated no-threads no-shared no-dso no-engine no-hw \
                  no-idea

# COMPONENT BUILD RULES
#==============================================================================

# Make destination directories
$(DST)%:
	$(MKDIR) $@

# release binaries for the given configuration
rel_bin: $(DST)/$(OSTYPE)/bin $(DST)/keys
	$(MAKE) -C $(CST_CODE_PATH)/obj.$(OSTYPE) rel_bin

# build binaries for the given configuration
build:
	$(MAKE) -C $(CST_CODE_PATH)/obj.$(OSTYPE) build

# Clean up after build
clean:
	$(MAKE) -C $(CST_CODE_PATH)/obj.$(OSTYPE) clean

# build openssl library
openssl:
	cd $(_OPENSSL_PATH)           && \
	./Configure $(OPENSSL_CONFIG) && \
	make clean                    && \
	make                          && \
	cp ms/applink.c include/openssl/