Rudimentary support for cross-compiling.
[openssl.git] / Makefile.org
index d383b92ad4bbfecef3f6935a8e24400e60130eff..805ab6f1c17883beb52f6f9f30e624244853535f 100644 (file)
@@ -66,6 +66,7 @@ EXE_EXT=
 ARFLAGS=
 AR=ar $(ARFLAGS) r
 RANLIB= ranlib
+NM= nm
 PERL= perl
 TAR= tar
 TARFLAGS= --no-recursion
@@ -112,7 +113,7 @@ SHLIBDIRS= crypto ssl
 SDIRS=  \
        objects \
        md2 md4 md5 sha mdc2 hmac ripemd whrlpool \
-       des aes rc2 rc4 rc5 idea bf cast \
+       des aes rc2 rc4 rc5 idea bf cast camellia \
        bn ec rsa dsa ecdsa dh ecdh dso engine \
        buffer bio stack lhash rand err \
        evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
@@ -174,7 +175,8 @@ CLEARENV=   TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS}     \
 BUILDENV=      PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
                CC='${CC}' CFLAG='${CFLAG}'                     \
                AS='${CC}' ASFLAG='${CFLAG} -c'                 \
-               AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'    \
+               AR='${AR}' NM='${NM}' RANLIB='${RANLIB}'        \
+               PERL='${PERL}'                                  \
                SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib'   \
                INSTALL_PREFIX='${INSTALL_PREFIX}'              \
                INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}'   \
@@ -383,12 +385,14 @@ dclean:
        @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
 
 rehash: rehash.time
-rehash.time: certs
-       @(OPENSSL="`pwd`/util/opensslwrap.sh"; \
-         OPENSSL_DEBUG_MEMORY=on; \
-         export OPENSSL OPENSSL_DEBUG_MEMORY; \
-         $(PERL) tools/c_rehash certs)
-       touch rehash.time
+rehash.time: certs apps
+       @if [ -z "$(CROSS_COMPILE_PREFIX)" ]; then \
+               (OPENSSL="`pwd`/util/opensslwrap.sh"; \
+               OPENSSL_DEBUG_MEMORY=on; \
+               export OPENSSL OPENSSL_DEBUG_MEMORY; \
+               $(PERL) tools/c_rehash certs) && \
+               touch rehash.time; \
+       else :; fi
 
 test:   tests
 
@@ -428,6 +432,8 @@ 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
+crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
+       $(PERL) crypto/objects/objxref.pl > crypto/objects/obj_xref.h
 
 apps/openssl-vms.cnf: apps/openssl.cnf
        $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
@@ -440,7 +446,7 @@ TABLE: Configure
        (echo 'Output of `Configure TABLE'"':"; \
        $(PERL) Configure TABLE) > TABLE
 
-update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
+update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
 
 # Build distribution tar-file. As the list of files returned by "find" is
 # pretty long, on several platforms a "too many arguments" error or similar