Update files for OpenSSL-1.0.1 update.
[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=i386 and 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} == "i386"
22 # cpuid
23 SRCS=   x86cpuid.pl
24
25 # bn
26 SRCS+=  bn-586.pl co-586.pl x86-mont.pl x86-gf2m.pl
27
28 # des
29 SRCS+=  des-586.pl crypt586.pl
30
31 # aes
32 SRCS+=  aes-586.pl vpaes-x86.pl aesni-x86.pl
33
34 # bf
35 SRCS+=  bf-586.pl
36
37 # rc4
38 SRCS+=  rc4-586.pl
39
40 # md5
41 SRCS+=  md5-586.pl
42
43 # sha
44 SRCS+=  sha1-586.pl sha256-586.pl sha512-586.pl
45
46 # ripemd
47 SRCS+=  rmd-586.pl
48
49 # whrlpool
50 SRCS+=  wp-mmx.pl
51
52 # camellia
53 SRCS+=  cmll-x86.pl
54
55 # modes
56 SRCS+=  ghash-x86.pl
57
58 PERLFLAGS=      ${CFLAGS}
59
60 .elif ${MACHINE_ARCH} == "x86_64"
61 # cpuid
62 SRCS=   x86_64cpuid.pl
63
64 # bn
65 SRCS+=  x86_64-mont.pl x86_64-mont5.pl x86_64-gf2m.pl modexp512-x86_64.pl
66
67 # aes
68 SRCS+=  aes-x86_64.pl vpaes-x86_64.pl bsaes-x86_64.pl \
69         aesni-x86_64.pl aesni-sha1-x86_64.pl
70
71 # rc4
72 SRCS+=  rc4-x86_64.pl rc4-md5-x86_64.pl
73
74 # md5
75 SRCS+=  md5-x86_64.pl
76
77 # sha
78 SRCS+=  sha1-x86_64.pl sha256-x86_64.s sha512-x86_64.pl
79
80 # whrlpool
81 SRCS+=  wp-x86_64.pl
82
83 # camellia
84 SRCS+=  cmll-x86_64.pl
85
86 # modes
87 SRCS+=  ghash-x86_64.pl
88
89 PERLFLAGS=
90 .endif
91
92 all:    ${SRCS:S/.pl$/.s/}
93
94 CLEANFILES+=    ${SRCS:S/.pl$/.s/}
95 .SUFFIXES:      .pl
96
97 sha{256,512}-x86_64.s:  ${OPENSSL_SRC}/crypto/sha/asm/sha512-x86_64.pl
98         perl ${.ALLSRC} elf ${.TARGET}
99
100 .pl.s:
101         perl ${.IMPSRC} elf ${PERLFLAGS} > ${.TARGET}
102
103 .include <bsd.prog.mk>