nginx/auto/lib/md5/make
2004-03-29 17:43:58 +00:00

96 lines
2.3 KiB
Plaintext

case "$CC" in
cl)
makefile=makefile.msvc
opt="CPU_OPT=$CPU_OPT LIBC=$LIBC MD5_ASM=$MD5_ASM"
;;
wcl386)
makefile=makefile.owc
opt="CPU_OPT=$CPU_OPT"
;;
bcc32)
makefile=makefile.bcc
opt="-DCPU_OPT=$CPU_OPT -DMD5_ASM=$MD5_ASM"
;;
esac
case $PLATFORM in
win32)
line=`echo $MD5/md5.lib: | sed -e "s/\//$DIRSEP/g"`
echo "$line" >> $MAKEFILE
;;
*)
echo "$MD5/libmd5.a:" >> $MAKEFILE
;;
esac
done=NO
case $PLATFORM in
win32)
md5=`echo $MD5 | sed -e "s/\//$DIRSEP/g"`
cp auto/lib/md5/$makefile $MD5
echo " cd $md5" >> $MAKEFILE
echo " \$(MAKE) -f $makefile $opt" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
done=YES
;;
SunOS:*:i86pc)
if [ $MD5_ASM = YES ]; then
MD5_OPT="CFLAGS=\"$MD5_OPT -DSOL -DMD5_ASM -DL_ENDIAN\""
echo " cd $MD5 \\" >> $MAKEFILE
echo " && \$(MAKE) $MD5_OPT \\" >> $MAKEFILE
echo " MD5_ASM_OBJ=asm/mx86-sol.o \\" >> $MAKEFILE
echo " CC=\"\$(CC)\" CPP=\"\$(CPP)\" \\" >> $MAKEFILE
echo " libmd5.a" >> $MAKEFILE
done=YES
fi
;;
# FreeBSD: i386
# Linux: i686
*:i386 | *:i686)
if [ $MD5_ASM = YES ]; then
MD5_OPT="CFLAGS=\"$MD5_OPT -DELF -DMD5_ASM -DL_ENDIAN\""
echo " cd $MD5 \\" >> $MAKEFILE
echo " && \$(MAKE) $MD5_OPT \\" >> $MAKEFILE
echo " MD5_ASM_OBJ=asm/mx86-elf.o \\" >> $MAKEFILE
echo " CC=\"\$(CC)\" CPP=\"\$(CPP)\" \\" >> $MAKEFILE
echo " libmd5.a" >> $MAKEFILE
done=YES
fi
;;
esac
if [ $done = NO ]; then
echo " cd $MD5 \\" >> $MAKEFILE
echo " && \$(MAKE) CFLAGS=\"$MD5_OPT\" \\" >> $MAKEFILE
echo " MD5_ASM_OBJ= CC=\"\$(CC)\" libmd5.a" >> $MAKEFILE
fi
echo >> $MAKEFILE