nginx/auto/lib/md5/make
2004-03-25 20:03:02 +00:00

88 lines
2.1 KiB
Plaintext

case "$CC" in
cl)
makefile=makefile.msvc
;;
wcl386)
makefile=makefile.owc
;;
esac
case $PLATFORM in
win32)
echo "$MD5/md5.lib:" >> $MAKEFILE
;;
*)
echo "$MD5/libmd5.a:" >> $MAKEFILE
;;
esac
done=NO
case $PLATFORM in
win32)
cp auto/lib/md5/$makefile $MD5
echo " cd $MD5" >> $MAKEFILE
echo $ngx_n " \$(MAKE) -f $makefile" $ngx_c >> $MAKEFILE
echo " CPU_OPT=$CPU_OPT LIBC=$LIBC MD5_ASM=$MD5_ASM" >> $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