diff options
Diffstat (limited to 'src/lib/libcrypto/Makefile.ssl')
-rw-r--r-- | src/lib/libcrypto/Makefile.ssl | 140 |
1 files changed, 79 insertions, 61 deletions
diff --git a/src/lib/libcrypto/Makefile.ssl b/src/lib/libcrypto/Makefile.ssl index efdbba38ac..37aaac1528 100644 --- a/src/lib/libcrypto/Makefile.ssl +++ b/src/lib/libcrypto/Makefile.ssl | |||
@@ -8,24 +8,20 @@ CC= cc | |||
8 | INCLUDE= -I. -I../include | 8 | INCLUDE= -I. -I../include |
9 | INCLUDES= -I.. -I../../include | 9 | INCLUDES= -I.. -I../../include |
10 | CFLAG= -g | 10 | CFLAG= -g |
11 | INSTALL_PREFIX= | ||
12 | OPENSSLDIR= /usr/local/ssl | ||
11 | INSTALLTOP= /usr/local/ssl | 13 | INSTALLTOP= /usr/local/ssl |
12 | MAKE= make -f Makefile.ssl | 14 | MAKE= make -f Makefile.ssl |
13 | MAKEDEPEND= makedepend -f Makefile.ssl | 15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) |
14 | MAKEFILE= Makefile.ssl | 16 | MAKEFILE= Makefile.ssl |
15 | RM= /bin/rm -f | 17 | RM= rm -f |
16 | AR= ar r | 18 | AR= ar r |
17 | 19 | ||
18 | MAKE= make -f Makefile.ssl | ||
19 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
20 | MAKEFILE= Makefile.ssl | ||
21 | |||
22 | PEX_LIBS= | 20 | PEX_LIBS= |
23 | EX_LIBS= | 21 | EX_LIBS= |
24 | 22 | ||
25 | CFLAGS= $(INCLUDE) $(CFLAG) -DCFLAGS=" \"$(CC) $(CFLAG)\" " | 23 | CFLAGS= $(INCLUDE) $(CFLAG) |
26 | 24 | ||
27 | ERR=crypto | ||
28 | ERRC=cpt_err | ||
29 | 25 | ||
30 | LIBS= | 26 | LIBS= |
31 | 27 | ||
@@ -33,129 +29,151 @@ SDIRS= md2 md5 sha mdc2 hmac ripemd \ | |||
33 | des rc2 rc4 rc5 idea bf cast \ | 29 | des rc2 rc4 rc5 idea bf cast \ |
34 | bn rsa dsa dh \ | 30 | bn rsa dsa dh \ |
35 | buffer bio stack lhash rand err objects \ | 31 | buffer bio stack lhash rand err objects \ |
36 | evp pem x509 \ | 32 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp |
37 | asn1 conf txt_db pkcs7 | ||
38 | 33 | ||
39 | GENERAL=Makefile README | 34 | GENERAL=Makefile README crypto-lib.com install.com |
40 | 35 | ||
41 | LIB= $(TOP)/libcrypto.a | 36 | LIB= $(TOP)/libcrypto.a |
42 | LIBSRC= cryptlib.c mem.c cversion.c ex_data.c $(ERRC).c | 37 | LIBSRC= cryptlib.c mem.c cversion.c ex_data.c tmdiff.c cpt_err.c |
43 | LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o $(ERRC).o | 38 | LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o cpt_err.o |
44 | 39 | ||
45 | SRC= $(LIBSRC) | 40 | SRC= $(LIBSRC) |
46 | 41 | ||
47 | EXHEADER= crypto.h cryptall.h | 42 | EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h |
48 | HEADER= cryptlib.h date.h $(EXHEADER) | 43 | HEADER= cryptlib.h buildinf.h $(EXHEADER) |
49 | 44 | ||
50 | ALL= $(GENERAL) $(SRC) $(HEADER) | 45 | ALL= $(GENERAL) $(SRC) $(HEADER) |
51 | 46 | ||
52 | top: | 47 | top: |
53 | @(cd ..; $(MAKE) DIRS=$(DIR) all) | 48 | @(cd ..; $(MAKE) DIRS=$(DIR) all) |
54 | 49 | ||
55 | all: date.h lib subdirs | 50 | all: buildinf.h lib subdirs |
56 | 51 | ||
57 | date.h: ../Makefile.ssl ../VERSION | 52 | buildinf.h: ../Makefile.ssl |
58 | echo "#define DATE \"`date`\"" >date.h | 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 | ||
59 | 59 | ||
60 | subdirs: | 60 | subdirs: |
61 | @for i in $(SDIRS) ;\ | 61 | @for i in $(SDIRS) ;\ |
62 | do \ | 62 | do \ |
63 | (cd $$i; echo "making all in $$i..."; \ | 63 | (cd $$i && echo "making all in crypto/$$i..." && \ |
64 | $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' 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}' all ); \ | 64 | $(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; \ |
65 | done; | 65 | done; |
66 | 66 | ||
67 | files: | 67 | files: |
68 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | 68 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO |
69 | @for i in $(SDIRS) ;\ | 69 | @for i in $(SDIRS) ;\ |
70 | do \ | 70 | do \ |
71 | (cd $$i; echo "making 'files' in $$i..."; \ | 71 | (cd $$i; echo "making 'files' in crypto/$$i..."; \ |
72 | $(MAKE) files ); \ | 72 | $(MAKE) PERL='${PERL}' files ); \ |
73 | done; | 73 | done; |
74 | 74 | ||
75 | links: | 75 | links: |
76 | /bin/rm -f Makefile | 76 | @$(TOP)/util/point.sh Makefile.ssl Makefile |
77 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | 77 | @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) |
78 | $(TOP)/util/mklink.sh ../include $(HEADER) ; | 78 | @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST) |
79 | $(TOP)/util/mklink.sh ../test $(TEST) ; | 79 | @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS) |
80 | $(TOP)/util/mklink.sh ../apps $(APPS) ; | 80 | @$(TOP)/util/point.sh Makefile.ssl Makefile |
81 | $(TOP)/util/point.sh Makefile.ssl Makefile; | 81 | @for i in $(SDIRS); do \ |
82 | @for i in $(SDIRS) ;\ | 82 | (cd $$i; echo "making links in crypto/$$i..."; \ |
83 | do \ | 83 | $(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 ); \ |
84 | (cd $$i; echo "making links in $$i..."; \ | ||
85 | $(MAKE) links ); \ | ||
86 | done; | 84 | done; |
87 | 85 | ||
88 | lib: $(LIBOBJ) | 86 | lib: $(LIBOBJ) |
89 | $(AR) $(LIB) $(LIBOBJ) | 87 | $(AR) $(LIB) $(LIBOBJ) |
90 | sh $(TOP)/util/ranlib.sh $(LIB) | 88 | $(RANLIB) $(LIB) |
91 | @touch lib | 89 | @touch lib |
92 | 90 | ||
93 | libs: | 91 | libs: |
94 | @for i in $(SDIRS) ;\ | 92 | @for i in $(SDIRS) ;\ |
95 | do \ | 93 | do \ |
96 | (cd $$i; echo "making libs in $$i..."; \ | 94 | (cd $$i; echo "making libs in crypto/$$i..."; \ |
97 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ | 95 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ |
98 | done; | 96 | done; |
99 | 97 | ||
100 | tests: | 98 | tests: |
101 | @for i in $(SDIRS) ;\ | 99 | @for i in $(SDIRS) ;\ |
102 | do \ | 100 | do \ |
103 | (cd $$i; echo "making tests in $$i..."; \ | 101 | (cd $$i; echo "making tests in crypto/$$i..."; \ |
104 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ | 102 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ |
105 | done; | 103 | done; |
106 | 104 | ||
107 | install: | 105 | install: |
108 | @for i in $(EXHEADER) ;\ | 106 | @for i in $(EXHEADER) ;\ |
109 | do \ | 107 | do \ |
110 | (cp $$i $(INSTALLTOP)/include/$$i; \ | 108 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
111 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | 109 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ |
112 | done; | 110 | done; |
113 | @for i in $(SDIRS) ;\ | 111 | @for i in $(SDIRS) ;\ |
114 | do \ | 112 | do \ |
115 | (cd $$i; echo "making install in $$i..."; \ | 113 | (cd $$i; echo "making install in crypto/$$i..."; \ |
116 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ | 114 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ |
117 | done; | 115 | done; |
118 | 116 | ||
119 | lint: | 117 | lint: |
120 | @for i in $(SDIRS) ;\ | 118 | @for i in $(SDIRS) ;\ |
121 | do \ | 119 | do \ |
122 | (cd $$i; echo "making lint in $$i..."; \ | 120 | (cd $$i; echo "making lint in crypto/$$i..."; \ |
123 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ | 121 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ |
124 | done; | 122 | done; |
125 | 123 | ||
126 | depend: | 124 | depend: |
127 | $(MAKEDEPEND) $(INCLUDE) $(PROGS) $(LIBSRC) | 125 | if [ ! -e buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist |
126 | $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC) | ||
127 | if [ ! -s buildinf.h ]; then rm buildinf.h; fi | ||
128 | @for i in $(SDIRS) ;\ | 128 | @for i in $(SDIRS) ;\ |
129 | do \ | 129 | do \ |
130 | (cd $$i; echo "making depend in $$i..."; \ | 130 | (cd $$i; echo "making depend in crypto/$$i..."; \ |
131 | $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' MAKEDEPEND='${MAKEDEPEND}' depend ); \ | 131 | $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \ |
132 | done; | 132 | done; |
133 | 133 | ||
134 | clean: | 134 | clean: |
135 | /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | 135 | rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff |
136 | @for i in $(SDIRS) ;\ | 136 | @for i in $(SDIRS) ;\ |
137 | do \ | 137 | do \ |
138 | (cd $$i; echo "making clean in $$i..."; \ | 138 | (cd $$i; echo "making clean in crypto/$$i..."; \ |
139 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ | 139 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ |
140 | done; | 140 | done; |
141 | 141 | ||
142 | dclean: | 142 | dclean: |
143 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | 143 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
144 | mv -f Makefile.new $(MAKEFILE) | 144 | mv -f Makefile.new $(MAKEFILE) |
145 | @for i in $(SDIRS) ;\ | 145 | @for i in $(SDIRS) ;\ |
146 | do \ | 146 | do \ |
147 | (cd $$i; echo "making dclean in $$i..."; \ | 147 | (cd $$i; echo "making dclean in crypto/$$i..."; \ |
148 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ | 148 | $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ |
149 | done; | ||
150 | |||
151 | errors: | ||
152 | perl ./err/err_code.pl -conf err/ssleay.ec *.c */*.c ../ssl/*.c ../rsaref/*.c | ||
153 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
154 | perl err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
155 | @for i in $(SDIRS) ;\ | ||
156 | do \ | ||
157 | (cd $$i; echo "making errors in $$i..."; \ | ||
158 | $(MAKE) errors ); \ | ||
159 | done; | 149 | done; |
160 | 150 | ||
161 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 151 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
152 | |||
153 | cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h | ||
154 | cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h | ||
155 | cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h | ||
156 | cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | ||
157 | cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
158 | cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
159 | cryptlib.o: ../include/openssl/stack.h cryptlib.h | ||
160 | cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h | ||
161 | cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | ||
162 | cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
163 | cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
164 | cversion.o: ../include/openssl/stack.h buildinf.h cryptlib.h | ||
165 | ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h | ||
166 | ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | ||
167 | ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
168 | ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
169 | ex_data.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h | ||
170 | mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h | ||
171 | mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | ||
172 | mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
173 | mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
174 | mem.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h | ||
175 | tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h | ||
176 | tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h | ||
177 | tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
178 | tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
179 | tmdiff.o: ../include/openssl/stack.h ../include/openssl/tmdiff.h cryptlib.h | ||