]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/Makefile.ssl
Merge the engine branch into the main trunk. All conflicts resolved.
[thirdparty/openssl.git] / crypto / Makefile.ssl
CommitLineData
d02b48c6
RE
1#
2# SSLeay/crypto/Makefile
3#
4
5DIR= crypto
6TOP= ..
7CC= cc
8INCLUDE= -I. -I../include
9INCLUDES= -I.. -I../../include
10CFLAG= -g
e5f3045f
BM
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
d02b48c6
RE
13INSTALLTOP= /usr/local/ssl
14MAKE= make -f Makefile.ssl
8039257d 15MAKEDEPEND= $(TOP)/util/domd $(TOP)
d02b48c6 16MAKEFILE= Makefile.ssl
bb8f3c58 17RM= rm -f
d02b48c6
RE
18AR= ar r
19
d02b48c6
RE
20PEX_LIBS=
21EX_LIBS=
22
664b9985 23CFLAGS= $(INCLUDE) $(CFLAG)
d02b48c6 24
58964a49 25
d02b48c6
RE
26LIBS=
27
58964a49
RE
28SDIRS= md2 md5 sha mdc2 hmac ripemd \
29 des rc2 rc4 rc5 idea bf cast \
5270e702 30 bn rsa dsa dh dso engine \
d02b48c6 31 buffer bio stack lhash rand err objects \
3ab56511 32 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp rijndael
d02b48c6 33
7d7d2cbc 34GENERAL=Makefile README crypto-lib.com install.com
d02b48c6
RE
35
36LIB= $(TOP)/libcrypto.a
8efb6014
UM
37LIBSRC= cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c
38LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o
d02b48c6
RE
39
40SRC= $(LIBSRC)
41
9fc25706 42EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h
71b4d897 43HEADER= cryptlib.h buildinf.h md32_common.h $(EXHEADER)
d02b48c6
RE
44
45ALL= $(GENERAL) $(SRC) $(HEADER)
46
47top:
48 @(cd ..; $(MAKE) DIRS=$(DIR) all)
49
664b9985 50all: buildinf.h lib subdirs
d02b48c6 51
664b9985 52buildinf.h: ../Makefile.ssl
57119943
BM
53 ( echo "#ifndef MK1MF_BUILD"; \
54 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
55 echo " #define CFLAGS \"$(CC) $(CFLAG)\""; \
56 echo " #define PLATFORM \"$(PLATFORM)\""; \
57 echo " #define DATE \"`date`\""; \
58 echo "#endif" ) >buildinf.h
d02b48c6 59
b357e95c 60testapps:
63da21c0
BM
61 if echo ${SDIRS} | fgrep ' des '; \
62 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 63 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 64
d02b48c6
RE
65subdirs:
66 @for i in $(SDIRS) ;\
67 do \
bb8f3c58 68 (cd $$i && echo "making all in crypto/$$i..." && \
1a01cad3 69 $(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
70 done;
71
72files:
99aab161 73 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
d02b48c6
RE
74 @for i in $(SDIRS) ;\
75 do \
bb8f3c58 76 (cd $$i; echo "making 'files' in crypto/$$i..."; \
5a9bab32 77 $(MAKE) PERL='${PERL}' files ); \
d02b48c6
RE
78 done;
79
80links:
bb8f3c58 81 @$(TOP)/util/point.sh Makefile.ssl Makefile
1314c344
BM
82 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
83 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
84 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
bb8f3c58
RE
85 @$(TOP)/util/point.sh Makefile.ssl Makefile
86 @for i in $(SDIRS); do \
87 (cd $$i; echo "making links in crypto/$$i..."; \
6dc08dd6 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 ); \
d02b48c6
RE
89 done;
90
91lib: $(LIBOBJ)
92 $(AR) $(LIB) $(LIBOBJ)
4e20a4e6
RL
93 @echo You may get an error following this line. Please ignore.
94 - $(RANLIB) $(LIB)
d02b48c6
RE
95 @touch lib
96
97libs:
98 @for i in $(SDIRS) ;\
99 do \
bb8f3c58 100 (cd $$i; echo "making libs in crypto/$$i..."; \
e5f3045f 101 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
d02b48c6
RE
102 done;
103
104tests:
105 @for i in $(SDIRS) ;\
106 do \
bb8f3c58 107 (cd $$i; echo "making tests in crypto/$$i..."; \
d02b48c6
RE
108 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
109 done;
110
111install:
112 @for i in $(EXHEADER) ;\
113 do \
e5f3045f
BM
114 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
115 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
d02b48c6
RE
116 done;
117 @for i in $(SDIRS) ;\
118 do \
bb8f3c58 119 (cd $$i; echo "making install in crypto/$$i..."; \
8e228dc5 120 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
d02b48c6
RE
121 done;
122
123lint:
124 @for i in $(SDIRS) ;\
125 do \
bb8f3c58 126 (cd $$i; echo "making lint in crypto/$$i..."; \
d02b48c6
RE
127 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
128 done;
129
130depend:
5671876d 131 if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
f5d7a031 132 $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
a8515441 133 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
d02b48c6
RE
134 @for i in $(SDIRS) ;\
135 do \
bb8f3c58 136 (cd $$i; echo "making depend in crypto/$$i..."; \
f5d7a031 137 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
d02b48c6
RE
138 done;
139
140clean:
57119943 141 rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
d02b48c6
RE
142 @for i in $(SDIRS) ;\
143 do \
bb8f3c58 144 (cd $$i; echo "making clean in crypto/$$i..."; \
d02b48c6
RE
145 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
146 done;
147
148dclean:
99aab161 149 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
d02b48c6
RE
150 mv -f Makefile.new $(MAKEFILE)
151 @for i in $(SDIRS) ;\
152 do \
bb8f3c58 153 (cd $$i; echo "making dclean in crypto/$$i..."; \
d10c5c22 154 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
d02b48c6
RE
155 done;
156
d02b48c6 157# DO NOT DELETE THIS LINE -- make depend depends on it.
6242bb9c 158
1c4f90a0
GT
159cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
160cpt_err.o: ../include/openssl/err.h ../include/openssl/lhash.h
dd9d233e 161cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
62ab514e 162cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
7e701817
BM
163cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
164cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
165cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h
1c4f90a0
GT
166cryptlib.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
167cryptlib.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
62ab514e 168cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
7e701817
BM
169cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
170cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
171cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h
1c4f90a0
GT
172cversion.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
173cversion.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
62ab514e
RL
174cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
175cversion.o: cryptlib.h
7e701817
BM
176ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
177ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
178ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h
179ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
dd9d233e 180ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
62ab514e 181ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
7e701817
BM
182mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
183mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
184mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h
1c4f90a0
GT
185mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
186mem.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
62ab514e 187mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
9ac42ed8
RL
188mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h
189mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
190mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h
191mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
dd9d233e 192mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
62ab514e 193mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
7e701817
BM
194tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
195tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
196tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h
1c4f90a0
GT
197tmdiff.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
198tmdiff.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
62ab514e
RL
199tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
200tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h