New Configure option no-<cipher> (rsa, idea, rc5, ...).
[openssl.git] / crypto / cast / Makefile.ssl
1 #
2 # SSLeay/crypto/cast/Makefile
3 #
4
5 DIR=    cast
6 TOP=    ../..
7 CC=     cc
8 CPP=    $(CC) -E
9 INCLUDES=
10 CFLAG=-g
11 INSTALLTOP=/usr/local/ssl
12 MAKE=           make -f Makefile.ssl
13 MAKEDEPEND=     $(TOP)/util/domd $(TOP)
14 MAKEFILE=       Makefile.ssl
15 AR=             ar r
16
17 CAST_ENC=c_enc.o
18 # or use
19 #CAST_ENC=asm/cx86-elf.o
20 #CAST_ENC=asm/cx86-out.o
21 #CAST_ENC=asm/cx86-sol.o
22 #CAST_ENC=asm/cx86bdsi.o
23
24 CFLAGS= $(INCLUDES) $(CFLAG)
25
26 GENERAL=Makefile
27 TEST=casttest.c
28 APPS=
29
30 LIB=$(TOP)/libcrypto.a
31 LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c 
32 LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
33
34 SRC= $(LIBSRC)
35
36 EXHEADER= cast.h
37 HEADER= cast_s.h cast_lcl.h $(EXHEADER)
38
39 ALL=    $(GENERAL) $(SRC) $(HEADER)
40
41 top:
42         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
43
44 all:    lib
45
46 lib:    $(LIBOBJ)
47         $(AR) $(LIB) $(LIBOBJ)
48         $(RANLIB) $(LIB)
49         @touch lib
50
51 # elf
52 asm/cx86-elf.o: asm/cx86unix.cpp
53         $(CPP) -DELF asm/cx86unix.cpp | as -o asm/cx86-elf.o
54
55 # solaris
56 asm/cx86-sol.o: asm/cx86unix.cpp
57         $(CC) -E -DSOL asm/cx86unix.cpp | sed 's/^#.*//' > asm/cx86-sol.s
58         as -o asm/cx86-sol.o asm/cx86-sol.s
59         rm -f asm/cx86-sol.s
60
61 # a.out
62 asm/cx86-out.o: asm/cx86unix.cpp
63         $(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o
64
65 # bsdi
66 asm/cx86bsdi.o: asm/cx86unix.cpp
67         $(CPP) -DBSDI asm/cx86unix.cpp | sed 's/ :/:/' | as -o asm/cx86bsdi.o
68
69 asm/cx86unix.cpp: asm/cast-586.pl
70         (cd asm; $(PERL) cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp)
71
72 files:
73         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
74
75 links:
76         @$(TOP)/util/point.sh Makefile.ssl Makefile
77         @$(TOP)/util/mklink.sh ../../include/openssl $(EXHEADER)
78         @$(TOP)/util/mklink.sh ../../test $(TEST)
79         @$(TOP)/util/mklink.sh ../../apps $(APPS)
80
81 install:
82         @for i in $(EXHEADER) ; \
83         do  \
84         (cp $$i $(INSTALLTOP)/include/openssl/$$i; \
85         chmod 644 $(INSTALLTOP)/include/openssl/$$i ); \
86         done;
87
88 tags:
89         ctags $(SRC)
90
91 tests:
92
93 lint:
94         lint -DLINT $(INCLUDES) $(SRC)>fluff
95
96 depend:
97         $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
98
99 dclean:
100         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
101         mv -f Makefile.new $(MAKEFILE)
102
103 clean:
104         rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
105
106 # DO NOT DELETE THIS LINE -- make depend depends on it.
107
108 c_cfb64.o: ../../include/openssl/cast.h cast_lcl.h
109 c_ecb.o: ../../include/openssl/cast.h ../../include/openssl/opensslv.h
110 c_ecb.o: cast_lcl.h
111 c_enc.o: ../../include/openssl/cast.h cast_lcl.h
112 c_ofb64.o: ../../include/openssl/cast.h cast_lcl.h
113 c_skey.o: ../../include/openssl/cast.h cast_lcl.h cast_s.h