forked from BinBashBanana/gbbflaginator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (45 loc) · 1.04 KB
/
Copy pathMakefile
File metadata and controls
57 lines (45 loc) · 1.04 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
#######################
# build targets below #
#######################
# all (default)
# install
# gbb
# ┗ flags
# ┗ keys
# tpm
# ┗ fwmp
# ┗ fwver
# ┗ kernver
#######################
# To build a subsection like `flags`,
# it would just be this: `make flags`
#######################
CC ?= gcc
SHELL ?= /bin/sh
CFLAGS := \
-g \
-Werror \
-Iinclude \
-O3 \
-static
$(shell mkdir -p build/bin)
$(shell mkdir -p build/lib)
$(shell mkdir -p build/share/vbootinator)
all: gbb tpm
gbb: flags keys
tpm: fwmp fwver kernver
# GBB stuff like flags and keys.
flags:
$(CC) src/gbb/flags.c -o build/bin/vbt-gbbflag $(CFLAGS)
# All the scripts & binaries that are needed for vbt-gbbkey are in build/usr/, or in /usr/local/
keys:
$(CC) src/gbb/keys.c -o build/bin/vbt-gbbkey $(CFLAGS)
# TPM stuff like fwmp and kernver
fwmp:
$(CC) src/tpm/fwmp.c -o build/bin/vbt-tpmfwmp $(CFLAGS)
fwver:
$(CC) src/tpm/fwver.c -o build/bin/vbt-tpmfwver $(CFLAGS)
kernver:
$(CC) src/tpm/kernver.c -o build/bin/vbt-tpmkernver $(CFLAGS)
clean:
rm -rf build/