forked from Xilinx/bootgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·116 lines (102 loc) · 2.69 KB
/
Makefile
File metadata and controls
executable file
·116 lines (102 loc) · 2.69 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
##############################################################################
#
# Copyright 2015-2019 Xilinx, Inc.
#
# 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.
#
##############################################################################
#
# Building Bootgen for Host:
# 'make "LIBS=<openssl/lib/libssl.a> <openssl/lib/libcrypto.a> -ldl
# -lpthread" "INCLUDE_USER=-I<openssl/include>"'
#
# Building Bootgen for ARM:
# 'make "CROSS_COMPILER=aarch64-linux-gnu-g++" "LIBS=<opensslarm/lib/libssl.a> \
# <opensslarm/lib/libcrypto.a> -ldl -lpthread"
# "INCLUDE_USER=-I<opensslarm/include>"'
#
##############################################################################
CROSS_COMPILER ?= g++
OBJ = o
CXXFLAGS ?= -std=c++0x -O -Wall -Wno-reorder -Wno-deprecated-declarations
EXEC = bootgen
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
INCLUDE_SYS = -I.
LIBS = -lssl -lcrypto
RTLIBS =
OPTIONS_USER =
endif
INCLUDE = $(INCLUDE_USER) $(INCLUDE_SYS)
OPTIONS = $(OPTIONS_USER) -g
all: $(EXEC) $(RTLIBS)
OBJECTS = bif.tab.o \
bif.yy.o \
reginit.tab.o \
reginit.yy.o \
cmdoptions.tab.o \
cmdoptions.yy.o \
authentication.o \
authentication-zynq.o \
authentication-zynqmp.o \
authkeys.o \
binary.o \
binfile.o \
bitutils.o \
options.o \
bifoptions.o \
bootheader.o \
bootheader-zynq.o \
bootheader-zynqmp.o \
bootimage.o \
bootimage-zynq.o \
bootimage-zynqmp.o \
checksum.o \
elftools.o \
encryption.o \
encryptutils.o \
encryptionkeys.o\
encryption-zynq.o \
encryption-zynqmp.o \
hash.o \
imageheadertable.o \
imageheadertable-zynq.o \
imageheadertable-zynqmp.o \
Keccak-compact.o \
logger.o \
readimage.o \
readimage-zynq.o \
readimage-zynqmp.o \
verifyimage.o \
main.o \
mcsfile.o \
outputfile.o \
parsing.o \
partition.o \
partitionheadertable.o \
partitionheadertable-zynq.o \
partitionheadertable-zynqmp.o \
reginit.o
# List of all src to be compiled for bootgen.
EXECOBJS = *.cpp : *.o
# compile all object files
%.${OBJ} : %.cpp
${CROSS_COMPILER} -c ${CXXFLAGS} $(OPTIONS) ${INCLUDE} $<
${EXEC}: $(OBJECTS)
echo Building executable file: $@...
${CROSS_COMPILER} $(CXXFLAGS) $(LDFLAGS) $(OPTIONS_USER) -o $@ $(OBJECTS) $(LIBS)
execs: ${EXEC}
clean:
echo
rm -rf ${EXEC}
rm -f $(OBJECTS)