Import of old SSLeay release: SSLeay 0.8.1b
[openssl.git] / crypto / bn / Makefile.ssl
1 #
2 # SSLeay/crypto/bn/Makefile
3 #
4
5 DIR=    bn
6 TOP=    ../..
7 CC=     cc
8 INCLUDES= -I.. -I../../include
9 CFLAG=-g
10 INSTALLTOP=/usr/local/ssl
11 MAKE=           make -f Makefile.ssl
12 MAKEDEPEND=     makedepend -f Makefile.ssl
13 MAKEFILE=       Makefile.ssl
14 BN_MULW=        bn_mulw.o
15 AR=             ar r
16
17 CFLAGS= $(INCLUDES) $(CFLAG)
18
19 ERR=bn
20 ERRC=bn_err
21 GENERAL=Makefile
22 TEST=bntest.c exptest.c
23 APPS=
24
25 LIB=$(TOP)/libcrypto.a
26 LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c bn_mul.c \
27         bn_print.c bn_rand.c bn_shift.c bn_sub.c bn_word.c \
28         bn_gcd.c bn_prime.c $(ERRC).c bn_sqr.c bn_mulw.c bn_recp.c bn_mont.c
29
30 LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_mod.o bn_mul.o \
31         bn_print.o bn_rand.o bn_shift.o bn_sub.o bn_word.o \
32         bn_gcd.o bn_prime.o $(ERRC).o bn_sqr.o $(BN_MULW) bn_recp.o bn_mont.o
33
34
35 SRC= $(LIBSRC)
36
37 EXHEADER= bn.h
38 HEADER= bn_lcl.h bn_prime.h $(EXHEADER)
39
40 ALL=    $(GENERAL) $(SRC) $(HEADER)
41
42 top:
43         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
44
45 all:    lib
46
47 knuth: bn_knuth.c
48         cc -pg -I.. -I../../include bn_knuth.c -o knuth $(LIB) #../../../libefence.a
49
50 knuth.fast: bn_knuth.c
51         cc -pg -fast -I.. -I../../include bn_knuth.c -o knuth $(LIB) #../../../libefence.a
52
53
54 lib:    $(LIBOBJ)
55         $(AR) $(LIB) $(LIBOBJ)
56         sh $(TOP)/util/ranlib.sh $(LIB)
57         @touch lib
58
59 files:
60         perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
61
62 links:
63         /bin/rm -f Makefile
64         $(TOP)/util/point.sh Makefile.ssl Makefile ;
65         $(TOP)/util/mklink.sh ../../include $(EXHEADER)
66         $(TOP)/util/mklink.sh ../../test $(TEST)
67         $(TOP)/util/mklink.sh ../../apps $(APPS)
68
69 install:
70         @for i in $(EXHEADER) ; \
71         do  \
72         (cp $$i $(INSTALLTOP)/include/$$i; \
73         chmod 644 $(INSTALLTOP)/include/$$i ); \
74         done;
75
76 exptest:
77         /bin/rm -f exptest
78         gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
79
80 div:
81         /bin/rm -f a.out
82         gcc -I.. -g div.c ../../libcrypto.a
83
84 tags:
85         ctags $(SRC)
86
87 tests:
88
89 lint:
90         lint -DLINT $(INCLUDES) $(SRC)>fluff
91
92 depend:
93         $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
94
95 dclean:
96         perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
97         mv -f Makefile.new $(MAKEFILE)
98
99 clean:
100         /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_mulw.s
101
102 errors:
103         perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).org # special case .org
104         perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h
105         perl ../err/err_genc.pl $(ERR).h $(ERRC).c
106
107 # DO NOT DELETE THIS LINE -- make depend depends on it.