diff options
Diffstat (limited to '')
| -rw-r--r-- | auto/lib/sha1/make | 96 | ||||
| -rw-r--r-- | auto/lib/sha1/makefile.bcc | 19 | ||||
| -rw-r--r-- | auto/lib/sha1/makefile.msvc | 19 | ||||
| -rw-r--r-- | auto/lib/sha1/makefile.owc | 9 |
4 files changed, 143 insertions, 0 deletions
diff --git a/auto/lib/sha1/make b/auto/lib/sha1/make new file mode 100644 index 000000000..bd1036e1f --- /dev/null +++ b/auto/lib/sha1/make @@ -0,0 +1,96 @@ + +# Copyright (C) Igor Sysoev + + +case "$NGX_CC_NAME" in + + msvc*) + ngx_makefile=makefile.msvc + ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC SHA1_ASM=$SHA1_ASM" + ;; + + owc*) + ngx_makefile=makefile.owc + ngx_opt="CPU_OPT=\"$CPU_OPT\"" + ;; + + bcc) + ngx_makefile=makefile.bcc + ngx_opt="-DCPU_OPT=\"$CPU_OPT\" -DSHA1_ASM=$SHA1_ASM" + ;; + +esac + + +done=NO + + +case "$NGX_PLATFORM" in + + win32) + cp auto/lib/sha1/$ngx_makefile $SHA1 + + cat << END >> $NGX_MAKEFILE + +`echo "$SHA1/sha1.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"` + cd `echo $SHA1 | sed -e "s/\//$ngx_regex_dirsep/g"` + \$(MAKE) -f $ngx_makefile $ngx_opt + cd ..\\..\\.. + +END + + done=YES + ;; + + SunOS:*:i86pc) + if [ $SHA1_ASM = YES ]; then + + cat << END >> $NGX_MAKEFILE + +$SHA1/libsha.a: $NGX_MAKEFILE + cd $SHA1 \\ + && \$(MAKE) CFLAGS="$SHA1_OPT -DSOL -DSHA1_ASM -DL_ENDIAN" \\ + CC="\$(CC)" CPP="\$(CPP)" \\ + SHA_ASM_OBJ=asm/sx86-sol.o clean libsha.a + +END + + done=YES + fi + ;; + + # FreeBSD: i386 + # Linux: i686 + + *:i386 | *:i686) + if [ $SHA1_ASM = YES ]; then + + cat << END >> $NGX_MAKEFILE + +$SHA1/libsha.a: $NGX_MAKEFILE + cd $SHA1 \\ + && \$(MAKE) CFLAGS="$SHA1_OPT -DELF -DSHA1_ASM -DL_ENDIAN" \\ + CC="\$(CC)" CPP="\$(CPP)" \\ + SHA_ASM_OBJ=asm/sx86-elf.o clean libsha.a + +END + + done=YES + fi + ;; + +esac + + +if [ $done = NO ]; then + + cat << END >> $NGX_MAKEFILE + +$SHA1/libsha.a: $NGX_MAKEFILE + cd $SHA1 \\ + && \$(MAKE) CFLAGS="$SHA1_OPT" \\ + CC="\$(CC)" SHA_ASM_OBJ= clean libsha.a + +END + +fi diff --git a/auto/lib/sha1/makefile.bcc b/auto/lib/sha1/makefile.bcc new file mode 100644 index 000000000..255e56a89 --- /dev/null +++ b/auto/lib/sha1/makefile.bcc @@ -0,0 +1,19 @@ + +# Copyright (C) Igor Sysoev + + +CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN + +!if "$(SHA1_ASM)" == "YES" + +sha1.lib: + bcc32 -c $(CFLAGS) -DSHA1_ASM sha1dgst.c + tlib sha1.lib +sha1dgst.obj +"asm\s-win32.obj" + +!else + +sha1.lib: + bcc32 -c $(CFLAGS) sha1dgst.c + tlib sha1.lib +sha1dgst.obj + +!endif diff --git a/auto/lib/sha1/makefile.msvc b/auto/lib/sha1/makefile.msvc new file mode 100644 index 000000000..2ec55d5a8 --- /dev/null +++ b/auto/lib/sha1/makefile.msvc @@ -0,0 +1,19 @@ + +# Copyright (C) Igor Sysoev + + +CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN + +!if "$(SHA1_ASM)" == "YES" + +sha1.lib: + cl -c $(CFLAGS) -D SHA1_ASM sha1dgst.c + link -lib -out:sha1.lib sha1dgst.obj asm/s-win32.obj + +!else + +sha1.lib: + cl -c $(CFLAGS) sha1dgst.c + link -lib -out:sha1.lib sha1dgst.obj + +!endif diff --git a/auto/lib/sha1/makefile.owc b/auto/lib/sha1/makefile.owc new file mode 100644 index 000000000..767870d8a --- /dev/null +++ b/auto/lib/sha1/makefile.owc @@ -0,0 +1,9 @@ + +# Copyright (C) Igor Sysoev + + +CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT) + +sha1.lib: + wcl386 -c $(CFLAGS) -dL_ENDIAN sha1dgst.c + wlib -n sha1.lib sha1dgst.obj |
