Forgot "cvs add", so only the surrounding changes made it... sigh.
[openssl.git] / Makefile.org
index 38cbb1bc448e71cb4ee4442de057a241a6b12e77..0d451d1680fdee13586e16961e7d879e63eb8a5e 100644 (file)
@@ -63,6 +63,7 @@ RANLIB= ranlib
 PERL= perl
 TAR= tar
 TARFLAGS= --no-recursion
+MAKEDEPPROG=makedepend
 
 # Set BN_ASM to bn_asm.o if you want to use the C version
 BN_ASM= bn_asm.o
@@ -149,6 +150,10 @@ RMD160_ASM_OBJ= asm/rm86-out.o
 #RMD160_ASM_OBJ= asm/rm86-out.o       # a.out, FreeBSD
 #RMD160_ASM_OBJ= asm/rm86bsdi.o       # bsdi
 
+# KRB5 stuff
+KRB5_INCLUDES=
+LIBKRB5=
+
 # When we're prepared to use shared libraries in the programs we link here
 # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
 SHLIB_MARK=
@@ -160,10 +165,14 @@ SHLIBDIRS= crypto ssl
 SDIRS=  \
        md2 md4 md5 sha mdc2 hmac ripemd \
        des rc2 rc4 rc5 idea bf cast \
-       bn rsa dsa dh dso engine rijndael \
+       bn ec rsa dsa dh dso engine rijndael \
        buffer bio stack lhash rand err objects \
        evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp
 
+# tests to perform.  "alltests" is a special word indicating that all tests
+# should be performed.
+TESTS = alltests
+
 MAKEFILE= Makefile.ssl
 MAKE=     make -f Makefile.ssl
 
@@ -187,7 +196,7 @@ BASENAME=       openssl
 NAME=           $(BASENAME)-$(VERSION)
 TARFILE=        $(NAME).tar
 WTARFILE=       $(NAME)-win.tar
-EXHEADER=       e_os.h e_os2.h
+EXHEADER=       e_os2.h
 HEADER=         e_os.h
 
 # When we're prepared to use shared libraries in the programs we link here
@@ -200,7 +209,7 @@ sub_all:
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making all in $$i..." && \
-               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
+               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' all ) || exit 1; \
        else \
                $(MAKE) $$i; \
        fi; \
@@ -287,22 +296,40 @@ do_irix-shared:
        done
 
 # This assumes that GNU utilities are *not* used
+# HP-UX includes the full pathname of libs we depend on, so we would get
+# ./libcrypto (with ./ as path information) compiled into libssl, hence
+# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
+# anyway.
+# The object modules are loaded from lib$i.a using the undocumented -Fl
+# option.
+#
+# WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH
+#          by temporarily specifying "+s"!
+#
 do_hpux-shared:
-       libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+       for i in ${SHLIBDIRS}; do \
        ( set -x; /usr/ccs/bin/ld +vnocompatwarnings \
-               -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+               -b -z +s \
+               -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
                +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-               -Fl lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
-       libs="$$libs -L. -l$$i"; \
+               -Fl lib$$i.a -ldld -lc ) || exit 1; \
        done
 
 # This assumes that GNU utilities are *not* used
+# HP-UX includes the full pathname of libs we depend on, so we would get
+# ./libcrypto (with ./ as path information) compiled into libssl, hence
+# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
+# anyway.
+#
+# HP-UX in 64bit mode has "+s" enabled by default; it will search for
+# shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH.
+#
 do_hpux64-shared:
-       libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
-       ( set -x; /usr/ccs/bin/ld -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+       for i in ${SHLIBDIRS}; do \
+       ( set -x; /usr/ccs/bin/ld -b -z \
+               -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
                +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-               +forceload lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
-       libs="$$libs -L. -l$$i"; \
+               +forceload lib$$i.a -ldl -lc ) || exit 1; \
        done
 
 Makefile.ssl: Makefile.org
@@ -351,7 +378,7 @@ links:
        @for i in $(DIRS); do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making links in $$i..." && \
-               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' links ) || exit 1; \
+               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
        fi; \
        done;
 
@@ -367,14 +394,14 @@ dclean:
 
 rehash: rehash.time
 rehash.time: certs
-       @(OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs)
+       @(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; export OPENSSL OPENSSL_DEBUG_MEMORY; $(PERL) tools/c_rehash certs)
        touch rehash.time
 
 test:   tests
 
 tests: rehash
        @(cd test && echo "testing..." && \
-       $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' tests );
+       $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' OPENSSL_DEBUG_MEMORY=on tests );
        @apps/openssl version -a
 
 report:
@@ -385,7 +412,7 @@ depend:
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making dependencies $$i..." && \
-               $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
+               $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' depend ) || exit 1; \
        fi; \
        done;
 
@@ -408,25 +435,25 @@ tags:
        done;
 
 errors:
-       perl util/mkerr.pl -recurse -write
+       $(PERL) util/mkerr.pl -recurse -write
 
 stacks:
-       perl util/mkstack.pl -write
+       $(PERL) util/mkstack.pl -write
 
 util/libeay.num::
-       perl util/mkdef.pl crypto update
+       $(PERL) util/mkdef.pl crypto update
 
 util/ssleay.num::
-       perl util/mkdef.pl ssl update
+       $(PERL) util/mkdef.pl ssl update
 
-crypto/objects/obj_dat.h: crypto/objects/obj_mac.h crypto/objects/obj_dat.pl
-       perl crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
-crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt 
-       perl crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
+crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
+       $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
+crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
+       $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
 
 TABLE: Configure
        (echo 'Output of `Configure TABLE'"':"; \
-       perl Configure TABLE) > TABLE
+       $(PERL) Configure TABLE) > TABLE
 
 update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
 
@@ -439,6 +466,14 @@ tar:
        gzip --best >../$(TARFILE).gz; \
        ls -l ../$(TARFILE).gz
 
+tar-snap:
+       @$(TAR) $(TARFLAGS) -cvf - \
+               `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*'  \! -name 'openssl' \! -name '*test' \! -name '.#*' | sort` |\
+       tardy --user_number=0  --user_name=openssl \
+             --group_number=0 --group_name=openssl \
+             --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
+       ls -l ../$(TARFILE)
+
 dist:   
        $(PERL) Configure dist
        @$(MAKE) dist_pem_h
@@ -483,8 +518,8 @@ install: all install_docs
                do \
                        if [ -f "$$i" ]; then \
                        (       echo installing $$i; \
-                               cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
-                               chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
+                               cp -f $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
+                               chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
                        fi \
                done; \
                (       here="`pwd`"; \