xref: /netbsd-src/crypto/external/bsd/openssh/dist/moduli-gen/Makefile (revision 17418e98f281f84e3d22de9717222f9c2ee84d3a)
1#	$OpenBSD: Makefile,v 1.6 2020/11/08 12:10:20 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.
9DHSIZE=2048 3072 4096 6144 7680 8192
10
11.for bits in ${DHSIZE}
12MODULI_PARTS+=moduli.${bits}
13WORK_MODULI_PARTS+=${.OBJDIR}/moduli.${bits}.sieved.gz
14.endfor
15
16
17
18all:	${MODULI_PARTS}
19
20update-moduli:	${MODULI_PARTS}
21	( \
22		echo -n '#    $$Open'; echo 'BSD$$'; \
23		echo '# Time Type Tests Tries Size Generator Modulus'; \
24		cat ${MODULI_PARTS} \
25	) > ${BSDSRCDIR}/etc/moduli
26
27clean:
28	rm -f ${WORK_MODULI_PARTS}
29
30.for bits in ${DHSIZE}
31moduli.${bits}:
32	sh ${.CURDIR}/moduli-gen.sh ${.CURDIR} ${.CURDIR}/work ${bits}
33.endfor
34