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