Add OpenSSL 0.9.7e.
[dragonfly.git] / crypto / openssl-0.9.7e / crypto / Makefile
1 #
2 # SSLeay/crypto/Makefile
3 #
4
5 DIR=            crypto
6 TOP=            ..
7 CC=             cc
8 INCLUDE=        -I. -I$(TOP) -I../include
9 INCLUDES=       -I.. -I../.. -I../../include
10 CFLAG=          -g
11 INSTALL_PREFIX=
12 OPENSSLDIR=     /usr/local/ssl
13 INSTALLTOP=     /usr/local/ssl
14 MAKEDEPPROG=    makedepend
15 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16 MAKEFILE=       Makefile
17 RM=             rm -f
18 AR=             ar r
19
20 PEX_LIBS=
21 EX_LIBS=
22  
23 CFLAGS= $(INCLUDE) $(CFLAG)
24
25
26 LIBS=
27
28 SDIRS=  md2 md5 sha mdc2 hmac ripemd \
29         des rc2 rc4 rc5 idea bf cast \
30         bn ec rsa dsa dh dso engine aes \
31         buffer bio stack lhash rand err objects \
32         evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
33
34 GENERAL=Makefile README crypto-lib.com install.com
35
36 LIB= $(TOP)/libcrypto.a
37 SHARED_LIB= libcrypto$(SHLIB_EXT)
38 LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c
39 LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o
40
41 SRC= $(LIBSRC)
42
43 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
44         ossl_typ.h
45 HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER)
46
47 ALL=    $(GENERAL) $(SRC) $(HEADER)
48
49 top:
50         @(cd ..; $(MAKE) DIRS=$(DIR) all)
51
52 all: shared
53
54 buildinf.h: ../Makefile
55         ( echo "#ifndef MK1MF_BUILD"; \
56         echo '  /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
57         echo '  #define CFLAGS "$(CC) $(CFLAG)"'; \
58         echo '  #define PLATFORM "$(PLATFORM)"'; \
59         echo "  #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
60         echo '#endif' ) >buildinf.h
61
62 testapps:
63         if echo ${SDIRS} | fgrep ' des '; \
64         then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi
65         cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps
66
67 subdirs:
68         @for i in $(SDIRS) ;\
69         do \
70         (cd $$i && echo "making all in crypto/$$i..." && \
71         $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
72         done;
73
74 files:
75         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
76         @for i in $(SDIRS) ;\
77         do \
78         (cd $$i && echo "making 'files' in crypto/$$i..." && \
79         $(MAKE) PERL='${PERL}' files ); \
80         done;
81
82 links:
83         @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
84         @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
85         @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
86         @for i in $(SDIRS); do \
87         (cd $$i && echo "making links in crypto/$$i..." && \
88         $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
89         done;
90
91 lib:    $(LIBOBJ)
92         $(AR) $(LIB) $(LIBOBJ)
93         $(RANLIB) $(LIB) || echo Never mind.
94         @touch lib
95
96 shared: buildinf.h lib subdirs
97         if [ -n "$(SHARED_LIBS)" ]; then \
98                 (cd ..; $(MAKE) $(SHARED_LIB)); \
99         fi
100
101 libs:
102         @for i in $(SDIRS) ;\
103         do \
104         (cd $$i && echo "making libs in crypto/$$i..." && \
105         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
106         done;
107
108 tests:
109         @for i in $(SDIRS) ;\
110         do \
111         (cd $$i && echo "making tests in crypto/$$i..." && \
112         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
113         done;
114
115 install:
116         @for i in $(EXHEADER) ;\
117         do \
118         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
119         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
120         done;
121         @for i in $(SDIRS) ;\
122         do \
123         (cd $$i && echo "making install in crypto/$$i..." && \
124         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}'  INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
125         done;
126
127 lint:
128         @for i in $(SDIRS) ;\
129         do \
130         (cd $$i && echo "making lint in crypto/$$i..." && \
131         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
132         done;
133
134 depend:
135         if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
136         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
137         if [ ! -s buildinf.h ]; then rm buildinf.h; fi
138         @for i in $(SDIRS) ;\
139         do \
140         (cd $$i && echo "making depend in crypto/$$i..." && \
141         $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
142         done;
143
144 clean:
145         rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
146         @for i in $(SDIRS) ;\
147         do \
148         (cd $$i && echo "making clean in crypto/$$i..." && \
149         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
150         done;
151
152 dclean:
153         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
154         mv -f Makefile.new $(MAKEFILE)
155         @for i in $(SDIRS) ;\
156         do \
157         (cd $$i && echo "making dclean in crypto/$$i..." && \
158         $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
159         done;
160
161 # DO NOT DELETE THIS LINE -- make depend depends on it.
162
163 cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
164 cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
165 cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
166 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
167 cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c
168 cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
169 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
170 cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
171 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
172 cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h
173 cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h
174 cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
175 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
176 cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
177 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
178 cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
179 cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
180 ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
181 ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
182 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
183 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
184 ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
185 ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h
186 ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c
187 mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
188 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
189 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
190 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
191 mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
192 mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
193 mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
194 mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
195 mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
196 mem_clr.o: ../include/openssl/symhacks.h mem_clr.c
197 mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
198 mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
199 mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
200 mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
201 mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
202 mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
203 o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
204 o_str.o: o_str.h
205 o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
206 o_time.o: o_time.h
207 tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
208 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
209 tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
210 tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
211 tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h
212 tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h
213 tmdiff.o: tmdiff.c
214 uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
215 uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
216 uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h
217 uid.o: ../include/openssl/symhacks.h uid.c