Commit 99aab161 authored by Ulf Möller's avatar Ulf Möller
Browse files

New Makefile variables $(RANLIB) and $(PERL).

parent 6b01fa64
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@

 Changes between 0.9.2b and 0.9.3

  *) New variables $(RANLIB) and $(PERL) in the Makefiles.
     [Ulf Möller]

  *) New config option to avoid instructions that are illegal on the 80386.
     The default code is faster, but requires at least a 486.
     [Ulf Möller]
+23 −0
Original line number Diff line number Diff line
@@ -273,6 +273,11 @@ my $md5_obj="";
my $sha1_obj="";
my $rmd160_obj="";
my $processor="";
my $ranlib;
my $perl;

$ranlib=&which("ranlib") or $ranlib="true";
$perl=&which("perl5") or $perl=&which("perl");

if ($#ARGV < 0)
	{
@@ -393,6 +398,8 @@ while (<IN>)
	s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
	s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
	s/^PROCESSOR=.*/PROCESSOR= $processor/;
	s/^RANLIB=.*/RANLIB= $ranlib/;
	s/^PERL=.*/PERL= $perl/;
	print OUT $_."\n";
	}
close(IN);
@@ -411,6 +418,8 @@ print "MD5_OBJ_ASM =$md5_obj\n";
print "SHA1_OBJ_ASM  =$sha1_obj\n";
print "RMD160_OBJ_ASM=$rmd160_obj\n";
print "PROCESSOR     =$processor\n";
print "RANLIB        =$ranlib\n";
print "PERL          =$perl\n";

my $des_ptr=0;
my $des_risc1=0;
@@ -713,3 +722,17 @@ sub Rename

sub file_new { my($a)=@_; $a =~ s/(\.[^.]+$|$)/.new/; $a; }
sub file_old { my($a)=@_; $a =~ s/(\.[^.]+$|$)/.old/; $a; }

sub which
	{
	my($name)=@_;
	my $path;
	foreach $path (split /:/, $ENV{PATH})
		{
		if (-x "$path/$name")
			{
			return "$path/$name";
			}
		}
	}
+8 −6
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD
PEX_LIBS= -L. -L.. -L../.. -L../../..
EX_LIBS= 
AR=ar r
RANLIB= ranlib
PERL= perl

# Set BN_ASM to bn_asm.o if you want to use the C version
BN_ASM= bn_asm.o
@@ -167,14 +169,14 @@ all: Makefile.ssl
	@for i in $(DIRS) ;\
	do \
	(cd $$i && echo "making all in $$i..." && \
	$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' 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}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='$(PROCESSOR)' all ) || exit 1; \
	$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' 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}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
	done;

sub_all:
	@for i in $(DIRS) ;\
	do \
	(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)' 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}' all ) || exit 1; \
	done;

Makefile.ssl: Makefile.org
@@ -202,11 +204,11 @@ clean:
	done

makefile.one: files
	perl util/mk1mf.pl >makefile.one; \
	$(PERL) util/mk1mf.pl >makefile.one; \
	sh util/do_ms.sh

files:  MINFO
	perl $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
	$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
	@for i in $(DIRS) ;\
	do \
	(cd $$i && echo "making 'files' in $$i..." && \
@@ -278,7 +280,7 @@ tar:
	ls -l ../$(TARFILE).gz

dist:   
	perl Configure dist
	$(PERL) Configure dist
	@$(MAKE) dist_pem_h
	@$(MAKE) SDIRS='${SDIRS}' clean
	@$(MAKE) tar
@@ -301,7 +303,7 @@ install: all
	do \
	(       echo installing $$i; \
		cp $$i $(INSTALLTOP)/lib; \
		sh util/ranlib.sh $(INSTALLTOP)/lib/$$i; \
		$(RANLIB) $(INSTALLTOP)/lib/$$i; \
		chmod 644 $(INSTALLTOP)/lib/$$i ); \
	done

+3 −3
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ sreq.o: req.c
	$(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c

files:
	perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO

install:
	@for i in $(EXE) $(SCRIPTS); \
@@ -111,7 +111,7 @@ depend:
	$(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC)

dclean:
	perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
	mv -f Makefile.new $(MAKEFILE)

errors:
@@ -132,7 +132,7 @@ $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
	@(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; sh tools/c_rehash certs)

progs.h:
	perl ./progs.pl $(E_EXE) >progs.h
	$(PERL) ./progs.pl $(E_EXE) >progs.h
	$(RM) $(PROGRAM).o

# DO NOT DELETE THIS LINE -- make depend depends on it.
+27 −3
Original line number Diff line number Diff line
@@ -332,10 +332,34 @@ if [ -z "$OUT" ]; then
  OUT="$CC"
fi

if [ ".$PERL" = . ] ; then
	for i in . `echo $PATH | sed 's/:/ /g'`; do
		if [ -f "$i/perl5" ] ; then
			PERL="$i/perl5"
			break;
		fi;
	done
fi

if [ ".$PERL" = . ] ; then
	for i in . `echo $PATH | sed 's/:/ /g'`; do
		if [ -f "$i/perl" ] ; then
			PERL="$i/perl"
			break;
		fi;
	done
fi

if $PERL -e 'exit($]>=5.0);' ; then
	echo "You need Perl 5."
	exit 1
fi

# run Configure to check to see if we need to specify the 
# compiler for the platform ... in which case we add it on
# the end ... otherwise we leave it off
perl ./Configure 2>&1 | grep "$OUT-$CC" > /dev/null

$PERL ./Configure 2>&1 | grep "$OUT-$CC" > /dev/null
if [ $? = "0" ]; then
  OUT="$OUT-$CC"
fi
@@ -348,9 +372,9 @@ OUT="$PREFIX$OUT"
echo Configuring for $OUT

if [ "$TEST" = "true" ]; then
  echo ./Configure $OUT $options
  echo $PERL ./Configure $OUT $options
else
  perl ./Configure $OUT $options
  $PERL ./Configure $OUT $options
fi

)
Loading