Add md5-sparcv9.pl.
[openssl.git] / crypto / md5 / Makefile
index 86f0f85422004cf0c95fc31167227978a54b4afe..5b289213f593e2a4a856ca5296484bead1def264 100644 (file)
@@ -1,5 +1,5 @@
 #
-# SSLeay/crypto/md5/Makefile
+# OpenSSL/crypto/md5/Makefile
 #
 
 DIR=    md5
@@ -8,12 +8,6 @@ CC=     cc
 CPP=    $(CC) -E
 INCLUDES=-I.. -I$(TOP) -I../../include
 CFLAG=-g
-INSTALL_PREFIX=
-OPENSSLDIR=     /usr/local/ssl
-INSTALLTOP=/usr/local/ssl
-MAKE=           make
-MAKEDEPPROG=   makedepend
-MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 MAKEFILE=       Makefile
 AR=             ar r
 
@@ -44,37 +38,22 @@ top:
 all:    lib
 
 lib:    $(LIBOBJ)
-       $(AR) $(LIB) $(LIBOBJ)
+       $(ARX) $(LIB) $(LIBOBJ)
        $(RANLIB) $(LIB) || echo Never mind.
        @touch lib
 
-# ELF
-mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > ../$@)
-# COFF
-mx86-cof.s: asm/md5-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) md5-586.pl coff $(CFLAGS) > ../$@)
-# a.out
-mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
-
-md5-sparcv8plus.o: asm/md5-sparcv9.S
-       $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
-               -o md5-sparcv8plus.o asm/md5-sparcv9.S
-
-# Old GNU assembler doesn't understand V9 instructions, so we
-# hire /usr/ccs/bin/as to do the job. Note that option is called
-# *-gcc27, but even gcc 2>=8 users may experience similar problem
-# if they didn't bother to upgrade GNU assembler. Such users should
-# not choose this option, but be adviced to *remove* GNU assembler
-# or upgrade it.
-md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S
-       $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \
-               /usr/ccs/bin/as -xarch=v8plus - -o md5-sparcv8plus-gcc27.o
-
-md5-sparcv9.o: asm/md5-sparcv9.S
-       $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
-               -o md5-sparcv9.o asm/md5-sparcv9.S
+md5-586.s:     asm/md5-586.pl ../perlasm/x86asm.pl
+       $(PERL) asm/md5-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
+
+md5-x86_64.s:  asm/md5-x86_64.pl
+       $(PERL) asm/md5-x86_64.pl $(PERLASM_SCHEME) > $@
+
+md5-ia64.s: asm/md5-ia64.S
+       $(CC) $(CFLAGS) -E asm/md5-ia64.S | \
+       $(PERL) -ne 's/;\s+/;\n/g; print;' > $@
+
+md5-sparcv9.S: asm/md5-sparcv9.pl
+       $(PERL) asm/md5-sparcv9.pl $@ $(CFLAGS)
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -85,6 +64,7 @@ links:
        @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
 install:
+       @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
        do  \
        (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
@@ -100,6 +80,7 @@ lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
 depend:
+       @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
        $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
 
 dclean: