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