1e90b74683
Make sure sector zero is protected if it contains metadata. Lower WARNS for gbde to 3 on non-i386 archs. rijndael-fst is evil but appearntly does the right thing and passes the test-vectors. MFC Candidate.
38 lines
768 B
Makefile
38 lines
768 B
Makefile
# $FreeBSD$
|
|
|
|
PROG= gbde
|
|
SRCS= gbde.c template.c
|
|
SRCS+= geom_enc.c
|
|
SRCS+= rijndael-alg-fst.c
|
|
SRCS+= rijndael-api-fst.c
|
|
SRCS+= sha2.c
|
|
SRCS+= g_bde_lock.c
|
|
|
|
# rijndael-fst.c does evil casting things which results in warnings on
|
|
# 64 bit machines, the test-vectors check out however, so it works right.
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
WARNS?= 5
|
|
.else
|
|
WARNS?= 3
|
|
.endif
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../sys
|
|
.PATH: ${.CURDIR}/../../sys/geom \
|
|
${.CURDIR}/../../sys/geom/bde \
|
|
${.CURDIR}/../../sys/crypto/rijndael \
|
|
${.CURDIR}/../../sys/crypto/sha2
|
|
|
|
CLEANFILES+= template.c
|
|
|
|
MAN= gbde.8
|
|
LDADD= -lmd -lutil
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
template.c: template.txt
|
|
file2c 'const char template[] = {' ',0};' \
|
|
< ${.CURDIR}/template.txt > template.c
|
|
|
|
test: ${PROG}
|
|
sh ${.CURDIR}/test.sh
|