Move algorithm specific ppccap code from crypto/ppccap.c
[openssl.git] / Configurations / unix-Makefile.tmpl
index 7f6caea17f643cc1c7a4306be0abb39f848d19bf..1c85637f49db10d1669ee9571ddac94090b2f873 100644 (file)
@@ -153,6 +153,10 @@ LIBDIR={- #
 ENGINESDIR={- use File::Spec::Functions;
               catdir($prefix,$libdir,"engines-$sover") -}
 
+# Convenience variable for those who want to set the rpath in shared
+# libraries and applications
+LIBRPATH=$(INSTALLTOP)/$(LIBDIR)
+
 MANDIR=$(INSTALLTOP)/share/man
 DOCDIR=$(INSTALLTOP)/share/doc/$(BASENAME)
 HTMLDIR=$(DOCDIR)/html
@@ -170,26 +174,13 @@ CC= $(CROSS_COMPILE){- $target{cc} -}
 CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
 CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
 CXX= $(CROSS_COMPILE){- $target{cxx} -}
-CXXFLAGS={- our $cxxflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cxxflags} -} {- $config{cxxflags} -}
+CXXFLAGS={- our $cxxflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cxxflags} -} {- $config{cxxflags} -} -std=c++11
 LDFLAGS= {- $target{lflags} -}
 PLIB_LDFLAGS= {- $target{plib_lflags} -}
 EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
 LIB_CFLAGS={- $target{shared_cflag} || "" -}
 LIB_CXXFLAGS={- $target{shared_cxxflag} || "" -}
-LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag}
-               # Unlike other OSes (like Solaris, Linux, Tru64,
-               # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD
-               # and FreeBSD) "demand" RPATH set on .so objects.
-               # Apparently application RPATH is not global and
-               # does not apply to .so linked with other .so.
-               # Problem manifests itself when libssl.so fails to
-               # load libcrypto.so. One can argue that we should
-               # engrave this into Makefile.shared rules or into
-               # BSD-* config lines above. Meanwhile let's try to
-               # be cautious and pass -rpath to linker only when
-               # $prefix is not /usr.
-               . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
-                  ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
+LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag} -}
 DSO_CFLAGS={- $target{shared_cflag} || "" -}
 DSO_CXXFLAGS={- $target{shared_cxxflag} || "" -}
 DSO_LDFLAGS=$(LIB_LDFLAGS)
@@ -260,6 +251,7 @@ test: tests
          PERL="$(PERL)" \
          EXE_EXT={- $exeext -} \
          OPENSSL_ENGINES=../$(BLDDIR)/engines \
+         OPENSSL_DEBUG_MEMORY=on \
            $(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
        @ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
        @echo "Tests are not supported with your chosen Configure options"
@@ -311,7 +303,7 @@ distclean: clean
 depend:
        @: {- output_off() if $disabled{makedepend}; "" -}
        @if egrep "^# DO NOT DELETE THIS LINE" Makefile >/dev/null && [ -z "`find $(DEPS) -newer Makefile 2>/dev/null; exit 0`" ]; then :; else \
-         ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
+         ( $(PERL) -pe 'exit 0 if /^# DO NOT DELETE THIS LINE.*/' < Makefile; \
            echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
            echo; \
            for f in $(DEPS); do \
@@ -582,12 +574,9 @@ PROCESS_PODS=\
        set -e; \
        here=`cd $(SRCDIR); pwd`; \
        point=$$here/util/point.sh; \
-       for ds in apps:1 crypto:3 ssl:3; do \
-           defdir=`echo $$ds | cut -f1 -d:`; \
-           defsec=`echo $$ds | cut -f2 -d:`; \
-           for p in $(SRCDIR)/doc/$$defdir/*.pod; do \
-               SEC=`sed -ne 's/^=for  *comment  *openssl_manual_section: *\([0-9]\) *$$/\1/p' $$p`; \
-               [ -z "$$SEC" ] && SEC=$$defsec; \
+       for ds in man1 man3 man5 man7 ; do \
+           SEC=`echo $$ds | sed -e s/man//`; \
+           for p in $(SRCDIR)/doc/$$ds/*.pod; do \
                fn=`basename $$p .pod`; \
                Name=$$fn; \
                NAME=`echo $$fn | tr '[a-z]' '[A-Z]'`; \
@@ -617,12 +606,9 @@ PROCESS_PODS=\
 UNINSTALL_DOCS=\
        set -e; \
        here=`cd $(SRCDIR); pwd`; \
-       for ds in apps:1 crypto:3 ssl:3; do \
-           defdir=`echo $$ds | cut -f1 -d:`; \
-           defsec=`echo $$ds | cut -f2 -d:`; \
-           for p in $(SRCDIR)/doc/$$defdir/*.pod; do \
-               SEC=`sed -ne 's/^=for  *comment  *openssl_manual_section: *\([0-9]\) *$$/\1/p' $$p`; \
-               [ -z "$$SEC" ] && SEC=$$defsec; \
+       for ds in man1 man3 man5 man7 ; do \
+           SEC=`echo $$ds | sed -e s/man//`; \
+           for p in $(SRCDIR)/doc/$$ds/*.pod; do \
                fn=`basename $$p .pod`; \
                suf=`eval "echo $$OUTSUFFIX"`; \
                top=`eval "echo $$OUTTOP"`; \
@@ -783,7 +769,7 @@ tar:
        cd $(SRCDIR); ls -l $(TARFILE).gz
 
 dist:
-       @$(MAKE) PREPARE_CMD='./Configure dist' tar
+       @$(MAKE) PREPARE_CMD='$(PERL) ./Configure dist' tar
 
 # Helper targets #####################################################
 
@@ -842,7 +828,7 @@ openssl.pc:
 configdata.pm: $(SRCDIR)/Configure $(SRCDIR)/config {- join(" ", @{$config{build_file_templates}}, @{$config{build_infos}}, @{$config{conf_files}}) -}
        @echo "Detected changed: $?"
        @echo "Reconfiguring..."
-       $(SRCDIR)/Configure reconf
+       $(PERL) $(SRCDIR)/Configure reconf
        @echo "**************************************************"
        @echo "***                                            ***"
        @echo "***   Please run the same make command again   ***"
@@ -1107,7 +1093,7 @@ $bin$exeext: $objs $deps
                APPNAME=$bin$exeext OBJECTS="$objs" \\
                LIBDEPS='\$(PLIB_LDFLAGS) '"$linklibs"' \$(EX_LIBS)' \\
                CC='$cc' CFLAGS='$cflags' \\
-               LDFLAGS='\$(LDFLAGS)' LIBRPATH='\$(INSTALLTOP)/\$(LIBDIR)' \\
+               LDFLAGS='\$(LDFLAGS)' \\
                link_app.$shlib_target
 EOF
   }