aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/geli/Makefile
blob: 527d1c6a546444eb20cada9898ff3dd42af9ac8b (plain) (blame)
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
# $FreeBSD$
# libgeliboot

MAN=

.include <src.opts.mk>
MK_SSP=		no

LIB=		geliboot
INTERNALLIB=
MK_PROFILE=	no
NO_PIC=

.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+=        -march=i386
.endif
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
CFLAGS+=        -m32
.endif

WARNS?=		0

# string functions from libc
.PATH: ${.CURDIR}/../../../lib/libc/string
SRCS+=  bcmp.c bcopy.c bzero.c

# Our password input method
SRCS+=  pwgets.c

# sha256 and sha512 from sys/crypto
.PATH: ${SRCTOP}/sys/crypto/sha2
CFLAGS+=	-DWEAK_REFS
SRCS+=		sha256c.c sha512c.c

# md5 from libmd
.PATH: ${SRCTOP}/lib/libmd
SRCS+=		md5c.c

# AES implementation from sys/crypto
.PATH: ${SRCTOP}/sys/crypto/rijndael
CFLAGS+=	-I${.CURDIR}/../../
CFLAGS+=	-I${.CURDIR}/../common/
# Remove asserts
CFLAGS+=	-DNDEBUG
SRCS+=		rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c

# local GELI Implementation
.PATH: ${SRCTOP}/sys/geom/eli
CFLAGS+=	-D_STAND
SRCS+=		geliboot_crypto.c g_eli_hmac.c g_eli_key.c g_eli_key_cache.c pkcs5v2.c

.include <bsd.stand.mk>
.include <bsd.lib.mk>