make 1.3 KB

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