508be2a0a6f63dc8c616d2c0c31d0d078abccee5
[dragonfly.git] / secure / lib / libcrypto / asm / Makefile
1 # This file automatically generates the asm .s files after importing a new
2 # version of OpenSSL.  You need to run it with MACHINE_ARCH=x86_64
3 # to get everything generated properly.
4
5 OPENSSL_SRC=    ../../../../crypto/openssl
6
7 .PATH:  ${OPENSSL_SRC}/crypto \
8         ${OPENSSL_SRC}/crypto/aes/asm \
9         ${OPENSSL_SRC}/crypto/bf/asm \
10         ${OPENSSL_SRC}/crypto/bn/asm \
11         ${OPENSSL_SRC}/crypto/camellia/asm \
12         ${OPENSSL_SRC}/crypto/des/asm \
13         ${OPENSSL_SRC}/crypto/md5/asm \
14         ${OPENSSL_SRC}/crypto/modes/asm \
15         ${OPENSSL_SRC}/crypto/perlasm \
16         ${OPENSSL_SRC}/crypto/rc4/asm \
17         ${OPENSSL_SRC}/crypto/ripemd/asm \
18         ${OPENSSL_SRC}/crypto/sha/asm \
19         ${OPENSSL_SRC}/crypto/whrlpool/asm
20
21 .if ${MACHINE_ARCH} == "x86_64"
22 # cpuid
23 SRCS=   x86_64cpuid.pl
24
25 # bn
26 SRCS+=  x86_64-mont.pl x86_64-mont5.pl x86_64-gf2m.pl modexp512-x86_64.pl
27
28 # aes
29 SRCS+=  aes-x86_64.pl vpaes-x86_64.pl bsaes-x86_64.pl \
30         aesni-x86_64.pl aesni-sha1-x86_64.pl
31
32 # rc4
33 SRCS+=  rc4-x86_64.pl rc4-md5-x86_64.pl
34
35 # md5
36 SRCS+=  md5-x86_64.pl
37
38 # sha
39 SRCS+=  sha1-x86_64.pl sha256-x86_64.s sha512-x86_64.pl
40
41 # whrlpool
42 SRCS+=  wp-x86_64.pl
43
44 # camellia
45 SRCS+=  cmll-x86_64.pl
46
47 # modes
48 SRCS+=  ghash-x86_64.pl
49
50 PERLFLAGS=
51 .endif
52
53 all:    ${SRCS:S/.pl$/.s/}
54
55 CLEANFILES+=    ${SRCS:S/.pl$/.s/}
56 .SUFFIXES:      .pl
57
58 sha{256,512}-x86_64.s:  ${OPENSSL_SRC}/crypto/sha/asm/sha512-x86_64.pl
59         perl ${.ALLSRC} elf ${.TARGET}
60
61 .pl.s:
62         perl ${.IMPSRC} elf ${PERLFLAGS} > ${.TARGET}
63
64 .include <bsd.prog.mk>