]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/bn/Makefile.ssl
modular arithmetics
[thirdparty/openssl.git] / crypto / bn / Makefile.ssl
CommitLineData
d02b48c6
RE
1#
2# SSLeay/crypto/bn/Makefile
3#
4
5DIR= bn
6TOP= ../..
7CC= cc
623bb80b 8CPP= $(CC) -E
d02b48c6
RE
9INCLUDES= -I.. -I../../include
10CFLAG=-g
e5f3045f
BM
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
d02b48c6
RE
13INSTALLTOP=/usr/local/ssl
14MAKE= make -f Makefile.ssl
8039257d 15MAKEDEPEND= $(TOP)/util/domd $(TOP)
d02b48c6 16MAKEFILE= Makefile.ssl
d02b48c6
RE
17AR= ar r
18
dfeab068 19BN_ASM= bn_asm.o
58964a49 20# or use
dfeab068 21#BN_ASM= bn86-elf.o
58964a49 22
d02b48c6 23CFLAGS= $(INCLUDES) $(CFLAG)
b96eb06f
AP
24
25# We let the C compiler driver to take care of .s files. This is done in
26# order to be excused from maintaining a separate set of architecture
27# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
28# gcc, then the driver will automatically translate it to -xarch=v8plus
29# and pass it down to assembler.
30AS=$(CC) -c
7363455f 31ASFLAGS=$(CFLAGS)
d02b48c6 32
d02b48c6
RE
33GENERAL=Makefile
34TEST=bntest.c exptest.c
35APPS=
36
37LIB=$(TOP)/libcrypto.a
78a0c1f1 38LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
dfeab068 39 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
73934800 40 bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c bn_recp.c bn_mont.c \
dfeab068 41 bn_mpi.c bn_exp2.c
d02b48c6 42
78a0c1f1 43LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
dfeab068 44 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
73934800 45 bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) bn_recp.o bn_mont.o \
dfeab068 46 bn_mpi.o bn_exp2.o
d02b48c6
RE
47
48SRC= $(LIBSRC)
49
50EXHEADER= bn.h
51HEADER= bn_lcl.h bn_prime.h $(EXHEADER)
52
53ALL= $(GENERAL) $(SRC) $(HEADER)
54
55top:
56 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
57
58all: lib
59
e4b76456
BM
60bn_prime.h: bn_prime.pl
61 $(PERL) bn_prime.pl >bn_prime.h
62
775c63fc 63divtest: divtest.c ../../libcrypto.a
17dddc05 64 cc -I../../include divtest.c -o divtest ../../libcrypto.a
d02b48c6 65
1070e0e2 66bnbug: bnbug.c ../../libcrypto.a top
775c63fc
UM
67 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
68
d02b48c6
RE
69lib: $(LIBOBJ)
70 $(AR) $(LIB) $(LIBOBJ)
4e20a4e6
RL
71 @echo You may get an error following this line. Please ignore.
72 - $(RANLIB) $(LIB)
d02b48c6
RE
73 @touch lib
74
58964a49
RE
75# elf
76asm/bn86-elf.o: asm/bn86unix.cpp
3a6a39c3 77 $(CPP) -DELF -x c asm/bn86unix.cpp | as -o asm/bn86-elf.o
58964a49 78
dfeab068 79asm/co86-elf.o: asm/co86unix.cpp
3a6a39c3 80 $(CPP) -DELF -x c asm/co86unix.cpp | as -o asm/co86-elf.o
dfeab068 81
58964a49
RE
82# solaris
83asm/bn86-sol.o: asm/bn86unix.cpp
84 $(CC) -E -DSOL asm/bn86unix.cpp | sed 's/^#.*//' > asm/bn86-sol.s
85 as -o asm/bn86-sol.o asm/bn86-sol.s
86 rm -f asm/bn86-sol.s
87
dfeab068
RE
88asm/co86-sol.o: asm/co86unix.cpp
89 $(CC) -E -DSOL asm/co86unix.cpp | sed 's/^#.*//' > asm/co86-sol.s
90 as -o asm/co86-sol.o asm/co86-sol.s
91 rm -f asm/co86-sol.s
92
58964a49
RE
93# a.out
94asm/bn86-out.o: asm/bn86unix.cpp
95 $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o
96
dfeab068
RE
97asm/co86-out.o: asm/co86unix.cpp
98 $(CPP) -DOUT asm/co86unix.cpp | as -o asm/co86-out.o
99
58964a49
RE
100# bsdi
101asm/bn86bsdi.o: asm/bn86unix.cpp
dfeab068
RE
102 $(CPP) -DBSDI asm/bn86unix.cpp | sed 's/ :/:/' | as -o asm/bn86bsdi.o
103
104asm/co86bsdi.o: asm/co86unix.cpp
105 $(CPP) -DBSDI asm/co86unix.cpp | sed 's/ :/:/' | as -o asm/co86bsdi.o
58964a49 106
743e7be9 107asm/bn86unix.cpp: asm/bn-586.pl ../perlasm/x86asm.pl
99aab161 108 (cd asm; $(PERL) bn-586.pl cpp >bn86unix.cpp )
58964a49 109
743e7be9 110asm/co86unix.cpp: asm/co-586.pl ../perlasm/x86asm.pl
99aab161 111 (cd asm; $(PERL) co-586.pl cpp >co86unix.cpp )
dfeab068 112
5e85b6ab 113asm/sparcv8.o: asm/sparcv8.S
5e85b6ab 114
49dce898 115asm/sparcv8plus.o: asm/sparcv8plus.S
4f5fac80 116
1656ef29
AP
117# Old GNU assembler doesn't understand V9 instructions, so we
118# hire /usr/ccs/bin/as to do the job. Note that option is called
119# *-gcc27, but even gcc 2>=8 users may experience similar problem
120# if they didn't bother to upgrade GNU assembler. Such users should
121# not choose this option, but be adviced to *remove* GNU assembler
122# or upgrade it.
123asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S
124 $(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
125 /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o
744029c1 126
d02b48c6 127files:
99aab161 128 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
d02b48c6
RE
129
130links:
bb8f3c58 131 @$(TOP)/util/point.sh Makefile.ssl Makefile
1314c344
BM
132 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
133 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
134 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
d02b48c6
RE
135
136install:
137 @for i in $(EXHEADER) ; \
138 do \
e5f3045f
BM
139 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
140 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
d02b48c6
RE
141 done;
142
143exptest:
bb8f3c58 144 rm -f exptest
d02b48c6
RE
145 gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
146
147div:
bb8f3c58 148 rm -f a.out
d02b48c6
RE
149 gcc -I.. -g div.c ../../libcrypto.a
150
151tags:
152 ctags $(SRC)
153
154tests:
155
156lint:
157 lint -DLINT $(INCLUDES) $(SRC)>fluff
158
159depend:
f5d7a031 160 $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
d02b48c6
RE
161
162dclean:
99aab161 163 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
d02b48c6
RE
164 mv -f Makefile.new $(MAKEFILE)
165
166clean:
436a376b 167 rm -f asm/co86unix.cpp asm/bn86unix.cpp *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
d02b48c6 168
d02b48c6 169# DO NOT DELETE THIS LINE -- make depend depends on it.
6242bb9c 170
bf57da07
BM
171bn_add.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
172bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 173bn_add.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
174bn_add.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
175bn_add.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
176bn_add.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 177bn_add.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
178bn_asm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
179bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 180bn_asm.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
181bn_asm.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
182bn_asm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
183bn_asm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 184bn_asm.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
185bn_blind.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
186bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 187bn_blind.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
188bn_blind.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
189bn_blind.o: ../../include/openssl/opensslconf.h
dd9d233e 190bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
62ab514e
RL
191bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
192bn_blind.o: ../cryptlib.h bn_lcl.h
37e48b88
BM
193bn_ctx.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
194bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
195bn_ctx.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
196bn_ctx.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
197bn_ctx.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
198bn_ctx.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 199bn_ctx.o: ../../include/openssl/symhacks.h ../cryptlib.h
bf57da07
BM
200bn_div.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
201bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 202bn_div.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
203bn_div.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
204bn_div.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
205bn_div.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 206bn_div.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
1c4f90a0
GT
207bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
208bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/err.h
209bn_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
210bn_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
62ab514e 211bn_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bf57da07
BM
212bn_exp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
213bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 214bn_exp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
215bn_exp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
216bn_exp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
217bn_exp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 218bn_exp.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
219bn_exp2.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
220bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 221bn_exp2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
222bn_exp2.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
223bn_exp2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
224bn_exp2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 225bn_exp2.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
226bn_gcd.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
227bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 228bn_gcd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
229bn_gcd.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
230bn_gcd.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
231bn_gcd.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 232bn_gcd.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
233bn_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
234bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 235bn_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
236bn_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
237bn_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
238bn_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 239bn_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
78a0c1f1
BM
240bn_mod.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
241bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
242bn_mod.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
243bn_mod.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
244bn_mod.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
245bn_mod.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
246bn_mod.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
247bn_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
248bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 249bn_mont.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
250bn_mont.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
251bn_mont.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
252bn_mont.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 253bn_mont.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
254bn_mpi.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
255bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 256bn_mpi.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
257bn_mpi.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
258bn_mpi.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
259bn_mpi.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 260bn_mpi.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
261bn_mul.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
262bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 263bn_mul.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
264bn_mul.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
265bn_mul.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
266bn_mul.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 267bn_mul.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
268bn_prime.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
269bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 270bn_prime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
271bn_prime.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
272bn_prime.o: ../../include/openssl/opensslconf.h
bf57da07 273bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
dd9d233e 274bn_prime.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 275bn_prime.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_prime.h
bf57da07
BM
276bn_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
277bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 278bn_print.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
279bn_print.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
280bn_print.o: ../../include/openssl/opensslconf.h
dd9d233e 281bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
62ab514e
RL
282bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
283bn_print.o: ../cryptlib.h bn_lcl.h
bf57da07
BM
284bn_rand.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
285bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 286bn_rand.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
287bn_rand.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
288bn_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
289bn_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
62ab514e
RL
290bn_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
291bn_rand.o: ../cryptlib.h bn_lcl.h
bf57da07
BM
292bn_recp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
293bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 294bn_recp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
295bn_recp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
296bn_recp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
297bn_recp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 298bn_recp.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
299bn_shift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
300bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 301bn_shift.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
302bn_shift.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
303bn_shift.o: ../../include/openssl/opensslconf.h
dd9d233e 304bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
62ab514e
RL
305bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
306bn_shift.o: ../cryptlib.h bn_lcl.h
bf57da07
BM
307bn_sqr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
308bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 309bn_sqr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
310bn_sqr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
311bn_sqr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
312bn_sqr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 313bn_sqr.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bf57da07
BM
314bn_word.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
315bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
7e701817 316bn_word.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1c4f90a0
GT
317bn_word.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
318bn_word.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
319bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
62ab514e 320bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h