Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libmd/Makefile
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | |||||
# | # | ||||
# Note that the same sources are also used internally by libcrypt, | # Note that the same sources are also used internally by libcrypt, | ||||
# in which case: | # in which case: | ||||
# * macros are used to rename symbols to libcrypt internal names | # * macros are used to rename symbols to libcrypt internal names | ||||
# * no weak aliases are generated | # * no weak aliases are generated | ||||
CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/crypto/sha2 | CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/crypto/sha2 | ||||
CFLAGS+= -I${SRCTOP}/sys/crypto/skein | CFLAGS+= -I${SRCTOP}/sys/crypto/skein | ||||
CFLAGS+= -DWEAK_REFS | CFLAGS+= -DWEAK_REFS | ||||
# unroll the 256 and 512 loops, half unroll the 1024 | |||||
CFLAGS+= -DSKEIN_LOOP=995 | |||||
.PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2 | .PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2 | ||||
.PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} | .PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} | ||||
.if exists(${MACHINE_ARCH}/sha.S) | .if exists(${MACHINE_ARCH}/sha.S) | ||||
SRCS+= sha.S | SRCS+= sha.S | ||||
CFLAGS+= -DSHA1_ASM | CFLAGS+= -DSHA1_ASM | ||||
.endif | .endif | ||||
.if exists(${MACHINE_ARCH}/rmd160.S) | .if exists(${MACHINE_ARCH}/rmd160.S) | ||||
SRCS+= rmd160.S | SRCS+= rmd160.S | ||||
CFLAGS+= -DRMD160_ASM | CFLAGS+= -DRMD160_ASM | ||||
.endif | .endif | ||||
.if exists(${MACHINE_ARCH}/skein_block_asm.s) | .if exists(${MACHINE_ARCH}/skein_block_asm.s) | ||||
AFLAGS += --strip-local-absolute | AFLAGS += --strip-local-absolute | ||||
# Fully unroll all loops in the assembly optimized version | |||||
AFLAGS+= --defsym SKEIN_LOOP=0 | |||||
SRCS+= skein_block_asm.s | SRCS+= skein_block_asm.s | ||||
CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 | CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 | ||||
.endif | .endif | ||||
.if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${MACHINE_ARCH}/skein_block_asm.s) | .if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${MACHINE_ARCH}/skein_block_asm.s) | ||||
ACFLAGS+= -DELF -Wa,--noexecstack | ACFLAGS+= -DELF -Wa,--noexecstack | ||||
.endif | .endif | ||||
md4hl.c: mdXhl.c | md4hl.c: mdXhl.c | ||||
▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines |