Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / lib / pcre / make
blobbd50a662c9dc4cf6618c2395418359912653d868
2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 case "$NGX_CC_NAME" in
8     msvc*)
9         ngx_makefile=makefile.msvc
10         ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC"
11         ngx_pcre="PCRE=\"$PCRE\""
12     ;;
14     owc*)
15         ngx_makefile=makefile.owc
16         ngx_opt="CPU_OPT=\"$CPU_OPT\""
17         ngx_pcre=`echo PCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
18     ;;
20     bcc)
21         ngx_makefile=makefile.bcc
22         ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
23         ngx_pcre=`echo \-DPCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
24     ;;
26 esac
29 case "$NGX_PLATFORM" in
31     win32)
33         cat << END                                            >> $NGX_MAKEFILE
35 `echo "$PCRE/pcre.lib:  $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
36         \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
38 `echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
39         \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
41 END
43     ;;
45     *)
46         cat << END                                            >> $NGX_MAKEFILE
48 $PCRE/pcre.h:   $PCRE/Makefile
50 $PCRE/Makefile: $NGX_MAKEFILE
51         cd $PCRE \\
52         && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
53         && CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
54         ./configure --host=mipsel-linux --build=$(shell (gcc -dumpmachine)) --disable-shared $PCRE_CONF_OPT
56 $PCRE/.libs/libpcre.a:  $PCRE/Makefile
57         cd $PCRE \\
58         && \$(MAKE) libpcre.la
60 END
62     ;;
64 esac