Changeset View
Changeset View
Standalone View
Standalone View
lib/libmd/Makefile
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
# Define WEAK_REFS to provide weak aliases for libmd symbols | # Define WEAK_REFS to provide weak aliases for libmd symbols | ||||
# | # | ||||
# 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} -DWEAK_REFS | CFLAGS+= -I${.CURDIR} -DWEAK_REFS | ||||
.PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 | .PATH: ${.CURDIR}/${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}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) | .if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) | ||||
ACFLAGS+= -DELF -Wa,--noexecstack | ACFLAGS+= -DELF -Wa,--noexecstack | ||||
.endif | .endif | ||||
.include <Makefile.inc> | |||||
md4hl.c: mdXhl.c | md4hl.c: mdXhl.c | ||||
(echo '#define LENGTH 16'; \ | (echo '#define LENGTH 16'; \ | ||||
sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' ${.ALLSRC}) > ${.TARGET} | sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' ${.ALLSRC}) > ${.TARGET} | ||||
md5hl.c: mdXhl.c | md5hl.c: mdXhl.c | ||||
(echo '#define LENGTH 16'; \ | (echo '#define LENGTH 16'; \ | ||||
sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' ${.ALLSRC}) > ${.TARGET} | sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' ${.ALLSRC}) > ${.TARGET} | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |