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