make 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. case "$CC" in
  4. cl)
  5. cat << END >> $NGX_MAKEFILE
  6. $OPENSSL/openssl/include/openssl/ssl.h: $NGX_MAKEFILE
  7. \$(MAKE) -f auto/lib/openssl/makefile.msvc \
  8. OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT"
  9. END
  10. ;;
  11. bcc32)
  12. ngx_opt=`echo "-DOPENSSL=\"$OPENSSL\" -DOPENSSL_OPT=\"$OPENSSL_OPT\"" \
  13. | sed -e "s/\//$ngx_regex_dirsep/g"`
  14. cat << END >> $NGX_MAKEFILE
  15. `echo "$OPENSSL\\openssl\\lib\\libeay32.lib: \
  16. $OPENSSL\\openssl\\include\\openssl\\ssl.h" \
  17. | sed -e "s/\//$ngx_regex_dirsep/g"`
  18. `echo "$OPENSSL\\openssl\\lib\\ssleay32.lib: \
  19. $OPENSSL\\openssl\\include\\openssl\\ssl.h" \
  20. | sed -e "s/\//$ngx_regex_dirsep/g"`
  21. `echo "$OPENSSL\\openssl\\include\\openssl\\ssl.h: $NGX_MAKEFILE" \
  22. | sed -e "s/\//$ngx_regex_dirsep/g"`
  23. \$(MAKE) -f auto/lib/openssl/makefile.bcc $ngx_opt
  24. END
  25. ;;
  26. *)
  27. case $OPENSSL in
  28. /*) ngx_prefix="$OPENSSL/.openssl" ;;
  29. *) ngx_prefix="$PWD/$OPENSSL/.openssl" ;;
  30. esac
  31. cat << END >> $NGX_MAKEFILE
  32. $OPENSSL/.openssl/include/openssl/ssl.h: $NGX_MAKEFILE
  33. cd $OPENSSL \\
  34. && if [ -f Makefile ]; then \$(MAKE) clean; fi \\
  35. && ./config --prefix=$ngx_prefix no-shared no-threads $OPENSSL_OPT \\
  36. && \$(MAKE) \\
  37. && \$(MAKE) install_sw LIBDIR=lib
  38. END
  39. ;;
  40. esac