1 # $OpenBSD: Makefile,v 1.7 2025/06/16 09:09:42 dtucker Exp $ 2 3 .include <bsd.own.mk> 4 5 # The larger ones will take many days, so if you're going to regen them run 6 # it in a tmux session or something. The checkpoints should make it safe 7 # to stop and restart. 8 # The sizes match those in dh.c:dh_estimate() plus some historic sizes. 9 DHSIZE=2048 3072 4096 6144 7680 8192 10 11 .for bits in ${DHSIZE} 12 MODULI_PARTS+=moduli.${bits} 13 WORK_MODULI_PARTS+=${.OBJDIR}/moduli.${bits}.sieved.gz 14 .endfor 15 16 17 18 all: ${MODULI_PARTS} 19 20 update-moduli: ${MODULI_PARTS} 21 ( \ 22 echo -n '# $$Open'; echo 'BSD$$'; \ 23 echo '# Time Type Tests Tries Size Generator Modulus'; \ 24 for i in ${MODULI_PARTS}; do head -100 $$i; done \ 25 ) > ${BSDSRCDIR}/etc/moduli 26 27 clean: 28 rm -f ${WORK_MODULI_PARTS} 29 30 .for bits in ${DHSIZE} 31 moduli.${bits}: 32 sh ${.CURDIR}/moduli-gen.sh ${.CURDIR} ${.CURDIR}/work ${bits} 33 .endfor 34