diff options
| author | markus <> | 2002-09-03 18:59:56 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-03 18:59:56 +0000 |
| commit | 374d65fa455af7b635928d7a27c61196b63e577c (patch) | |
| tree | cde2fc42cb83654db0ca26f581ee1721f1378706 /src/lib/libssl/crypto/Makefile | |
| parent | 0ef372523511ad8d227af859820db92c85daec4a (diff) | |
| download | openbsd-374d65fa455af7b635928d7a27c61196b63e577c.tar.gz openbsd-374d65fa455af7b635928d7a27c61196b63e577c.tar.bz2 openbsd-374d65fa455af7b635928d7a27c61196b63e577c.zip | |
build OpenSSL without symlink trees:
* manpage related things moved to src/libssl/man/Makefile
* there are now 3 obj directories src/libssl/{crypto,ssl,man}/ instead
of one single src/libssl/obj
* instead of running Configure (with generates lots of symlinks, and
opensslconf.h) this patch stores pre-computed opensslconf.h files
in src/libssl/crypto/arch
* requires a make includes before the library can be built
* libssl and libcrypto can be build separately
(e.g. cd src/libssl/ssl && make obj && make)
* make depend is now supported
* no more symlink trees
tested by miod@ and fries@
Diffstat (limited to 'src/lib/libssl/crypto/Makefile')
| -rw-r--r-- | src/lib/libssl/crypto/Makefile | 124 |
1 files changed, 105 insertions, 19 deletions
diff --git a/src/lib/libssl/crypto/Makefile b/src/lib/libssl/crypto/Makefile index a98e51e477..15c310f2ee 100644 --- a/src/lib/libssl/crypto/Makefile +++ b/src/lib/libssl/crypto/Makefile | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.25 2002/09/03 18:59:55 markus Exp $ | ||
| 1 | 2 | ||
| 2 | LIB= crypto | 3 | LIB= crypto |
| 3 | 4 | ||
| 4 | SSLEAYDIST= src | 5 | SSLEAYDIST= src |
| 5 | 6 | SSL_SRC= ${.CURDIR}/../${SSLEAYDIST} | |
| 6 | LCRYPTO_SRC= ${.CURDIR}/../${SSLEAYDIST}/crypto | 7 | LCRYPTO_SRC= ${SSL_SRC}/crypto |
| 7 | LCRYPTO_INC= ${.CURDIR}/../${SSLEAYDIST}/include | ||
| 8 | 8 | ||
| 9 | .if ${MACHINE_ARCH} == "i386" | 9 | .if ${MACHINE_ARCH} == "i386" |
| 10 | CFLAGS+= -DL_ENDIAN | 10 | CFLAGS+= -DL_ENDIAN |
| @@ -33,7 +33,6 @@ CFLAGS+= -DOPENSSL_NO_HW_SUREWARE | |||
| 33 | CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST} | 33 | CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST} |
| 34 | CFLAGS+= -I${LCRYPTO_SRC} | 34 | CFLAGS+= -I${LCRYPTO_SRC} |
| 35 | SRCS+= o_time.c | 35 | SRCS+= o_time.c |
| 36 | CFLAGS+= -I${LCRYPTO_INC} | ||
| 37 | SRCS+= cryptlib.c ex_data.c cpt_err.c mem.c mem_dbg.c tmdiff.c cversion.c uid.c | 36 | SRCS+= cryptlib.c ex_data.c cpt_err.c mem.c mem_dbg.c tmdiff.c cversion.c uid.c |
| 38 | CFLAGS+= -I${LCRYPTO_SRC}/md2 | 37 | CFLAGS+= -I${LCRYPTO_SRC}/md2 |
| 39 | SRCS+= md2_dgst.c md2_one.c | 38 | SRCS+= md2_dgst.c md2_one.c |
| @@ -177,17 +176,6 @@ CFLAGS+= -I${LCRYPTO_SRC}/ec | |||
| 177 | SRCS+= ec_cvt.c ec_lib.c ecp_mont.c ecp_recp.c | 176 | SRCS+= ec_cvt.c ec_lib.c ecp_mont.c ecp_recp.c |
| 178 | SRCS+= ec_err.c ec_mult.c ecp_nist.c ecp_smpl.c | 177 | SRCS+= ec_err.c ec_mult.c ecp_nist.c ecp_smpl.c |
| 179 | 178 | ||
| 180 | |||
| 181 | HDRS= asn1.h asn1_mac.h bio.h blowfish.h bn.h buffer.h cast.h \ | ||
| 182 | comp.h conf.h conf_api.h crypto.h des.h dh.h dsa.h dso.h \ | ||
| 183 | e_os2.h ebcdic.h engine.h err.h evp.h hmac.h idea.h lhash.h \ | ||
| 184 | md2.h md4.h md5.h mdc2.h obj_mac.h objects.h opensslconf.h \ | ||
| 185 | opensslv.h pem.h pem2.h pkcs12.h pkcs7.h rand.h rc2.h rc4.h \ | ||
| 186 | rc5.h ripemd.h rsa.h safestack.h sha.h \ | ||
| 187 | stack.h symhacks.h tmdiff.h txt_db.h x509.h \ | ||
| 188 | x509_vfy.h x509v3.h asn1t.h des_old.h ossl_typ.h \ | ||
| 189 | ui.h ui_compat.h aes.h ec.h ocsp.h | ||
| 190 | |||
| 191 | .PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha \ | 179 | .PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha \ |
| 192 | ${LCRYPTO_SRC}/mdc2 ${LCRYPTO_SRC}/hmac ${LCRYPTO_SRC}/ripemd \ | 180 | ${LCRYPTO_SRC}/mdc2 ${LCRYPTO_SRC}/hmac ${LCRYPTO_SRC}/ripemd \ |
| 193 | ${LCRYPTO_SRC}/des ${LCRYPTO_SRC}/rc2 ${LCRYPTO_SRC}/rc4 \ | 181 | ${LCRYPTO_SRC}/des ${LCRYPTO_SRC}/rc2 ${LCRYPTO_SRC}/rc4 \ |
| @@ -203,13 +191,85 @@ HDRS= asn1.h asn1_mac.h bio.h blowfish.h bn.h buffer.h cast.h \ | |||
| 203 | ${LCRYPTO_SRC}/engine ${LCRYPTO_SRC}/dso ${LCRYPTO_SRC}/ui \ | 191 | ${LCRYPTO_SRC}/engine ${LCRYPTO_SRC}/dso ${LCRYPTO_SRC}/ui \ |
| 204 | ${LCRYPTO_SRC}/ocsp ${LCRYPTO_SRC}/ec ${LCRYPTO_SRC}/aes ${LCRYPTO_SRC} | 192 | ${LCRYPTO_SRC}/ocsp ${LCRYPTO_SRC}/ec ${LCRYPTO_SRC}/aes ${LCRYPTO_SRC} |
| 205 | 193 | ||
| 206 | includes: | 194 | HDRS=\ |
| 195 | crypto/aes/aes.h \ | ||
| 196 | crypto/asn1/asn1.h \ | ||
| 197 | crypto/asn1/asn1_mac.h \ | ||
| 198 | crypto/asn1/asn1t.h \ | ||
| 199 | crypto/bf/blowfish.h \ | ||
| 200 | crypto/bio/bio.h \ | ||
| 201 | crypto/bn/bn.h \ | ||
| 202 | crypto/buffer/buffer.h \ | ||
| 203 | crypto/cast/cast.h \ | ||
| 204 | crypto/comp/comp.h \ | ||
| 205 | crypto/conf/conf.h \ | ||
| 206 | crypto/conf/conf_api.h \ | ||
| 207 | crypto/crypto.h \ | ||
| 208 | crypto/des/des.h \ | ||
| 209 | crypto/des/des_old.h \ | ||
| 210 | crypto/dh/dh.h \ | ||
| 211 | crypto/dsa/dsa.h \ | ||
| 212 | crypto/dso/dso.h \ | ||
| 213 | crypto/ebcdic.h \ | ||
| 214 | crypto/ec/ec.h \ | ||
| 215 | crypto/engine/engine.h \ | ||
| 216 | crypto/err/err.h \ | ||
| 217 | crypto/evp/evp.h \ | ||
| 218 | crypto/hmac/hmac.h \ | ||
| 219 | crypto/idea/idea.h \ | ||
| 220 | crypto/lhash/lhash.h \ | ||
| 221 | crypto/md2/md2.h \ | ||
| 222 | crypto/md4/md4.h \ | ||
| 223 | crypto/md5/md5.h \ | ||
| 224 | crypto/mdc2/mdc2.h \ | ||
| 225 | crypto/objects/objects.h \ | ||
| 226 | crypto/ocsp/ocsp.h \ | ||
| 227 | crypto/opensslv.h \ | ||
| 228 | crypto/ossl_typ.h \ | ||
| 229 | crypto/pem/pem.h \ | ||
| 230 | crypto/pem/pem2.h \ | ||
| 231 | crypto/pkcs12/pkcs12.h \ | ||
| 232 | crypto/pkcs7/pkcs7.h \ | ||
| 233 | crypto/rand/rand.h \ | ||
| 234 | crypto/rc2/rc2.h \ | ||
| 235 | crypto/rc4/rc4.h \ | ||
| 236 | crypto/rc5/rc5.h \ | ||
| 237 | crypto/ripemd/ripemd.h \ | ||
| 238 | crypto/rsa/rsa.h \ | ||
| 239 | crypto/sha/sha.h \ | ||
| 240 | crypto/stack/safestack.h \ | ||
| 241 | crypto/stack/stack.h \ | ||
| 242 | crypto/symhacks.h \ | ||
| 243 | crypto/tmdiff.h \ | ||
| 244 | crypto/txt_db/txt_db.h \ | ||
| 245 | crypto/ui/ui.h \ | ||
| 246 | crypto/ui/ui_compat.h \ | ||
| 247 | crypto/x509/x509.h \ | ||
| 248 | crypto/x509/x509_vfy.h \ | ||
| 249 | crypto/x509v3/x509v3.h \ | ||
| 250 | e_os2.h | ||
| 251 | |||
| 252 | HDRS_GEN=\ | ||
| 253 | ${.CURDIR}/arch/${MACHINE_ARCH}/opensslconf.h \ | ||
| 254 | ${.OBJDIR}/obj_mac.h | ||
| 255 | |||
| 256 | includes: obj_mac.h | ||
| 207 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl | 257 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl |
| 208 | @d=`mktemp -d /tmp/libsslXXXXXXXXXX`; \ | 258 | @d=`mktemp -d /tmp/libsslXXXXXXXXXX`; \ |
| 209 | cd ${LCRYPTO_INC}/openssl; for i in $(HDRS); do \ | 259 | for i in $(HDRS); do \ |
| 260 | f=`basename $$i`; \ | ||
| 261 | j="sed 's/<openssl/<ssl/' \ | ||
| 262 | ${SSL_SRC}/$$i >$$d/$$f && \ | ||
| 263 | (cmp -s $$d/$$f ${DESTDIR}/usr/include/ssl/$$f || \ | ||
| 264 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ | ||
| 265 | $$d/$$f ${DESTDIR}/usr/include/ssl)"; \ | ||
| 266 | echo $$j; \ | ||
| 267 | eval "$$j"; \ | ||
| 268 | done; \ | ||
| 269 | for i in $(HDRS_GEN); do \ | ||
| 210 | f=`basename $$i`; \ | 270 | f=`basename $$i`; \ |
| 211 | j="sed 's/<openssl/<ssl/' \ | 271 | j="sed 's/<openssl/<ssl/' \ |
| 212 | ${LCRYPTO_INC}/openssl/$$i >$$d/$$f && \ | 272 | $$i >$$d/$$f && \ |
| 213 | (cmp -s $$d/$$f ${DESTDIR}/usr/include/ssl/$$f || \ | 273 | (cmp -s $$d/$$f ${DESTDIR}/usr/include/ssl/$$f || \ |
| 214 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ | 274 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ |
| 215 | $$d/$$f ${DESTDIR}/usr/include/ssl)"; \ | 275 | $$d/$$f ${DESTDIR}/usr/include/ssl)"; \ |
| @@ -218,4 +278,30 @@ includes: | |||
| 218 | done; \ | 278 | done; \ |
| 219 | rm -rf $$d | 279 | rm -rf $$d |
| 220 | 280 | ||
| 281 | # generated | ||
| 282 | CFLAGS+= -I${.OBJDIR} | ||
| 283 | |||
| 284 | GENERATED=obj_mac.h obj_dat.h | ||
| 285 | CLEANFILES=${GENERATED} | ||
| 286 | SSL_OBJECTS=${SSL_SRC}/crypto/objects | ||
| 287 | |||
| 288 | obj_mac.h: ${SSL_OBJECTS}/objects.h | ||
| 289 | /usr/bin/perl ${SSL_OBJECTS}/objects.pl ${SSL_OBJECTS}/objects.txt ${SSL_OBJECTS}/obj_mac.num obj_mac.h | ||
| 290 | obj_dat.h: obj_mac.h | ||
| 291 | /usr/bin/perl ${SSL_OBJECTS}/obj_dat.pl obj_mac.h obj_dat.h | ||
| 292 | |||
| 293 | .if (${MACHINE_ARCH} == "vax") | ||
| 294 | # egcs bombs optimising this file on vax | ||
| 295 | a_strnid.o: | ||
| 296 | ${CC} ${CFLAGS} -O0 ${CPPFLAGS} -c ${.IMPSRC} | ||
| 297 | a_strnid.po: | ||
| 298 | ${CC} ${CFLAGS} -O0 ${CPPFLAGS} -c ${.IMPSRC} -o $@ | ||
| 299 | des_enc.o: | ||
| 300 | ${CC} ${CFLAGS} -O1 ${CPPFLAGS} -c ${.IMPSRC} | ||
| 301 | des_enc.po: | ||
| 302 | ${CC} ${CFLAGS} -O1 ${CPPFLAGS} -c ${.IMPSRC} -o $@ | ||
| 303 | .endif | ||
| 304 | |||
| 305 | all beforedepend: ${GENERATED} | ||
| 306 | |||
| 221 | .include <bsd.lib.mk> | 307 | .include <bsd.lib.mk> |
