]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - secure/lib/libcrypto/Makefile.asm
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / secure / lib / libcrypto / Makefile.asm
1 # $FreeBSD$
2 # Use this to help generate the asm *.[Ss] files after an import.  It is not
3 # perfect by any means, but does what is needed.
4 # Do a 'make -f Makefile.asm all' and it will generate *.s.  Move them
5 # to the i386 subdir, and correct any exposed paths and $ FreeBSD $ tags.
6
7 .include "Makefile.inc"
8
9 .if ${MACHINE_CPUARCH} == "amd64"
10
11 .PATH:  ${LCRYPTO_SRC}/crypto \
12         ${LCRYPTO_SRC}/crypto/aes/asm \
13         ${LCRYPTO_SRC}/crypto/bn/asm \
14         ${LCRYPTO_SRC}/crypto/camellia/asm \
15         ${LCRYPTO_SRC}/crypto/md5/asm \
16         ${LCRYPTO_SRC}/crypto/modes/asm \
17         ${LCRYPTO_SRC}/crypto/rc4/asm \
18         ${LCRYPTO_SRC}/crypto/rc5/asm \
19         ${LCRYPTO_SRC}/crypto/sha/asm \
20         ${LCRYPTO_SRC}/crypto/whrlpool/asm
21
22 # aes
23 SRCS=   aes-x86_64.pl aesni-sha1-x86_64.pl aesni-x86_64.pl bsaes-x86_64.pl \
24         vpaes-x86_64.pl
25
26 # bn
27 SRCS+=  modexp512-x86_64.pl x86_64-gf2m.pl x86_64-mont.pl x86_64-mont5.pl
28
29 # camellia
30 SRCS+=  cmll-x86_64.pl
31
32 # md5
33 SRCS+=  md5-x86_64.pl
34
35 # modes
36 SRCS+=  ghash-x86_64.pl
37
38 # rc4
39 SRCS+=  rc4-md5-x86_64.pl rc4-x86_64.pl
40
41 # sha
42 SRCS+=  sha1-x86_64.pl sha512-x86_64.pl
43
44 # whrlpool
45 SRCS+=  wp-x86_64.pl
46
47 ASM=    ${SRCS:S/.pl/.S/}
48 ASM+=   sha256-x86_64.S x86_64cpuid.S
49
50 all:    ${ASM}
51
52 CLEANFILES+=    ${SRCS:M*.pl:S/.pl$/.cmt/} ${SRCS:M*.pl:S/.pl$/.S/}
53 CLEANFILES+=    sha256-x86_64.cmt sha256-x86_64.S x86_64cpuid.cmt x86_64cpuid.S
54 .SUFFIXES:      .pl .cmt
55
56 .pl.cmt:
57         ( cd `dirname ${.IMPSRC}`/.. ; perl ${.IMPSRC} ${.OBJDIR}/${.TARGET} )
58
59 .cmt.S:
60         ( echo '        # $$'FreeBSD'$$'; cat ${.IMPSRC} ) > ${.TARGET}
61
62 sha256-x86_64.cmt: sha512-x86_64.pl
63         ( cd `dirname ${.ALLSRC}`/.. ; perl ${.ALLSRC} ${.OBJDIR}/${.TARGET} )
64
65 x86_64cpuid.cmt: x86_64cpuid.pl
66         ( cd `dirname ${.ALLSRC}` ; perl ${.ALLSRC} ${.OBJDIR}/${.TARGET} )
67
68 .elif ${MACHINE_CPUARCH} == "i386"
69
70 .PATH:  ${LCRYPTO_SRC}/crypto \
71         ${LCRYPTO_SRC}/crypto/aes/asm \
72         ${LCRYPTO_SRC}/crypto/bf/asm \
73         ${LCRYPTO_SRC}/crypto/bn/asm \
74         ${LCRYPTO_SRC}/crypto/camellia/asm \
75         ${LCRYPTO_SRC}/crypto/cast/asm \
76         ${LCRYPTO_SRC}/crypto/des/asm \
77         ${LCRYPTO_SRC}/crypto/md5/asm \
78         ${LCRYPTO_SRC}/crypto/modes/asm \
79         ${LCRYPTO_SRC}/crypto/rc4/asm \
80         ${LCRYPTO_SRC}/crypto/rc5/asm \
81         ${LCRYPTO_SRC}/crypto/ripemd/asm \
82         ${LCRYPTO_SRC}/crypto/sha/asm \
83         ${LCRYPTO_SRC}/crypto/whrlpool/asm
84
85 PERLPATH=       -I${LCRYPTO_SRC}/crypto/des/asm -I${LCRYPTO_SRC}/crypto/perlasm
86
87 # aes
88 SRCS=   aes-586.pl aesni-x86.pl vpaes-x86.pl
89
90 # blowfish
91 SRCS+=  bf-586.pl bf-686.pl
92
93 # bn
94 SRCS+=  bn-586.pl co-586.pl x86-gf2m.pl x86-mont.pl
95
96 # camellia
97 SRCS+=  cmll-x86.pl
98
99 # cast
100 SRCS+=  cast-586.pl
101
102 # des
103 SRCS+=  crypt586.pl des-586.pl
104
105 # md5
106 SRCS+=  md5-586.pl
107
108 # modes
109 SRCS+=  ghash-x86.pl
110
111 # rc4
112 SRCS+=  rc4-586.pl
113
114 # rc5
115 SRCS+=  rc5-586.pl
116
117 # ripemd
118 SRCS+=  rmd-586.pl
119
120 # sha
121 SRCS+=  sha1-586.pl sha256-586.pl sha512-586.pl
122
123 # whrlpool
124 SRCS+=  wp-mmx.pl
125
126 # cpuid
127 SRCS+=  x86cpuid.pl
128
129 ASM=    ${SRCS:S/.pl/.s/}
130
131 all:    ${ASM}
132
133 CLEANFILES+=    ${SRCS:M*.pl:S/.pl$/.s/}
134 .SUFFIXES:      .pl
135
136 .pl.s:
137         ( echo '        # $$'FreeBSD'$$' ;\
138         perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ) > ${.TARGET}
139 .endif
140
141 .include <bsd.prog.mk>