Don't use $(EXHEADER) directly in for loops, as most shells will break
[openssl.git] / crypto / md5 / Makefile.ssl
index 456326c8b7b7a69f145f8eb6e900797e55bc8087..032760d54a745ceb3fa250bbd67a30b14dd6a6bd 100644 (file)
@@ -21,6 +21,7 @@ MD5_ASM_OBJ=
 
 CFLAGS= $(INCLUDES) $(CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
 
 GENERAL=Makefile
 TEST=md5test.c
@@ -47,20 +48,15 @@ lib:    $(LIBOBJ)
        $(RANLIB) $(LIB) || echo Never mind.
        @touch lib
 
-# elf
+# ELF
 asm/mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > mx86-elf.s)
-
+       (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > ../$@)
+# COFF
+asm/mx86-cof.s: asm/md5-586.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) md5-586.pl coff $(CFLAGS) > ../$@)
 # a.out
-asm/mx86-out.o: asm/mx86unix.cpp
-       $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o
-
-# bsdi
-asm/mx86bsdi.o: asm/mx86unix.cpp
-       $(CPP) -DBSDI asm/mx86unix.cpp | sed 's/ :/:/' | as -o asm/mx86bsdi.o
-
-asm/mx86unix.cpp: asm/md5-586.pl ../perlasm/x86asm.pl
-       (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp)
+mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
 
 asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
        $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
@@ -90,7 +86,7 @@ links:
        @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
 install:
-       @for i in $(EXHEADER) ; \
+       @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
        do  \
        (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
        chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
@@ -112,7 +108,7 @@ dclean:
        mv -f Makefile.new $(MAKEFILE)
 
 clean:
-       rm -f asm/mx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+       rm -f asm/mx86unix.cpp asm/*.s asm/*.o *.s *.obj lib tags core .pure .nfs* *.old *.bak fluff
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.