2004-03-01 10:45:48 -06:00
|
|
|
|
2004-09-29 11:00:49 -05:00
|
|
|
# Copyright (C) Igor Sysoev
|
|
|
|
|
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
case "$NGX_CC_NAME" in
|
2004-03-09 13:47:07 -06:00
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
msvc*)
|
|
|
|
ngx_makefile=makefile.msvc
|
2005-03-22 10:02:46 -06:00
|
|
|
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC MD5_ASM=$MD5_ASM"
|
2004-03-09 13:47:07 -06:00
|
|
|
;;
|
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
owc*)
|
|
|
|
ngx_makefile=makefile.owc
|
2005-03-22 10:02:46 -06:00
|
|
|
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
2004-03-29 11:43:58 -06:00
|
|
|
;;
|
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
bcc)
|
|
|
|
ngx_makefile=makefile.bcc
|
2005-03-22 10:02:46 -06:00
|
|
|
ngx_opt="-DCPU_OPT=\"$CPU_OPT\" -DMD5_ASM=$MD5_ASM"
|
2004-03-09 13:47:07 -06:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2004-03-01 10:45:48 -06:00
|
|
|
|
2004-03-11 15:34:52 -06:00
|
|
|
done=NO
|
|
|
|
|
|
|
|
|
2005-02-22 08:40:13 -06:00
|
|
|
case "$NGX_PLATFORM" in
|
2004-03-01 10:45:48 -06:00
|
|
|
|
2004-03-09 13:47:07 -06:00
|
|
|
win32)
|
2004-11-20 13:52:20 -06:00
|
|
|
cp auto/lib/md5/$ngx_makefile $MD5
|
|
|
|
|
|
|
|
cat << END >> $NGX_MAKEFILE
|
|
|
|
|
|
|
|
`echo "$MD5/md5.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
|
|
|
cd `echo $MD5 | sed -e "s/\//$ngx_regex_dirsep/g"`
|
|
|
|
\$(MAKE) -f $ngx_makefile $ngx_opt
|
|
|
|
cd ..\\..\\..
|
2004-03-09 13:47:07 -06:00
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
END
|
2004-03-11 15:34:52 -06:00
|
|
|
|
|
|
|
done=YES
|
2004-03-09 13:47:07 -06:00
|
|
|
;;
|
|
|
|
|
2004-03-10 11:55:19 -06:00
|
|
|
SunOS:*:i86pc)
|
2004-03-10 14:56:39 -06:00
|
|
|
if [ $MD5_ASM = YES ]; then
|
2004-03-11 15:34:52 -06:00
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
cat << END >> $NGX_MAKEFILE
|
2004-03-11 15:34:52 -06:00
|
|
|
|
2004-11-20 13:52:20 -06: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-11 15:34:52 -06:00
|
|
|
|
|
|
|
done=YES
|
2004-03-10 14:56:39 -06:00
|
|
|
fi
|
2004-03-01 10:45:48 -06:00
|
|
|
;;
|
|
|
|
|
2004-03-11 15:34:52 -06:00
|
|
|
# FreeBSD: i386
|
|
|
|
# Linux: i686
|
|
|
|
|
2004-03-11 09:42:41 -06:00
|
|
|
*:i386 | *:i686)
|
2004-03-10 14:56:39 -06:00
|
|
|
if [ $MD5_ASM = YES ]; then
|
2004-03-11 15:34:52 -06:00
|
|
|
|
2004-11-20 13:52:20 -06: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-11 15:34:52 -06:00
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
END
|
2004-03-01 10:45:48 -06:00
|
|
|
|
2004-03-11 15:34:52 -06:00
|
|
|
done=YES
|
|
|
|
fi
|
2004-03-01 10:45:48 -06:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2004-03-11 15:34:52 -06:00
|
|
|
|
|
|
|
if [ $done = NO ]; then
|
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
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-11 15:34:52 -06:00
|
|
|
|
2004-11-20 13:52:20 -06:00
|
|
|
END
|
|
|
|
|
|
|
|
fi
|