]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/Makefile.ssl
Changes concering RFC 3820 (proxy certificates) integration:
[thirdparty/openssl.git] / crypto / Makefile.ssl
CommitLineData
d02b48c6
RE
1#
2# SSLeay/crypto/Makefile
3#
4
5DIR= crypto
6TOP= ..
7CC= cc
41d2a336
RL
8INCLUDE= -I. -I$(TOP) -I../include
9INCLUDES= -I.. -I../.. -I../../include
d02b48c6 10CFLAG= -g
e5f3045f
BM
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
d02b48c6
RE
13INSTALLTOP= /usr/local/ssl
14MAKE= make -f Makefile.ssl
cf1b7d96
RL
15MAKEDEPPROG= makedepend
16MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
d02b48c6 17MAKEFILE= Makefile.ssl
bb8f3c58 18RM= rm -f
d02b48c6
RE
19AR= ar r
20
d02b48c6
RE
21PEX_LIBS=
22EX_LIBS=
23
664b9985 24CFLAGS= $(INCLUDE) $(CFLAG)
14e21f86 25ASFLAGS= $(INCLUDE) $(ASFLAG)
16760a30 26AFLAGS=$(ASFLAGS)
58964a49 27
d02b48c6
RE
28LIBS=
29
d87b79bf
RL
30SDIRS= objects \
31 md2 md4 md5 sha mdc2 hmac ripemd \
58964a49 32 des rc2 rc4 rc5 idea bf cast \
e172d60d 33 bn ec rsa dsa ecdsa ecdh dh dso engine aes \
d87b79bf 34 buffer bio stack lhash rand err \
a5db6fa5
RL
35 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
36 store
d02b48c6 37
7d7d2cbc 38GENERAL=Makefile README crypto-lib.com install.com
d02b48c6
RE
39
40LIB= $(TOP)/libcrypto.a
a7b42009 41SHARED_LIB= libcrypto$(SHLIB_EXT)
a2400fca 42LIBSRC= 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 o_dir.c
14e21f86 43LIBOBJ= 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 o_dir.o $(CPUID_OBJ)
d02b48c6
RE
44
45SRC= $(LIBSRC)
46
d66ace9d 47EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
114697be 48 ossl_typ.h
a2400fca 49HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER)
d02b48c6
RE
50
51ALL= $(GENERAL) $(SRC) $(HEADER)
52
53top:
54 @(cd ..; $(MAKE) DIRS=$(DIR) all)
55
919f8bcd 56all: shared
d02b48c6 57
664b9985 58buildinf.h: ../Makefile.ssl
57119943 59 ( echo "#ifndef MK1MF_BUILD"; \
1ed0c662
RL
60 echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
61 echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
62 echo ' #define PLATFORM "$(PLATFORM)"'; \
294bd1e2 63 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
1ed0c662 64 echo '#endif' ) >buildinf.h
d02b48c6 65
14e21f86
AP
66x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
67 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
ec38ddc7
AP
68x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
69 $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
16760a30
AP
70x86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl
71 $(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@
ec38ddc7 72
14e21f86
AP
73amd64cpuid.s: amd64cpuid.pl
74 $(PERL) amd64cpuid.pl $@
75ia64cpuid.s: ia64cpuid.S
76 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
77
b357e95c 78testapps:
63da21c0
BM
79 if echo ${SDIRS} | fgrep ' des '; \
80 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
5c42f62e
RL
81 if echo ${SDIRS} | fgrep ' pkcs7 '; \
82 then 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; fi
b357e95c 83
d02b48c6
RE
84subdirs:
85 @for i in $(SDIRS) ;\
86 do \
bb8f3c58 87 (cd $$i && echo "making all in crypto/$$i..." && \
1a01cad3 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
d02b48c6
RE
89 done;
90
91files:
99aab161 92 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
d02b48c6
RE
93 @for i in $(SDIRS) ;\
94 do \
b28ec124 95 (cd $$i && echo "making 'files' in crypto/$$i..." && \
5a9bab32 96 $(MAKE) PERL='${PERL}' files ); \
d02b48c6
RE
97 done;
98
99links:
79b42e76 100 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
1314c344
BM
101 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
102 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
103 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
79b42e76 104 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
bb8f3c58 105 @for i in $(SDIRS); do \
b28ec124 106 (cd $$i && echo "making links in crypto/$$i..." && \
6dc08dd6 107 $(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 ); \
d02b48c6
RE
108 done;
109
110lib: $(LIBOBJ)
111 $(AR) $(LIB) $(LIBOBJ)
4e20b1a6 112 $(RANLIB) $(LIB) || echo Never mind.
d02b48c6
RE
113 @touch lib
114
919f8bcd 115shared: buildinf.h lib subdirs
a7b42009 116 if [ -n "$(SHARED_LIBS)" ]; then \
e70a3983 117 (cd ..; $(MAKE) $(SHARED_LIB)); \
a7b42009
RL
118 fi
119
d02b48c6
RE
120libs:
121 @for i in $(SDIRS) ;\
122 do \
b28ec124 123 (cd $$i && echo "making libs in crypto/$$i..." && \
e5f3045f 124 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
d02b48c6
RE
125 done;
126
127tests:
128 @for i in $(SDIRS) ;\
129 do \
b28ec124 130 (cd $$i && echo "making tests in crypto/$$i..." && \
d02b48c6
RE
131 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
132 done;
133
134install:
a2ac429d 135 @headerlist="$(EXHEADER)"; for i in $$headerlist ;\
d02b48c6 136 do \
e5f3045f
BM
137 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
138 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
d02b48c6
RE
139 done;
140 @for i in $(SDIRS) ;\
141 do \
b28ec124 142 (cd $$i && echo "making install in crypto/$$i..." && \
8e228dc5 143 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
d02b48c6
RE
144 done;
145
146lint:
147 @for i in $(SDIRS) ;\
148 do \
b28ec124 149 (cd $$i && echo "making lint in crypto/$$i..." && \
d02b48c6
RE
150 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
151 done;
152
153depend:
5671876d 154 if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
001ab3ab 155 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
a8515441 156 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
d02b48c6
RE
157 @for i in $(SDIRS) ;\
158 do \
b28ec124 159 (cd $$i && echo "making depend in crypto/$$i..." && \
1c920200 160 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
d02b48c6
RE
161 done;
162
163clean:
14e21f86 164 rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
d02b48c6
RE
165 @for i in $(SDIRS) ;\
166 do \
b28ec124 167 (cd $$i && echo "making clean in crypto/$$i..." && \
d02b48c6
RE
168 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
169 done;
170
171dclean:
99aab161 172 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
d02b48c6
RE
173 mv -f Makefile.new $(MAKEFILE)
174 @for i in $(SDIRS) ;\
175 do \
b28ec124 176 (cd $$i && echo "making dclean in crypto/$$i..." && \
d10c5c22 177 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
d02b48c6
RE
178 done;
179
d02b48c6 180# DO NOT DELETE THIS LINE -- make depend depends on it.
6242bb9c 181
1c4f90a0 182cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
cf1b7d96
RL
183cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
184cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
c57bc2dc
GT
185cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
186cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
187cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
41d2a336
RL
188cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
189cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
190cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
191cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
192cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
193cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
194cryptlib.o: cryptlib.h
41d2a336
RL
195cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
196cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
197cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
198cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
199cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
200cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
201cversion.o: cryptlib.h cversion.c
3aecef76 202ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
41d2a336
RL
203ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
204ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
205ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
206ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
207ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
208ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
209ex_data.o: ex_data.c
41d2a336
RL
210mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
211mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
212mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
213mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
214mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
215mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
216mem.o: mem.c
df29cc8f
RL
217mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
218mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
9c52d2cc
GT
219mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
220mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
41d2a336
RL
221mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
222mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
223mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
224mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
225mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
226mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
227mem_dbg.o: mem_dbg.c
a2400fca
RL
228o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
229o_dir.o: LPdir_unix.c o_dir.c o_dir.h
a7201e9a
RL
230o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
231o_str.o: o_str.c o_str.h
2b49dd1e
RL
232o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
233o_time.o: o_time.h
41d2a336
RL
234tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
235tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
236tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
237tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
c57bc2dc
GT
238tmdiff.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
239tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
240tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h tmdiff.c
cf1b7d96
RL
241uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
242uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
9c52d2cc
GT
243uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
244uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c