正在显示
1 个修改的文件
包含
24 行增加
和
28 行删除
@@ -145,16 +145,30 @@ END | @@ -145,16 +145,30 @@ END | ||
145 | # makefile | 145 | # makefile |
146 | echo "generate Makefile" | 146 | echo "generate Makefile" |
147 | cat << END > ${SRS_MAKEFILE} | 147 | cat << END > ${SRS_MAKEFILE} |
148 | -.PHONY: default help clean server bandwidth librtmp librtmp-sample utest _prepare_dir | 148 | +.PHONY: default _default help clean server bandwidth librtmp librtmp-sample utest _prepare_dir |
149 | 149 | ||
150 | -# linux shell color support. | ||
151 | -RED="\\${RED}" | ||
152 | -GREEN="\\${GREEN}" | ||
153 | -YELLOW="\\${YELLOW}" | ||
154 | -BLACK="\\${BLACK}" | 150 | +END |
151 | + | ||
152 | +# arm, ubuntu12, use arm tool chain. | ||
153 | +if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
154 | + cat << END >> ${SRS_MAKEFILE} | ||
155 | +default: | ||
156 | + \$(MAKE) GCC=${SrsArmGCC} CXX=${SrsArmCXX} AR=${SrsArmAR} LINK=${SrsArmCXX} _default | ||
157 | + | ||
158 | +END | ||
159 | +# x86/x64, use gnu-gcc/g++ tool chain. | ||
160 | +else | ||
161 | + cat << END >> ${SRS_MAKEFILE} | ||
162 | +default: | ||
163 | + \$(MAKE) _default | ||
155 | 164 | ||
156 | -default: bandwidth librtmp-sample utest | ||
157 | - @bash ${SRS_OBJS}/${SRS_BUILD_SUMMARY} | 165 | +END |
166 | +fi | ||
167 | + | ||
168 | +# the real entry for all platform. | ||
169 | +cat << END >> ${SRS_MAKEFILE} | ||
170 | +_default: bandwidth librtmp-sample utest | ||
171 | + @bash objs/_srs_build_summary.sh | ||
158 | 172 | ||
159 | help: | 173 | help: |
160 | @echo "Usage: make <help>|<clean>|<server>|<bandwidth>|<librtmp>|<librtmp-sample>|<utest>" | 174 | @echo "Usage: make <help>|<clean>|<server>|<bandwidth>|<librtmp>|<librtmp-sample>|<utest>" |
@@ -207,13 +221,7 @@ librtmp: server | @@ -207,13 +221,7 @@ librtmp: server | ||
207 | 221 | ||
208 | END | 222 | END |
209 | fi | 223 | fi |
210 | -SrsLibrtmpSampleCompile=NO | ||
211 | -if [ $SRS_ARM_UBUNTU12 = NO ]; then | ||
212 | - if [ $SRS_LIBRTMP = YES ]; then | ||
213 | - SrsLibrtmpSampleCompile=YES | ||
214 | - fi | ||
215 | -fi | ||
216 | -if [ $SrsLibrtmpSampleCompile = YES ]; then | 224 | +if [ $SRS_LIBRTMP = YES ]; then |
217 | cat << END >> ${SRS_MAKEFILE} | 225 | cat << END >> ${SRS_MAKEFILE} |
218 | 226 | ||
219 | librtmp-sample: librtmp | 227 | librtmp-sample: librtmp |
@@ -270,23 +278,11 @@ SrsGperf=""; SrsGperfLink=""; if [ $SRS_GPERF = YES ]; then SrsGperfLink=" -lpth | @@ -270,23 +278,11 @@ SrsGperf=""; SrsGperfLink=""; if [ $SRS_GPERF = YES ]; then SrsGperfLink=" -lpth | ||
270 | # the cxx flag generated. | 278 | # the cxx flag generated. |
271 | CXXFLAGS="${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}" | 279 | CXXFLAGS="${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}" |
272 | if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi | 280 | if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi |
273 | -# arm or i386/x86_64 | ||
274 | -if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
275 | - cat << END > ${SRS_OBJS}/${SRS_MAKEFILE} | ||
276 | -GCC = ${SrsArmGCC} | ||
277 | -CXX = ${SrsArmCXX} | ||
278 | -AR = ${SrsArmAR} | ||
279 | -LINK = ${SrsArmCXX} | ||
280 | -END | ||
281 | -else | ||
282 | - cat << END > ${SRS_OBJS}/${SRS_MAKEFILE} | 281 | +cat << END > ${SRS_OBJS}/${SRS_MAKEFILE} |
283 | GCC = gcc | 282 | GCC = gcc |
284 | CXX = g++ | 283 | CXX = g++ |
285 | AR = ar | 284 | AR = ar |
286 | LINK = g++ | 285 | LINK = g++ |
287 | -END | ||
288 | -fi | ||
289 | -cat << END >> ${SRS_OBJS}/${SRS_MAKEFILE} | ||
290 | CXXFLAGS = ${CXXFLAGS} | 286 | CXXFLAGS = ${CXXFLAGS} |
291 | 287 | ||
292 | .PHONY: default srs bandwidth librtmp | 288 | .PHONY: default srs bandwidth librtmp |
-
请 注册 或 登录 后发表评论