This time, get it right.
[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         sh $(TOP)/util/ranlib.sh $(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 >cx86unix.cpp)
71
72 files:
73         perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
74
75 links:
76         /bin/rm -f Makefile
77         $(TOP)/util/point.sh Makefile.ssl Makefile ;
78         $(TOP)/util/mklink.sh ../../include $(EXHEADER)
79         $(TOP)/util/mklink.sh ../../test $(TEST)
80         $(TOP)/util/mklink.sh ../../apps $(APPS)
81
82 install:
83         @for i in $(EXHEADER) ; \
84         do  \
85         (cp $$i $(INSTALLTOP)/include/$$i; \
86         chmod 644 $(INSTALLTOP)/include/$$i ); \
87         done;
88
89 tags:
90         ctags $(SRC)
91
92 tests:
93
94 lint:
95         lint -DLINT $(INCLUDES) $(SRC)>fluff
96
97 depend:
98         $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
99
100 dclean:
101         perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
102         mv -f Makefile.new $(MAKEFILE)
103
104 clean:
105         /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
106
107 errors:
108
109 # DO NOT DELETE THIS LINE -- make depend depends on it.
110
111 c_cfb64.o: cast.h cast_lcl.h
112 c_ecb.o: cast.h cast_lcl.h
113 c_enc.o: cast.h cast_lcl.h
114 c_ofb64.o: cast.h cast_lcl.h
115 c_skey.o: cast.h cast_lcl.h cast_s.h