nginx/auto/lib/md5/make

96 lines
1.8 KiB
Plaintext
Raw Normal View History

2004-03-02 00:45:48 +08:00
# Copyright (C) Igor Sysoev
case "$NGX_CC_NAME" in
2004-03-10 03:47:07 +08:00
msvc*)
ngx_makefile=makefile.msvc
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC MD5_ASM=$MD5_ASM"
ngx_md5="MD5=\"$MD5\""
2004-03-10 03:47:07 +08:00
;;
owc*)
ngx_makefile=makefile.owc
ngx_opt="CPU_OPT=\"$CPU_OPT\""
ngx_md5=`echo MD5=\"$MD5\" | sed -e "s/\//$ngx_regex_dirsep/g"`
2004-03-30 01:43:58 +08:00
;;
bcc)
ngx_makefile=makefile.bcc
ngx_opt="-DCPU_OPT=\"$CPU_OPT\" -DMD5_ASM=$MD5_ASM"
ngx_md5=`echo \-DMD5=\"$MD5\" | sed -e "s/\//$ngx_regex_dirsep/g"`
2004-03-10 03:47:07 +08:00
;;
esac
2004-03-02 00:45:48 +08:00
2004-03-12 05:34:52 +08:00
done=NO
case "$NGX_PLATFORM" in
2004-03-02 00:45:48 +08:00
2004-03-10 03:47:07 +08:00
win32)
cat << END >> $NGX_MAKEFILE
`echo "$MD5/md5.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
\$(MAKE) -f auto/lib/md5/$ngx_makefile $ngx_opt $ngx_md5
2004-03-10 03:47:07 +08:00
END
2004-03-12 05:34:52 +08:00
done=YES
2004-03-10 03:47:07 +08:00
;;
2004-03-11 01:55:19 +08:00
SunOS:*:i86pc)
2004-03-11 04:56:39 +08:00
if [ $MD5_ASM = YES ]; then
2004-03-12 05:34:52 +08:00
cat << END >> $NGX_MAKEFILE
2004-03-12 05:34:52 +08:00
$MD5/libmd5.a: $NGX_MAKEFILE
cd $MD5 \\
&& \$(MAKE) CFLAGS="$MD5_OPT -DSOL -DMD5_ASM -DL_ENDIAN" \\
CC="\$(CC)" CPP="\$(CPP)" \\
MD5_ASM_OBJ=asm/mx86-sol.o clean libmd5.a
END
2004-03-12 05:34:52 +08:00
done=YES
2004-03-11 04:56:39 +08:00
fi
2004-03-02 00:45:48 +08:00
;;
2004-03-12 05:34:52 +08:00
# FreeBSD: i386
# Linux: i686
2004-03-11 23:42:41 +08:00
*:i386 | *:i686)
2004-03-11 04:56:39 +08:00
if [ $MD5_ASM = YES ]; then
2004-03-12 05:34:52 +08:00
cat << END >> $NGX_MAKEFILE
$MD5/libmd5.a: $NGX_MAKEFILE
cd $MD5 \\
&& \$(MAKE) CFLAGS="$MD5_OPT -DELF -DMD5_ASM -DL_ENDIAN" \\
CC="\$(CC)" CPP="\$(CPP)" \\
MD5_ASM_OBJ=asm/mx86-elf.o clean libmd5.a
2004-03-12 05:34:52 +08:00
END
2004-03-02 00:45:48 +08:00
2004-03-12 05:34:52 +08:00
done=YES
fi
2004-03-02 00:45:48 +08:00
;;
esac
2004-03-12 05:34:52 +08:00
if [ $done = NO ]; then
cat << END >> $NGX_MAKEFILE
$MD5/libmd5.a: $NGX_MAKEFILE
cd $MD5 \\
&& \$(MAKE) CFLAGS="$MD5_OPT" \\
CC="\$(CC)" MD5_ASM_OBJ= clean libmd5.a
2004-03-12 05:34:52 +08:00
END
fi