Commit 9afbcea2b802f9742e3750032e9a97234f3f27fc
1 parent
01fb8719
优化makefile
Showing
4 changed files
with
50 additions
and
57 deletions
build/decoder/Makefile
@@ -6,7 +6,7 @@ PROJECT_ROOT= /home/cmhu/vpt_ascend_arm | @@ -6,7 +6,7 @@ PROJECT_ROOT= /home/cmhu/vpt_ascend_arm | ||
6 | DEPEND_DIR = $(PROJECT_ROOT)/bin | 6 | DEPEND_DIR = $(PROJECT_ROOT)/bin |
7 | SRC_ROOT = $(PROJECT_ROOT)/src | 7 | SRC_ROOT = $(PROJECT_ROOT)/src |
8 | 8 | ||
9 | -TARGET= $(PROJECT_ROOT)/bin/test_28181 | 9 | +TARGET= $(PROJECT_ROOT)/bin/test_dec |
10 | 10 | ||
11 | THIRDPARTY_ROOT = $(PROJECT_ROOT)/3rdparty | 11 | THIRDPARTY_ROOT = $(PROJECT_ROOT)/3rdparty |
12 | SPDLOG_ROOT = $(THIRDPARTY_ROOT)/spdlog-1.9.2/release | 12 | SPDLOG_ROOT = $(THIRDPARTY_ROOT)/spdlog-1.9.2/release |
@@ -14,44 +14,25 @@ OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv_4_1 | @@ -14,44 +14,25 @@ OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv_4_1 | ||
14 | JSON_ROOT = $(THIRDPARTY_ROOT)/jsoncpp-1.9.5/release | 14 | JSON_ROOT = $(THIRDPARTY_ROOT)/jsoncpp-1.9.5/release |
15 | FFMPEG_ROOT = $(THIRDPARTY_ROOT)/ffmpeg-4.4.4/release | 15 | FFMPEG_ROOT = $(THIRDPARTY_ROOT)/ffmpeg-4.4.4/release |
16 | 16 | ||
17 | -GB28181_SDK = /home/cmhu/vpt_ascend_arm/3rdparty/gb28181_3rd | ||
18 | -JRTP_ROOT = $(GB28181_SDK)/jrtp_export | ||
19 | -SIP_SDK = $(GB28181_SDK)/release | 17 | +DEFS = -DENABLE_DVPP_INTERFACE |
20 | 18 | ||
21 | -DEFS = -DENABLE_DVPP_INTERFACE -DUSE_DVPP | ||
22 | - | ||
23 | -include_dir=-I/usr/local/Ascend/ascend-toolkit/6.3.RC1/aarch64-linux/include \ | 19 | +include_dir=-I/usr/local/Ascend/ascend-toolkit/latest/include \ |
24 | -I $(SPDLOG_ROOT)/include \ | 20 | -I $(SPDLOG_ROOT)/include \ |
25 | -I $(SRC_ROOT)/common \ | 21 | -I $(SRC_ROOT)/common \ |
26 | -I $(OPENCV_ROOT)/include \ | 22 | -I $(OPENCV_ROOT)/include \ |
27 | -I $(JSON_ROOT)/include \ | 23 | -I $(JSON_ROOT)/include \ |
28 | -I $(FFMPEG_ROOT)/include \ | 24 | -I $(FFMPEG_ROOT)/include \ |
29 | - -I $(JRTP_ROOT)/jrtplib/include/jrtplib3 \ | ||
30 | - -I $(SIP_SDK)/include \ | ||
31 | - -I $(SRC_ROOT)/decoder/gb28181/rtp \ | ||
32 | - -I $(SRC_ROOT)/decoder/gb28181/sip \ | ||
33 | - -I $(SRC_ROOT)/decoder/gb28181 \ | ||
34 | 25 | ||
35 | -lib_dir=-L/usr/local/Ascend/ascend-toolkit/6.3.RC1/runtime/lib64 \ | ||
36 | - | ||
37 | -lib=-lacl_dvpp -lascendcl | ||
38 | 26 | ||
39 | -LIBS= -L $(FFMPEG_ROOT)/lib -lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice \ | ||
40 | - -L $(JRTP_ROOT)/jrtplib/lib -l:libjrtp.a \ | ||
41 | - -L $(SIP_SDK)/lib -l:libeXosip2.a -l:libosipparser2.a -l:libosip2.a -lcares\ | 27 | +LIBS= -L $(FFMPEG_ROOT)/lib -l:libavformat.a -l:libavcodec.a -l:libswscale.a -l:libavutil.a -l:libavfilter.a -l:libswresample.a -l:libavdevice.a -l:libx264.a\ |
28 | + -L/usr/local/Ascend/ascend-toolkit/latest/runtime/lib64 -lacl_dvpp -lascendcl \ | ||
42 | 29 | ||
43 | -CXXFLAGS= -g -O0 -fPIC $(include_dir) $(lib_dir) $(lib) $(LIBS) $(DEFS) -lpthread -lrt -lz -fexceptions -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -Wall -Wno-deprecated -Wdeprecated-declarations -Wl,-Bsymbolic -ldl | 30 | +CXXFLAGS= -g -O0 -fPIC $(include_dir) $(LIBS) $(DEFS) -lpthread -lrt -lz -fexceptions -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -Wall -Wno-deprecated -Wdeprecated-declarations -Wl,-Bsymbolic -ldl |
44 | 31 | ||
45 | 32 | ||
46 | 33 | ||
47 | SRCS:=$(wildcard $(SRC_ROOT)/decoder/interface/*.cpp) \ | 34 | SRCS:=$(wildcard $(SRC_ROOT)/decoder/interface/*.cpp) \ |
48 | - $(wildcard $(SRC_ROOT)/decoder/dvpp/*.cpp) \ | ||
49 | - $(wildcard $(SRC_ROOT)/decoder/gb28181/*.cpp) \ | ||
50 | - $(wildcard $(SRC_ROOT)/decoder/gb28181/rtp/*.cpp) \ | ||
51 | - $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/*.cpp) \ | ||
52 | - $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/Message/*.cpp) \ | ||
53 | - $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/tinyxml2/*.cpp) \ | ||
54 | - $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/Utils/*.cpp) \ | 35 | + $(wildcard $(SRC_ROOT)/decoder/dvpp/*.cpp) \ |
55 | $(wildcard $(SRC_ROOT)/decoder/*.cpp) \ | 36 | $(wildcard $(SRC_ROOT)/decoder/*.cpp) \ |
56 | 37 | ||
57 | OBJS = $(patsubst %.cpp, %.o, $(notdir $(SRCS))) | 38 | OBJS = $(patsubst %.cpp, %.o, $(notdir $(SRCS))) |
@@ -65,24 +46,6 @@ $(TARGET):$(OBJS) | @@ -65,24 +46,6 @@ $(TARGET):$(OBJS) | ||
65 | %.o:$(SRC_ROOT)/decoder/dvpp/%.cpp | 46 | %.o:$(SRC_ROOT)/decoder/dvpp/%.cpp |
66 | $(XX) $(CXXFLAGS) -c $< | 47 | $(XX) $(CXXFLAGS) -c $< |
67 | 48 | ||
68 | -%.o:$(SRC_ROOT)/decoder/gb28181/%.cpp | ||
69 | - $(XX) $(CXXFLAGS) -c $< | ||
70 | - | ||
71 | -%.o:$(SRC_ROOT)/decoder/gb28181/rtp/%.cpp | ||
72 | - $(XX) $(CXXFLAGS) -c $< | ||
73 | - | ||
74 | -%.o:$(SRC_ROOT)/decoder/gb28181/sip/%.cpp | ||
75 | - $(XX) $(CXXFLAGS) -c $< | ||
76 | - | ||
77 | -%.o:$(SRC_ROOT)/decoder/gb28181/sip/Message/%.cpp | ||
78 | - $(XX) $(CXXFLAGS) -c $< | ||
79 | - | ||
80 | -%.o:$(SRC_ROOT)/decoder/gb28181/sip/tinyxml2/%.cpp | ||
81 | - $(XX) $(CXXFLAGS) -c $< | ||
82 | - | ||
83 | -%.o:$(SRC_ROOT)/decoder/gb28181/sip/Utils/%.cpp | ||
84 | - $(XX) $(CXXFLAGS) -c $< | ||
85 | - | ||
86 | %.o:$(SRC_ROOT)/decoder/interface/%.cpp | 49 | %.o:$(SRC_ROOT)/decoder/interface/%.cpp |
87 | $(XX) $(CXXFLAGS) -c $< | 50 | $(XX) $(CXXFLAGS) -c $< |
88 | 51 |
build/decoder/Makefile.dvpp renamed to build/decoder/Makefile.28181
@@ -6,7 +6,7 @@ PROJECT_ROOT= /home/cmhu/vpt_ascend_arm | @@ -6,7 +6,7 @@ PROJECT_ROOT= /home/cmhu/vpt_ascend_arm | ||
6 | DEPEND_DIR = $(PROJECT_ROOT)/bin | 6 | DEPEND_DIR = $(PROJECT_ROOT)/bin |
7 | SRC_ROOT = $(PROJECT_ROOT)/src | 7 | SRC_ROOT = $(PROJECT_ROOT)/src |
8 | 8 | ||
9 | -TARGET= $(PROJECT_ROOT)/bin/test_dec | 9 | +TARGET= $(PROJECT_ROOT)/bin/test_28181 |
10 | 10 | ||
11 | THIRDPARTY_ROOT = $(PROJECT_ROOT)/3rdparty | 11 | THIRDPARTY_ROOT = $(PROJECT_ROOT)/3rdparty |
12 | SPDLOG_ROOT = $(THIRDPARTY_ROOT)/spdlog-1.9.2/release | 12 | SPDLOG_ROOT = $(THIRDPARTY_ROOT)/spdlog-1.9.2/release |
@@ -14,7 +14,11 @@ OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv_4_1 | @@ -14,7 +14,11 @@ OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv_4_1 | ||
14 | JSON_ROOT = $(THIRDPARTY_ROOT)/jsoncpp-1.9.5/release | 14 | JSON_ROOT = $(THIRDPARTY_ROOT)/jsoncpp-1.9.5/release |
15 | FFMPEG_ROOT = $(THIRDPARTY_ROOT)/ffmpeg-4.4.4/release | 15 | FFMPEG_ROOT = $(THIRDPARTY_ROOT)/ffmpeg-4.4.4/release |
16 | 16 | ||
17 | -DEFS = -DENABLE_DVPP_INTERFACE | 17 | +GB28181_SDK = /home/cmhu/vpt_ascend_arm/3rdparty/gb28181_3rd |
18 | +JRTP_ROOT = $(GB28181_SDK)/jrtp_export | ||
19 | +SIP_SDK = $(GB28181_SDK)/release | ||
20 | + | ||
21 | +DEFS = -DENABLE_DVPP_INTERFACE -DUSE_DVPP | ||
18 | 22 | ||
19 | include_dir=-I/usr/local/Ascend/ascend-toolkit/6.3.RC1/aarch64-linux/include \ | 23 | include_dir=-I/usr/local/Ascend/ascend-toolkit/6.3.RC1/aarch64-linux/include \ |
20 | -I $(SPDLOG_ROOT)/include \ | 24 | -I $(SPDLOG_ROOT)/include \ |
@@ -22,24 +26,32 @@ include_dir=-I/usr/local/Ascend/ascend-toolkit/6.3.RC1/aarch64-linux/include \ | @@ -22,24 +26,32 @@ include_dir=-I/usr/local/Ascend/ascend-toolkit/6.3.RC1/aarch64-linux/include \ | ||
22 | -I $(OPENCV_ROOT)/include \ | 26 | -I $(OPENCV_ROOT)/include \ |
23 | -I $(JSON_ROOT)/include \ | 27 | -I $(JSON_ROOT)/include \ |
24 | -I $(FFMPEG_ROOT)/include \ | 28 | -I $(FFMPEG_ROOT)/include \ |
29 | + -I $(JRTP_ROOT)/jrtplib/include/jrtplib3 \ | ||
30 | + -I $(SIP_SDK)/include \ | ||
31 | + -I $(SRC_ROOT)/decoder/gb28181/rtp \ | ||
32 | + -I $(SRC_ROOT)/decoder/gb28181/sip \ | ||
33 | + -I $(SRC_ROOT)/decoder/gb28181 \ | ||
25 | 34 | ||
26 | lib_dir=-L/usr/local/Ascend/ascend-toolkit/6.3.RC1/runtime/lib64 \ | 35 | lib_dir=-L/usr/local/Ascend/ascend-toolkit/6.3.RC1/runtime/lib64 \ |
27 | - -L/usr/local/Ascend/ascend-toolkit/latest/lib64 \ | ||
28 | - -L/usr/local/Ascend/ascend-toolkit/latest/runtime/lib64 \ | ||
29 | - -L/usr/local/Ascend/ascend-toolkit/latest/acllib/lib64 \ | ||
30 | - -L/usr/local/Ascend/ascend-toolkit/6.3.RC1/runtime/lib64/stub \ | ||
31 | 36 | ||
32 | -lib=-lacl_dvpp -lascendcl -lacl_dvpp_mpi -lruntime -lascendalog -lc_sec -lmsprofiler -lgert -lmmpa -lascend_hal -lexe_graph -lge_executor -lgraph -lprofapi -lascend_protobuf -lerror_manager -lregister -lge_common \ | ||
33 | - -lplatform -lqos_manager | 37 | +lib=-lacl_dvpp -lascendcl |
34 | 38 | ||
35 | LIBS= -L $(FFMPEG_ROOT)/lib -lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice \ | 39 | LIBS= -L $(FFMPEG_ROOT)/lib -lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice \ |
40 | + -L $(JRTP_ROOT)/jrtplib/lib -l:libjrtp.a \ | ||
41 | + -L $(SIP_SDK)/lib -l:libeXosip2.a -l:libosipparser2.a -l:libosip2.a -lcares\ | ||
36 | 42 | ||
37 | CXXFLAGS= -g -O0 -fPIC $(include_dir) $(lib_dir) $(lib) $(LIBS) $(DEFS) -lpthread -lrt -lz -fexceptions -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -Wall -Wno-deprecated -Wdeprecated-declarations -Wl,-Bsymbolic -ldl | 43 | CXXFLAGS= -g -O0 -fPIC $(include_dir) $(lib_dir) $(lib) $(LIBS) $(DEFS) -lpthread -lrt -lz -fexceptions -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -Wall -Wno-deprecated -Wdeprecated-declarations -Wl,-Bsymbolic -ldl |
38 | 44 | ||
39 | 45 | ||
40 | 46 | ||
41 | SRCS:=$(wildcard $(SRC_ROOT)/decoder/interface/*.cpp) \ | 47 | SRCS:=$(wildcard $(SRC_ROOT)/decoder/interface/*.cpp) \ |
42 | - $(wildcard $(SRC_ROOT)/decoder/dvpp/*.cpp) \ | 48 | + $(wildcard $(SRC_ROOT)/decoder/dvpp/*.cpp) \ |
49 | + $(wildcard $(SRC_ROOT)/decoder/gb28181/*.cpp) \ | ||
50 | + $(wildcard $(SRC_ROOT)/decoder/gb28181/rtp/*.cpp) \ | ||
51 | + $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/*.cpp) \ | ||
52 | + $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/Message/*.cpp) \ | ||
53 | + $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/tinyxml2/*.cpp) \ | ||
54 | + $(wildcard $(SRC_ROOT)/decoder/gb28181/sip/Utils/*.cpp) \ | ||
43 | $(wildcard $(SRC_ROOT)/decoder/*.cpp) \ | 55 | $(wildcard $(SRC_ROOT)/decoder/*.cpp) \ |
44 | 56 | ||
45 | OBJS = $(patsubst %.cpp, %.o, $(notdir $(SRCS))) | 57 | OBJS = $(patsubst %.cpp, %.o, $(notdir $(SRCS))) |
@@ -53,6 +65,24 @@ $(TARGET):$(OBJS) | @@ -53,6 +65,24 @@ $(TARGET):$(OBJS) | ||
53 | %.o:$(SRC_ROOT)/decoder/dvpp/%.cpp | 65 | %.o:$(SRC_ROOT)/decoder/dvpp/%.cpp |
54 | $(XX) $(CXXFLAGS) -c $< | 66 | $(XX) $(CXXFLAGS) -c $< |
55 | 67 | ||
68 | +%.o:$(SRC_ROOT)/decoder/gb28181/%.cpp | ||
69 | + $(XX) $(CXXFLAGS) -c $< | ||
70 | + | ||
71 | +%.o:$(SRC_ROOT)/decoder/gb28181/rtp/%.cpp | ||
72 | + $(XX) $(CXXFLAGS) -c $< | ||
73 | + | ||
74 | +%.o:$(SRC_ROOT)/decoder/gb28181/sip/%.cpp | ||
75 | + $(XX) $(CXXFLAGS) -c $< | ||
76 | + | ||
77 | +%.o:$(SRC_ROOT)/decoder/gb28181/sip/Message/%.cpp | ||
78 | + $(XX) $(CXXFLAGS) -c $< | ||
79 | + | ||
80 | +%.o:$(SRC_ROOT)/decoder/gb28181/sip/tinyxml2/%.cpp | ||
81 | + $(XX) $(CXXFLAGS) -c $< | ||
82 | + | ||
83 | +%.o:$(SRC_ROOT)/decoder/gb28181/sip/Utils/%.cpp | ||
84 | + $(XX) $(CXXFLAGS) -c $< | ||
85 | + | ||
56 | %.o:$(SRC_ROOT)/decoder/interface/%.cpp | 86 | %.o:$(SRC_ROOT)/decoder/interface/%.cpp |
57 | $(XX) $(CXXFLAGS) -c $< | 87 | $(XX) $(CXXFLAGS) -c $< |
58 | 88 |
build/demo/Makefile
@@ -17,7 +17,7 @@ RABBITMQ_CLIENT_ROOT = $(THIRDPARTY_ROOT)/rabbitmq-c-0.11.0/release | @@ -17,7 +17,7 @@ RABBITMQ_CLIENT_ROOT = $(THIRDPARTY_ROOT)/rabbitmq-c-0.11.0/release | ||
17 | 17 | ||
18 | DEFS = -DENABLE_DVPP_INTERFACE | 18 | DEFS = -DENABLE_DVPP_INTERFACE |
19 | 19 | ||
20 | -include_dir=-I/usr/local/Ascend/ascend-toolkit/latest/aarch64-linux/include \ | 20 | +include_dir=-I/usr/local/Ascend/ascend-toolkit/latest/include \ |
21 | -I $(SPDLOG_ROOT)/include \ | 21 | -I $(SPDLOG_ROOT)/include \ |
22 | -I $(SRC_ROOT)/common \ | 22 | -I $(SRC_ROOT)/common \ |
23 | -I $(OPENCV_ROOT)/include \ | 23 | -I $(OPENCV_ROOT)/include \ |
build/src/Makefile
@@ -18,8 +18,7 @@ AUTHORITY_DIR = $(THIRDPARTY_ROOT)/atlas_lic-aarch64-20220112/atlas_lic | @@ -18,8 +18,7 @@ AUTHORITY_DIR = $(THIRDPARTY_ROOT)/atlas_lic-aarch64-20220112/atlas_lic | ||
18 | BOOST_ROOT = $(THIRDPARTY_ROOT)/boost_1_81_0/release | 18 | BOOST_ROOT = $(THIRDPARTY_ROOT)/boost_1_81_0/release |
19 | WEBSOCKETPP_ROOT = $(THIRDPARTY_ROOT)/websocketpp-0.8.2/release/include \ | 19 | WEBSOCKETPP_ROOT = $(THIRDPARTY_ROOT)/websocketpp-0.8.2/release/include \ |
20 | 20 | ||
21 | -DEFS = -DENABLE_DVPP_INTERFACE -DWITH_FACE_DET_SS -DPOST_USE_RABBITMQ | ||
22 | -# -DUSE_VILLAGE | 21 | +DEFS = -DENABLE_DVPP_INTERFACE -DWITH_FACE_DET_SS -DPOST_USE_RABBITMQ -DUSE_VILLAGE |
23 | # DEFS = -DENABLE_DVPP_INTERFACE -DUSE_VILLAGE | 22 | # DEFS = -DENABLE_DVPP_INTERFACE -DUSE_VILLAGE |
24 | 23 | ||
25 | include_dir=-I/usr/local/Ascend/ascend-toolkit/latest/include \ | 24 | include_dir=-I/usr/local/Ascend/ascend-toolkit/latest/include \ |
@@ -40,11 +39,12 @@ LIBS= -L $(SPDLOG_ROOT)/lib -l:libspdlog.a \ | @@ -40,11 +39,12 @@ LIBS= -L $(SPDLOG_ROOT)/lib -l:libspdlog.a \ | ||
40 | -L $(DEPEND_DIR) -lvpt_det_vdec -lsycheck -lface_det_vdec -lhs_tri_process -lhs_truck_process -lphone_motor_det -lhcp_vdec -lmotor_rainshed_vdec -ltraffic_light_vdec -lvehicle_pose_vdec -lroad_seg_vdec -lroad_3clsseg_vdec -lhs_motor_process\ | 39 | -L $(DEPEND_DIR) -lvpt_det_vdec -lsycheck -lface_det_vdec -lhs_tri_process -lhs_truck_process -lphone_motor_det -lhcp_vdec -lmotor_rainshed_vdec -ltraffic_light_vdec -lvehicle_pose_vdec -lroad_seg_vdec -lroad_3clsseg_vdec -lhs_motor_process\ |
41 | -L $(OPENCV_ROOT)/lib -lopencv_world\ | 40 | -L $(OPENCV_ROOT)/lib -lopencv_world\ |
42 | -L $(JSON_ROOT)/lib -l:libjsoncpp.a \ | 41 | -L $(JSON_ROOT)/lib -l:libjsoncpp.a \ |
43 | - -L $(FFMPEG_ROOT)/lib -l:libavformat.a -l:libavcodec.a -l:libswscale.a -l:libavutil.a -l:libavfilter.a -l:libswresample.a -l:libavdevice.a -l:libx264.a\ | ||
44 | -L $(RABBITMQ_CLIENT_ROOT)/lib/aarch64-linux-gnu -l:librabbitmq.a \ | 42 | -L $(RABBITMQ_CLIENT_ROOT)/lib/aarch64-linux-gnu -l:librabbitmq.a \ |
45 | -L $(AUTHORITY_DIR)/lib -latlaslic \ | 43 | -L $(AUTHORITY_DIR)/lib -latlaslic \ |
46 | -L/usr/local/Ascend/ascend-toolkit/latest/runtime/lib64 -lacl_dvpp -lascendcl \ | 44 | -L/usr/local/Ascend/ascend-toolkit/latest/runtime/lib64 -lacl_dvpp -lascendcl \ |
47 | -L $(BOOST_ROOT)/lib -lboost_system \ | 45 | -L $(BOOST_ROOT)/lib -lboost_system \ |
46 | + -L $(FFMPEG_ROOT)/lib -l:libavformat.a -l:libavcodec.a -l:libswscale.a -l:libavutil.a -l:libavfilter.a -l:libswresample.a -l:libavdevice.a -l:libx264.a\ | ||
47 | + # -L $(FFMPEG_ROOT)/lib -lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice -lx264\ | ||
48 | 48 | ||
49 | 49 | ||
50 | 50 |