You've already forked osfv-test-data
mirror of
https://github.com/Dasharo/osfv-test-data.git
synced 2026-03-06 15:04:05 -08:00
b03f84821b
Signed-off-by: Mateusz Maciejewski <mateusz.maciejewski@3mdeb.com>
43 lines
1.0 KiB
Makefile
43 lines
1.0 KiB
Makefile
all: hello-dasharo.efi
|
|
|
|
.SILENT: help
|
|
|
|
help:
|
|
echo "Supported targets:"
|
|
echo " (none) or all - build hello_dasharo.efi"
|
|
echo " sign - generate keys, certificates and signs hello_dasharo.efi"
|
|
echo " dist - re-creates dist (distribution) directory"
|
|
echo " clean - remove *.o & .efi from this directory"
|
|
|
|
CC = x86_64-w64-mingw32-gcc \
|
|
-Wl,--subsystem,10 \
|
|
-e efi_main
|
|
|
|
CFLAGS = \
|
|
-Wall -Wextra -Wpedantic \
|
|
-mno-red-zone \
|
|
-ffreestanding -nostdlib
|
|
|
|
hello-dasharo.efi: hello-dasharo.c
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
|
|
sign: hello-dasharo.efi
|
|
cd signing; ./keygen.sh
|
|
sbsign --key signing/private-key-good.pem --cert signing/cert_good.pem \
|
|
--output hello-dasharo-signed-good.efi $<
|
|
sbsign --key signing/private-key-bad.pem --cert signing/cert_bad.pem \
|
|
--output hello-dasharo-signed-bad.efi $<
|
|
dist: sign
|
|
rm -rf $@
|
|
mkdir $@
|
|
cp hello-dasharo.efi ./$@/
|
|
cp hello-dasharo-signed-good.efi ./$@/
|
|
cp hello-dasharo-signed-bad.efi ./$@/
|
|
cp ./signing/cert_good.der ./$@/
|
|
cp hello-dasharo.efi ./$@/cert_fake.der
|
|
|
|
clean:
|
|
rm -rf *.o
|
|
rm -rf *~
|
|
rm -rf *.efi
|