winlin

support build with jobs

@@ -28,7 +28,7 @@ else @@ -28,7 +28,7 @@ else
28 cd $ff_current_dir && 28 cd $ff_current_dir &&
29 rm -rf yasm-1.2.0 && unzip -q ${ff_src_dir}/yasm-1.2.0.zip && 29 rm -rf yasm-1.2.0 && unzip -q ${ff_src_dir}/yasm-1.2.0.zip &&
30 cd yasm-1.2.0 && ./configure --prefix=${ff_release_dir} && 30 cd yasm-1.2.0 && ./configure --prefix=${ff_release_dir} &&
31 - make ${SRS_JOBS} && make install 31 + make && make install
32 ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build yasm-1.2.0 failed"; exit 1; fi 32 ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build yasm-1.2.0 failed"; exit 1; fi
33 fi 33 fi
34 # add yasm to path, for x264 to use yasm directly. 34 # add yasm to path, for x264 to use yasm directly.
@@ -43,7 +43,7 @@ else @@ -43,7 +43,7 @@ else
43 cd $ff_current_dir && 43 cd $ff_current_dir &&
44 rm -rf libaacplus-2.0.2 && unzip -q ${ff_src_dir}/libaacplus-2.0.2.zip && 44 rm -rf libaacplus-2.0.2 && unzip -q ${ff_src_dir}/libaacplus-2.0.2.zip &&
45 cd libaacplus-2.0.2 && cp ../${ff_src_dir}/libaacplus-patch-26410-800.zip src/26410-800.zip && 45 cd libaacplus-2.0.2 && cp ../${ff_src_dir}/libaacplus-patch-26410-800.zip src/26410-800.zip &&
46 - bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make ${SRS_JOBS} && make install 46 + bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make && make install
47 ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi 47 ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi
48 fi 48 fi
49 49
1 #!/bin/bash 1 #!/bin/bash
2 2
  3 +# variables:
  4 +# SRS_JOBS: the build jobs, parent script must set it.
  5 +
3 ##################################################################################### 6 #####################################################################################
4 ##################################################################################### 7 #####################################################################################
5 # prepare the depends tools and libraries 8 # prepare the depends tools and libraries
@@ -183,7 +186,7 @@ else @@ -183,7 +186,7 @@ else
183 rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} && 186 rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
184 unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 && 187 unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 &&
185 patch -p1 < ../../3rdparty/1.st.arm.Makefile.patch && 188 patch -p1 < ../../3rdparty/1.st.arm.Makefile.patch &&
186 - make linux-debug ${SRS_JOBS}&& 189 + make linux-debug &&
187 cd .. && rm -f st && ln -sf st-1.9/obj st 190 cd .. && rm -f st && ln -sf st-1.9/obj st
188 ) 191 )
189 fi 192 fi
@@ -205,7 +208,7 @@ if [ $SRS_HTTP = YES ]; then @@ -205,7 +208,7 @@ if [ $SRS_HTTP = YES ]; then
205 cd http-parser-2.1 && 208 cd http-parser-2.1 &&
206 sed -i "s/CPPFLAGS_FAST +=.*$/CPPFLAGS_FAST = \$\(CPPFLAGS_DEBUG\)/g" Makefile && 209 sed -i "s/CPPFLAGS_FAST +=.*$/CPPFLAGS_FAST = \$\(CPPFLAGS_DEBUG\)/g" Makefile &&
207 sed -i "s/CFLAGS_FAST =.*$/CFLAGS_FAST = \$\(CFLAGS_DEBUG\)/g" Makefile && 210 sed -i "s/CFLAGS_FAST =.*$/CFLAGS_FAST = \$\(CFLAGS_DEBUG\)/g" Makefile &&
208 - make package ${SRS_JOBS} && 211 + make package &&
209 cd .. && rm -f hp && ln -sf http-parser-2.1 hp 212 cd .. && rm -f hp && ln -sf http-parser-2.1 hp
210 ) 213 )
211 fi 214 fi
@@ -352,7 +355,7 @@ if [ $SRS_SSL = YES ]; then @@ -352,7 +355,7 @@ if [ $SRS_SSL = YES ]; then
352 rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && 355 rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
353 unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && 356 unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
354 ./config --prefix=`pwd`/_release -no-shared && 357 ./config --prefix=`pwd`/_release -no-shared &&
355 - make ${SRS_JOBS} && make install && 358 + make && make install &&
356 cd .. && ln -sf openssl-1.0.1f/_release openssl 359 cd .. && ln -sf openssl-1.0.1f/_release openssl
357 ) 360 )
358 fi 361 fi
@@ -15,7 +15,9 @@ YELLOW="\\e[33m" @@ -15,7 +15,9 @@ YELLOW="\\e[33m"
15 BLACK="\\e[0m" 15 BLACK="\\e[0m"
16 16
17 ##################################################################################### 17 #####################################################################################
18 -# parse user options, set the variables like SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP 18 +# parse user options, set the variables like:
  19 +# srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP/SRS_RESEARCH/SRS_UTEST
  20 +# build options: SRS_JOBS
19 ##################################################################################### 21 #####################################################################################
20 # parse options, exit with error when parse options invalid. 22 # parse options, exit with error when parse options invalid.
21 . auto/options.sh 23 . auto/options.sh