正在显示
1 个修改的文件
包含
43 行增加
和
28 行删除
@@ -8,6 +8,13 @@ SRS_OBJS="objs" | @@ -8,6 +8,13 @@ SRS_OBJS="objs" | ||
8 | mkdir -p ${SRS_OBJS} | 8 | mkdir -p ${SRS_OBJS} |
9 | 9 | ||
10 | ##################################################################################### | 10 | ##################################################################################### |
11 | +# linux shell color support. | ||
12 | +RED="\\e[31m" | ||
13 | +GREEN="\\e[32m" | ||
14 | +YELLOW="\\e[33m" | ||
15 | +BLACK="\\e[0m" | ||
16 | + | ||
17 | +##################################################################################### | ||
11 | # parse user options, set the variables like SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP | 18 | # parse user options, set the variables like SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP |
12 | ##################################################################################### | 19 | ##################################################################################### |
13 | # parse options, exit with error when parse options invalid. | 20 | # parse options, exit with error when parse options invalid. |
@@ -40,17 +47,20 @@ echo "" >> $SRS_AUTO_HEADERS_H | @@ -40,17 +47,20 @@ echo "" >> $SRS_AUTO_HEADERS_H | ||
40 | 47 | ||
41 | ##################################################################################### | 48 | ##################################################################################### |
42 | # srs-librtmp sample entry | 49 | # srs-librtmp sample entry |
43 | -SrsLibrtmpSampleEntry="nossl" | ||
44 | -if [ $SRS_SSL = YES ]; then | ||
45 | - SrsLibrtmpSampleEntry="ssl" | ||
46 | -fi | ||
47 | - | 50 | +SrsLibrtmpSampleEntry="nossl"; if [ $SRS_SSL = YES ]; then SrsLibrtmpSampleEntry="ssl";fi |
48 | # utest make entry, (cd utest; make) | 51 | # utest make entry, (cd utest; make) |
49 | -SrsUtestMakeEntry="@echo -e \"\$(YELLOW)ignore utest for it's disabled\$(BLACK)\"" | ||
50 | -if [ $SRS_UTEST = YES ]; then | ||
51 | - SrsUtestMakeEntry="(cd utest; make)" | ||
52 | -fi | 52 | +SrsUtestMakeEntry="@echo -e \"ignore utest for it's disabled\""; if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd utest; make)"; fi |
53 | 53 | ||
54 | +##################################################################################### | ||
55 | +# colorful summary | ||
56 | +SrsHlsSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\$(GREEN)"; fi | ||
57 | +SrsSslSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\$(GREEN)"; fi | ||
58 | +SrsFfmpegSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\$(GREEN)"; fi | ||
59 | +SrsHttpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HTTP = YES ]; then SrsHttpSummaryColor="\$(GREEN)"; fi | ||
60 | +SrsResearchSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\$(GREEN)"; fi | ||
61 | +SrsUtestSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\$(GREEN)"; fi | ||
62 | + | ||
63 | +##################################################################################### | ||
54 | # makefile | 64 | # makefile |
55 | echo "generate Makefile" | 65 | echo "generate Makefile" |
56 | SRS_MAKEFILE="Makefile" | 66 | SRS_MAKEFILE="Makefile" |
@@ -58,20 +68,26 @@ cat << END > ${SRS_MAKEFILE} | @@ -58,20 +68,26 @@ cat << END > ${SRS_MAKEFILE} | ||
58 | .PHONY: default help clean server bandwidth librtmp librtmp-sample utest _prepare_dir | 68 | .PHONY: default help clean server bandwidth librtmp librtmp-sample utest _prepare_dir |
59 | 69 | ||
60 | # linux shell color support. | 70 | # linux shell color support. |
61 | -RED="\\\\e[31m" | ||
62 | -GREEN="\\\\e[32m" | ||
63 | -YELLOW="\\\\e[33m" | ||
64 | -BLACK="\\\\e[0m" | 71 | +RED="\\${RED}" |
72 | +GREEN="\\${GREEN}" | ||
73 | +YELLOW="\\${YELLOW}" | ||
74 | +BLACK="\\${BLACK}" | ||
65 | 75 | ||
66 | default: server bandwidth librtmp librtmp-sample utest | 76 | default: server bandwidth librtmp librtmp-sample utest |
67 | - @echo -e "\$(GREEN)" | ||
68 | - @echo -e "build success:" | ||
69 | - @echo -e " server: ./objs/srs, the srs server" | ||
70 | - @echo -e " bandwidth: ./objs/bandwidth, the bandwidth test client" | ||
71 | - @echo -e " librtmp: ./objs/include, ./objs/lib, the srs-librtmp library" | ||
72 | - @echo -e " librtmp-sample: ./research/librtmp, the srs-librtmp client sample" | ||
73 | - @echo -e " utest: ./objs/srs_utest, the utest for srs" | ||
74 | - @echo -e "\$(BLACK)" | 77 | + @echo -e "\$(GREEN)build summary:\$(BLACK)" |
78 | + @echo -e " \$(GREEN)server: ./objs/srs, the srs server\$(BLACK)" | ||
79 | + @echo -e " ${SrsHlsSummaryColor}hls: delivery HLS stream, @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\$(BLACK)" | ||
80 | + @echo -e " ${SrsSslSummaryColor}ssl: support RTMP complex handshake, @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\$(BLACK)" | ||
81 | + @echo -e " ${SrsFfmpegSummaryColor}ffmpeg: support transcoding with FFMPEG, @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\$(BLACK)" | ||
82 | + @echo -e " ${SrsHttpSummaryColor}http: support http callback, @see: https://github.com/winlinvip/simple-rtmp-server/wiki/HTTPCallback\$(BLACK)" | ||
83 | + @echo -e " \$(GREEN)bandwidth: ./objs/bandwidth, the bandwidth test client\$(BLACK)" | ||
84 | + @echo -e " \$(GREEN)librtmp: ./objs/include, ./objs/lib, the srs-librtmp library, @see: https://github.com/winlinvip/simple-rtmp-server/wiki/SrsLibrtmp\$(BLACK)" | ||
85 | + @echo -e " \$(GREEN)simple handshake: publish/play stream with simple handshake to server\$(BLACK)" | ||
86 | + @echo -e " ${SrsSslSummaryColor}complex handshake: it's not required to publish/play stream for client, recommend disable it for srs-librtmp\$(BLACK)" | ||
87 | + @echo -e " \$(GREEN)librtmp-sample: ./research/librtmp, the srs-librtmp client sample\$(BLACK)" | ||
88 | + @echo -e " ${SrsResearchSummaryColor}research: ./objs/research, api server, players, ts info.\$(BLACK)" | ||
89 | + @echo -e " ${SrsUtestSummaryColor}utest: ./objs/srs_utest, the utest for srs\$(BLACK)" | ||
90 | + @echo -e "\$(GREEN)binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\$(BLACK)" | ||
75 | 91 | ||
76 | help: | 92 | help: |
77 | @echo "Usage: make <help>|<clean>|<server>|<bandwidth>|<librtmp>|<librtmp-sample>|<utest>" | 93 | @echo "Usage: make <help>|<clean>|<server>|<bandwidth>|<librtmp>|<librtmp-sample>|<utest>" |
@@ -261,12 +277,6 @@ mkdir -p ${SRS_OBJS}/include | @@ -261,12 +277,6 @@ mkdir -p ${SRS_OBJS}/include | ||
261 | ##################################################################################### | 277 | ##################################################################################### |
262 | # configure summary | 278 | # configure summary |
263 | ##################################################################################### | 279 | ##################################################################################### |
264 | -# linux shell color support. | ||
265 | -RED="\\e[31m" | ||
266 | -GREEN="\\e[32m" | ||
267 | -YELLOW="\\e[33m" | ||
268 | -BLACK="\\e[0m" | ||
269 | - | ||
270 | # summary | 280 | # summary |
271 | echo "" | 281 | echo "" |
272 | echo "configure summary:" | 282 | echo "configure summary:" |
@@ -293,7 +303,12 @@ fi | @@ -293,7 +303,12 @@ fi | ||
293 | if [ $SRS_RESEARCH = YES ]; then | 303 | if [ $SRS_RESEARCH = YES ]; then |
294 | echo -e "${GREEN}research tools are builded${BLACK}" | 304 | echo -e "${GREEN}research tools are builded${BLACK}" |
295 | else | 305 | else |
296 | - echo -e "${BLACK}note: research tools are not builded${BLACK}" | 306 | + echo -e "${YELLOW}note: research tools are not builded${BLACK}" |
307 | +fi | ||
308 | +if [ $SRS_UTEST = YES ]; then | ||
309 | + echo -e "${GREEN}utest for srs are builded${BLACK}" | ||
310 | +else | ||
311 | + echo -e "${YELLOW}note: utest for srs are not builded${BLACK}" | ||
297 | fi | 312 | fi |
298 | 313 | ||
299 | ##################################################################################### | 314 | ##################################################################################### |
-
请 注册 或 登录 后发表评论