make 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. case "$NGX_CC_NAME" in
  4. msvc)
  5. ngx_makefile=makefile.msvc
  6. ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC"
  7. ngx_pcre="PCRE=\"$PCRE\""
  8. ;;
  9. owc)
  10. ngx_makefile=makefile.owc
  11. ngx_opt="CPU_OPT=\"$CPU_OPT\""
  12. ngx_pcre=`echo PCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
  13. ;;
  14. bcc)
  15. ngx_makefile=makefile.bcc
  16. ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
  17. ngx_pcre=`echo \-DPCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
  18. ;;
  19. *)
  20. ngx_makefile=
  21. ;;
  22. esac
  23. if [ -n "$ngx_makefile" ]; then
  24. cat << END >> $NGX_MAKEFILE
  25. `echo "$PCRE/pcre.lib: $PCRE/pcre.h $NGX_MAKEFILE" \
  26. | sed -e "s/\//$ngx_regex_dirsep/g"`
  27. \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
  28. `echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
  29. \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
  30. END
  31. else
  32. cat << END >> $NGX_MAKEFILE
  33. $PCRE/pcre.h: $PCRE/Makefile
  34. $PCRE/Makefile: $NGX_MAKEFILE
  35. cd $PCRE \\
  36. && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
  37. && CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
  38. ./configure --disable-shared $PCRE_CONF_OPT
  39. $PCRE/.libs/libpcre.a: $PCRE/Makefile
  40. cd $PCRE \\
  41. && \$(MAKE) libpcre.la
  42. END
  43. fi