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