Obey $(PERL) when running util/mklink.pl.
[openssl.git] / crypto / des / Makefile.ssl
1 #
2 # SSLeay/crypto/des/Makefile
3 #
4
5 DIR=    des
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 DES_ENC=        des_enc.o fcrypt_b.o
17 # or use
18 #DES_ENC=       dx86-elf.o yx86-elf.o
19
20 CFLAGS= $(INCLUDES) $(CFLAG)
21
22 GENERAL=Makefile
23 TEST=destest.c
24 APPS=
25
26 LIB=$(TOP)/libcrypto.a
27 LIBSRC= cbc_cksm.c cbc_enc.c  cfb64enc.c cfb_enc.c  \
28         ecb3_enc.c ecb_enc.c  enc_read.c enc_writ.c \
29         fcrypt.c ofb64enc.c ofb_enc.c  pcbc_enc.c \
30         qud_cksm.c rand_key.c read_pwd.c rpc_enc.c  set_key.c  \
31         des_enc.c fcrypt_b.c read2pwd.c \
32         fcrypt.c xcbc_enc.c \
33         str2key.c  cfb64ede.c ofb64ede.c supp.c ede_cbcm_enc.c
34
35 LIBOBJ= set_key.o  ecb_enc.o  cbc_enc.o \
36         ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o  ofb64ede.o \
37         enc_read.o enc_writ.o ofb64enc.o \
38         ofb_enc.o  str2key.o  pcbc_enc.o qud_cksm.o rand_key.o \
39         ${DES_ENC} read2pwd.o \
40         fcrypt.o xcbc_enc.o read_pwd.o rpc_enc.o  cbc_cksm.o supp.o \
41         ede_cbcm_enc.o
42
43 SRC= $(LIBSRC)
44
45 EXHEADER= des.h
46 HEADER= des_locl.h rpc_des.h podd.h sk.h spr.h des_ver.h $(EXHEADER)
47
48 ALL=    $(GENERAL) $(SRC) $(HEADER)
49
50 top:
51         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
52
53 all:    lib
54
55 lib:    $(LIBOBJ)
56         $(AR) $(LIB) $(LIBOBJ)
57         $(RANLIB) $(LIB)
58         @touch lib
59
60 # elf
61 asm/dx86-elf.o: asm/dx86unix.cpp
62         $(CPP) -DELF asm/dx86unix.cpp | as -o asm/dx86-elf.o
63
64 asm/yx86-elf.o: asm/yx86unix.cpp
65         $(CPP) -DELF asm/yx86unix.cpp | as -o asm/yx86-elf.o
66
67 # solaris
68 asm/dx86-sol.o: asm/dx86unix.cpp
69         $(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
70         as -o asm/dx86-sol.o asm/dx86-sol.s
71         rm -f asm/dx86-sol.s
72
73 asm/yx86-sol.o: asm/yx86unix.cpp
74         $(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
75         as -o asm/yx86-sol.o asm/yx86-sol.s
76         rm -f asm/yx86-sol.s
77
78 # a.out
79 asm/dx86-out.o: asm/dx86unix.cpp
80         $(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o
81
82 asm/yx86-out.o: asm/yx86unix.cpp
83         $(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o
84
85 # bsdi
86 asm/dx86bsdi.o: asm/dx86unix.cpp
87         $(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o
88
89 asm/yx86bsdi.o: asm/yx86unix.cpp
90         $(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o
91
92 asm/dx86unix.cpp: asm/des-586.pl
93         (cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp)
94
95 asm/yx86unix.cpp: asm/crypt586.pl
96         (cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
97
98 files:
99         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
100
101 links:
102         @$(TOP)/util/point.sh Makefile.ssl Makefile
103         @$(TOP)/util/point.sh ../../perlasm asm/perlasm
104         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
105         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
106         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
107
108 install: installs
109
110 installs:
111         @for i in $(EXHEADER) ; \
112         do  \
113         (cp $$i $(INSTALLTOP)/include/openssl/$$i; \
114         chmod 644 $(INSTALLTOP)/include/openssl/$$i ); \
115         done;
116
117 tags:
118         ctags $(SRC)
119
120 tests:
121
122 lint:
123         lint -DLINT $(INCLUDES) $(SRC)>fluff
124
125 depend:
126         $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
127
128 dclean:
129         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
130         mv -f Makefile.new $(MAKEFILE)
131
132 clean:
133         rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
134
135 # DO NOT DELETE THIS LINE -- make depend depends on it.
136
137 cbc_cksm.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
138 cbc_cksm.o: des_locl.h
139 cbc_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
140 cbc_enc.o: des_locl.h
141 cfb64ede.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
142 cfb64ede.o: des_locl.h
143 cfb64enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
144 cfb64enc.o: des_locl.h
145 cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
146 cfb_enc.o: des_locl.h
147 des_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
148 des_enc.o: des_locl.h
149 ecb3_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
150 ecb3_enc.o: des_locl.h
151 ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
152 ecb_enc.o: ../../include/openssl/opensslv.h des_locl.h spr.h
153 ede_cbcm_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
154 ede_cbcm_enc.o: des_locl.h
155 enc_read.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
156 enc_read.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
157 enc_read.o: ../../include/openssl/e_os.h ../../include/openssl/err.h
158 enc_read.o: ../../include/openssl/opensslconf.h
159 enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
160 enc_read.o: ../cryptlib.h des_locl.h
161 enc_writ.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
162 enc_writ.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
163 enc_writ.o: ../../include/openssl/e_os.h ../../include/openssl/err.h
164 enc_writ.o: ../../include/openssl/opensslconf.h
165 enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
166 enc_writ.o: ../cryptlib.h des_locl.h
167 fcrypt.o: ../../include/openssl/des.h ../../include/openssl/des.h
168 fcrypt.o: ../../include/openssl/opensslconf.h
169 fcrypt.o: ../../include/openssl/opensslconf.h des_locl.h des_locl.h
170 fcrypt_b.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
171 fcrypt_b.o: des_locl.h
172 ofb64ede.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
173 ofb64ede.o: des_locl.h
174 ofb64enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
175 ofb64enc.o: des_locl.h
176 ofb_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
177 ofb_enc.o: des_locl.h
178 pcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
179 pcbc_enc.o: des_locl.h
180 qud_cksm.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
181 qud_cksm.o: des_locl.h
182 rand_key.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
183 rand_key.o: des_locl.h
184 read2pwd.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
185 read2pwd.o: des_locl.h
186 read_pwd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
187 read_pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
188 read_pwd.o: ../../include/openssl/e_os.h ../../include/openssl/err.h
189 read_pwd.o: ../../include/openssl/opensslconf.h
190 read_pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
191 read_pwd.o: ../cryptlib.h des_locl.h
192 rpc_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
193 rpc_enc.o: des_locl.h des_ver.h rpc_des.h
194 set_key.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
195 set_key.o: des_locl.h podd.h sk.h
196 str2key.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
197 str2key.o: des_locl.h
198 supp.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
199 supp.o: des_locl.h
200 xcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/opensslconf.h
201 xcbc_enc.o: des_locl.h