summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/Makefile.ssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/Makefile.ssl')
-rw-r--r--src/lib/libcrypto/bn/Makefile.ssl215
1 files changed, 179 insertions, 36 deletions
diff --git a/src/lib/libcrypto/bn/Makefile.ssl b/src/lib/libcrypto/bn/Makefile.ssl
index 9809d26cbc..fcabb62452 100644
--- a/src/lib/libcrypto/bn/Makefile.ssl
+++ b/src/lib/libcrypto/bn/Makefile.ssl
@@ -7,35 +7,35 @@ TOP= ../..
7CC= cc 7CC= cc
8INCLUDES= -I.. -I../../include 8INCLUDES= -I.. -I../../include
9CFLAG=-g 9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
10INSTALLTOP=/usr/local/ssl 12INSTALLTOP=/usr/local/ssl
11MAKE= make -f Makefile.ssl 13MAKE= make -f Makefile.ssl
12MAKEDEPEND= makedepend -f Makefile.ssl 14MAKEDEPEND= $(TOP)/util/domd $(TOP)
13MAKEFILE= Makefile.ssl 15MAKEFILE= Makefile.ssl
14AR= ar r 16AR= ar r
15 17
16BN_MULW= bn_mulw.o 18BN_ASM= bn_asm.o
17# or use 19# or use
18#BN_MULW= bn86-elf.o 20#BN_ASM= bn86-elf.o
19 21
20CFLAGS= $(INCLUDES) $(CFLAG) 22CFLAGS= $(INCLUDES) $(CFLAG)
23ASFLAGS=$(CFLAGS)
21 24
22ERR=bn
23ERRC=bn_err
24GENERAL=Makefile 25GENERAL=Makefile
25TEST=bntest.c exptest.c 26TEST=bntest.c exptest.c
26APPS= 27APPS=
27 28
28LIB=$(TOP)/libcrypto.a 29LIB=$(TOP)/libcrypto.a
29LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c bn_mul.c \ 30LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mul.c \
30 bn_print.c bn_rand.c bn_shift.c bn_sub.c bn_word.c bn_blind.c \ 31 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
31 bn_gcd.c bn_prime.c $(ERRC).c bn_sqr.c bn_mulw.c bn_recp.c bn_mont.c \ 32 bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c bn_recp.c bn_mont.c \
32 bn_mpi.c 33 bn_mpi.c bn_exp2.c
33
34LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_mod.o bn_mul.o \
35 bn_print.o bn_rand.o bn_shift.o bn_sub.o bn_word.o bn_blind.o \
36 bn_gcd.o bn_prime.o $(ERRC).o bn_sqr.o $(BN_MULW) bn_recp.o bn_mont.o \
37 bn_mpi.o
38 34
35LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_mul.o \
36 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
37 bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) bn_recp.o bn_mont.o \
38 bn_mpi.o bn_exp2.o
39 39
40SRC= $(LIBSRC) 40SRC= $(LIBSRC)
41 41
@@ -58,53 +58,90 @@ knuth.fast: bn_knuth.c
58 58
59lib: $(LIBOBJ) 59lib: $(LIBOBJ)
60 $(AR) $(LIB) $(LIBOBJ) 60 $(AR) $(LIB) $(LIBOBJ)
61 sh $(TOP)/util/ranlib.sh $(LIB) 61 $(RANLIB) $(LIB)
62 @touch lib 62 @touch lib
63 63
64# elf 64# elf
65asm/bn86-elf.o: asm/bn86unix.cpp 65asm/bn86-elf.o: asm/bn86unix.cpp
66 $(CPP) -DELF asm/bn86unix.cpp | as -o asm/bn86-elf.o 66 $(CPP) -DELF asm/bn86unix.cpp | as -o asm/bn86-elf.o
67 67
68asm/co86-elf.o: asm/co86unix.cpp
69 $(CPP) -DELF asm/co86unix.cpp | as -o asm/co86-elf.o
70
68# solaris 71# solaris
69asm/bn86-sol.o: asm/bn86unix.cpp 72asm/bn86-sol.o: asm/bn86unix.cpp
70 $(CC) -E -DSOL asm/bn86unix.cpp | sed 's/^#.*//' > asm/bn86-sol.s 73 $(CC) -E -DSOL asm/bn86unix.cpp | sed 's/^#.*//' > asm/bn86-sol.s
71 as -o asm/bn86-sol.o asm/bn86-sol.s 74 as -o asm/bn86-sol.o asm/bn86-sol.s
72 rm -f asm/bn86-sol.s 75 rm -f asm/bn86-sol.s
73 76
77asm/co86-sol.o: asm/co86unix.cpp
78 $(CC) -E -DSOL asm/co86unix.cpp | sed 's/^#.*//' > asm/co86-sol.s
79 as -o asm/co86-sol.o asm/co86-sol.s
80 rm -f asm/co86-sol.s
81
74# a.out 82# a.out
75asm/bn86-out.o: asm/bn86unix.cpp 83asm/bn86-out.o: asm/bn86unix.cpp
76 $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o 84 $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o
77 85
86asm/co86-out.o: asm/co86unix.cpp
87 $(CPP) -DOUT asm/co86unix.cpp | as -o asm/co86-out.o
88
78# bsdi 89# bsdi
79asm/bn86bsdi.o: asm/bn86unix.cpp 90asm/bn86bsdi.o: asm/bn86unix.cpp
80 $(CPP) -DBSDI asm/bn86unix.cpp | as -o asm/bn86bsdi.o 91 $(CPP) -DBSDI asm/bn86unix.cpp | sed 's/ :/:/' | as -o asm/bn86bsdi.o
92
93asm/co86bsdi.o: asm/co86unix.cpp
94 $(CPP) -DBSDI asm/co86unix.cpp | sed 's/ :/:/' | as -o asm/co86bsdi.o
95
96asm/bn86unix.cpp: asm/bn-586.pl
97 (cd asm; $(PERL) bn-586.pl cpp >bn86unix.cpp )
98
99asm/co86unix.cpp: asm/co-586.pl
100 (cd asm; $(PERL) co-586.pl cpp >co86unix.cpp )
81 101
82asm/bn86unix.cpp: 102asm/sparcv8.o: asm/sparcv8.S
83 (cd asm; perl bn-586.pl cpp >bn86unix.cpp ) 103
104asm/sparcv8plus.o: asm/sparcv8plus.S
105
106# Old GNU assembler doesn't understand V9 instructions, so we
107# hire /usr/ccs/bin/as to do the job. Note that option is called
108# *-gcc27, but even gcc 2>=8 users may experience similar problem
109# if they didn't bother to upgrade GNU assembler. Such users should
110# not choose this option, but be adviced to *remove* GNU assembler
111# or upgrade it.
112asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S
113 $(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
114 /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o
115
116# MIPS 64 bit assember
117asm/mips3.o: asm/mips3.s
118
119# MIPS 32 bit assember
120asm/mips1.o: asm/mips1.s
121 /usr/bin/as -O2 -o asm/mips1.o asm/mips1.s
84 122
85files: 123files:
86 perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO 124 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
87 125
88links: 126links:
89 /bin/rm -f Makefile 127 @$(TOP)/util/point.sh Makefile.ssl Makefile
90 $(TOP)/util/point.sh Makefile.ssl Makefile ; 128 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
91 $(TOP)/util/mklink.sh ../../include $(EXHEADER) 129 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
92 $(TOP)/util/mklink.sh ../../test $(TEST) 130 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
93 $(TOP)/util/mklink.sh ../../apps $(APPS)
94 131
95install: 132install:
96 @for i in $(EXHEADER) ; \ 133 @for i in $(EXHEADER) ; \
97 do \ 134 do \
98 (cp $$i $(INSTALLTOP)/include/$$i; \ 135 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
99 chmod 644 $(INSTALLTOP)/include/$$i ); \ 136 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
100 done; 137 done;
101 138
102exptest: 139exptest:
103 /bin/rm -f exptest 140 rm -f exptest
104 gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a 141 gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
105 142
106div: 143div:
107 /bin/rm -f a.out 144 rm -f a.out
108 gcc -I.. -g div.c ../../libcrypto.a 145 gcc -I.. -g div.c ../../libcrypto.a
109 146
110tags: 147tags:
@@ -116,18 +153,124 @@ lint:
116 lint -DLINT $(INCLUDES) $(SRC)>fluff 153 lint -DLINT $(INCLUDES) $(SRC)>fluff
117 154
118depend: 155depend:
119 $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) 156 $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
120 157
121dclean: 158dclean:
122 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new 159 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
123 mv -f Makefile.new $(MAKEFILE) 160 mv -f Makefile.new $(MAKEFILE)
124 161
125clean: 162clean:
126 /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_mulw.s 163 rm -f asm/co86unix.cpp asm/bn86unix.cpp *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
127
128errors:
129 perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).org # special case .org
130 perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h
131 perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c
132 164
133# DO NOT DELETE THIS LINE -- make depend depends on it. 165# DO NOT DELETE THIS LINE -- make depend depends on it.
166
167bn_add.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
168bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
169bn_add.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
170bn_add.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
171bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
172bn_add.o: ../cryptlib.h bn_lcl.h
173bn_asm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
174bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
175bn_asm.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
176bn_asm.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
177bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
178bn_asm.o: ../cryptlib.h bn_lcl.h
179bn_blind.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
180bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
181bn_blind.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
182bn_blind.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
183bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
184bn_blind.o: ../cryptlib.h bn_lcl.h
185bn_div.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
186bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
187bn_div.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
188bn_div.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
189bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
190bn_div.o: ../cryptlib.h bn_lcl.h
191bn_err.o: ../../include/openssl/bn.h ../../include/openssl/err.h
192bn_err.o: ../../include/openssl/opensslconf.h
193bn_exp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
194bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
195bn_exp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
196bn_exp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
197bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
198bn_exp.o: ../cryptlib.h bn_lcl.h
199bn_exp2.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
200bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
201bn_exp2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
202bn_exp2.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
203bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
204bn_exp2.o: ../cryptlib.h bn_lcl.h
205bn_gcd.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
206bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
207bn_gcd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
208bn_gcd.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
209bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
210bn_gcd.o: ../cryptlib.h bn_lcl.h
211bn_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
212bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
213bn_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
214bn_lib.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
215bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
216bn_lib.o: ../cryptlib.h bn_lcl.h
217bn_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
218bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
219bn_mont.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
220bn_mont.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
221bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
222bn_mont.o: ../cryptlib.h bn_lcl.h
223bn_mpi.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
224bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
225bn_mpi.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
226bn_mpi.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
227bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
228bn_mpi.o: ../cryptlib.h bn_lcl.h
229bn_mul.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
230bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
231bn_mul.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
232bn_mul.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
233bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
234bn_mul.o: ../cryptlib.h bn_lcl.h
235bn_prime.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
236bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
237bn_prime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
238bn_prime.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
239bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
240bn_prime.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_prime.h
241bn_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
242bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
243bn_print.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
244bn_print.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
245bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
246bn_print.o: ../cryptlib.h bn_lcl.h
247bn_rand.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
248bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
249bn_rand.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
250bn_rand.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
251bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
252bn_rand.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h
253bn_recp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
254bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
255bn_recp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
256bn_recp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
257bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
258bn_recp.o: ../cryptlib.h bn_lcl.h
259bn_shift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
260bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
261bn_shift.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
262bn_shift.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
263bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
264bn_shift.o: ../cryptlib.h bn_lcl.h
265bn_sqr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
266bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
267bn_sqr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
268bn_sqr.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
269bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
270bn_sqr.o: ../cryptlib.h bn_lcl.h
271bn_word.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
272bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
273bn_word.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
274bn_word.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
275bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
276bn_word.o: ../cryptlib.h bn_lcl.h