Commit 54b6e488e2203eb1a91eac6a37ef01cba12d4593

Authored by Hu Chunming
1 parent 1067e066

更新makefile

build/demo/Makefile 0 → 100755
  1 +XX = g++
  2 +
  3 +
  4 +PROJECT_ROOT= /data/cmhu/vpt_ascend
  5 +
  6 +DEPEND_DIR = $(PROJECT_ROOT)/bin
  7 +SRC_ROOT = $(PROJECT_ROOT)/src
  8 +
  9 +TARGET= $(PROJECT_ROOT)/bin/demo
  10 +
  11 +THIRDPARTY_ROOT = $(PROJECT_ROOT)/3rdparty
  12 +SPDLOG_ROOT = $(THIRDPARTY_ROOT)/spdlog-1.9.2/release
  13 +# OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv-4.5.4/release
  14 +OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv-4.5.2
  15 +JSON_ROOT = $(THIRDPARTY_ROOT)/jsoncpp-1.9.5/release
  16 +FFMPEG_ROOT = $(THIRDPARTY_ROOT)/ffmpeg-4.4.4/release
  17 +RABBITMQ_CLIENT_ROOT = $(THIRDPARTY_ROOT)/rabbitmq-c-0.11.0/release
  18 +
  19 +DEFS = -DENABLE_DVPP_INTERFACE
  20 +# -DPOST_USE_RABBITMQ
  21 +
  22 +include_dir=-I/usr/local/Ascend/ascend-toolkit/latest/aarch64-linux/include \
  23 + -I $(SPDLOG_ROOT)/include \
  24 + -I $(SRC_ROOT)/common \
  25 + -I $(OPENCV_ROOT)/include/opencv4 \
  26 + -I $(JSON_ROOT)/include \
  27 + -I $(FFMPEG_ROOT)/include \
  28 +
  29 +
  30 +LIBS= -L $(DEPEND_DIR) -lvpt_det -lsycheck -lvpt_ascend -lface_det_vdec\
  31 + -L $(OPENCV_ROOT)/lib -lopencv_world\
  32 + -L/usr/local/Ascend/ascend-toolkit/latest/runtime/lib64 -lacl_dvpp -lascendcl \
  33 + -L $(FFMPEG_ROOT)/lib -lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice -lx264\
  34 +
  35 +CXXFLAGS= -g -O0 -fPIC $(include_dir) $(lib_dir) $(lib) $(LIBS) $(DEFS) -lpthread -lrt -lz -fexceptions -std=c++11 -fvisibility=hidden -Wall -Wno-deprecated -Wdeprecated-declarations -Wl,-Bsymbolic -ldl
  36 +
  37 +
  38 +
  39 +SRCS:=$(wildcard $(SRC_ROOT)/demo/*.cpp) \
  40 +
  41 +OBJS = $(patsubst %.cpp, %.o, $(notdir $(SRCS)))
  42 +
  43 +
  44 +$(TARGET):$(OBJS)
  45 + rm -f $(TARGET)
  46 + $(XX) -o $@ $^ $(CXXFLAGS)
  47 + rm -f *.o
  48 +
  49 +%.o:$(SRC_ROOT)/demo/%.cpp
  50 + $(XX) $(CXXFLAGS) -c $<
  51 +
  52 +clean:
  53 + rm -f *.o $(TARGET)
... ...
build/jni/makefile 0 → 100644
  1 +
  2 +CC = gcc
  3 +XX = g++
  4 +AR = ar
  5 +
  6 +DEFS=-DPOST_USE_RABBITMQ
  7 +
  8 +
  9 +PROJECT_ROOT= /data/cmhu/vpt_ascend
  10 +
  11 +DEPEND_DIR = $(PROJECT_ROOT)/bin
  12 +SRC_ROOT = $(PROJECT_ROOT)/src/tsl_aiplatform_jni
  13 +
  14 +JAVAPth= /usr/local/jdk1.8.0_171
  15 +
  16 +TARGET = $(DEPEND_DIR)/libSYTSLSystemInfoNativeJNI.so
  17 +
  18 +SDK_BUILD_LIB_DIR = $(DEPEND_DIR)
  19 +
  20 +CFLAGS =-O2 -fPIC $(INCLUDE) $(DEFS) -lrt -std=c++11 -fvisibility=hidden
  21 +
  22 +INCLUDE= -I $(PROJECT_ROOT)/src/ai_platform \
  23 + -I $(PROJECT_ROOT)/src/common \
  24 + -I $(JAVAPth)/include \
  25 + -I $(JAVAPth)/include/linux \
  26 +
  27 +LIBSPATH= -L $(SDK_BUILD_LIB_DIR) -lvpt_ascend \
  28 +
  29 +
  30 +LIBS=
  31 +
  32 +SRCS:=$(wildcard $(SRC_ROOT)/*.cpp)
  33 +DIRS:=$(notdir $(SRCS))
  34 +OBJS:=$(patsubst %cpp, %o, $(DIRS))
  35 +
  36 +
  37 +all:$(TARGET)
  38 +
  39 +$(TARGET):$(OBJS)
  40 + rm -f $(TARGET)
  41 + $(XX) $(CFLAGS) -shared -o $@ $^ $(LIBSPATH) $(LIBS) -Wl,-rpath=$(SDK_BUILD_LIB_DIR)
  42 + rm -f *.o
  43 +%.o:$(SRC_ROOT)/%.cpp
  44 + $(XX) $(CFLAGS) -c $<
  45 +
  46 +
  47 +.PHONY:clean
  48 +clean:
  49 + rm -f *.o $(TARGET)
  50 +
  51 +
  52 +
... ...
build/src/Makefile 0 → 100755
  1 +XX = g++
  2 +
  3 +
  4 +PROJECT_ROOT= /data/cmhu/vpt_ascend
  5 +
  6 +DEPEND_DIR = $(PROJECT_ROOT)/bin
  7 +SRC_ROOT = $(PROJECT_ROOT)/src
  8 +
  9 +TARGET= $(PROJECT_ROOT)/bin/libvpt_ascend.so
  10 +
  11 +THIRDPARTY_ROOT = $(PROJECT_ROOT)/3rdparty
  12 +SPDLOG_ROOT = $(THIRDPARTY_ROOT)/spdlog-1.9.2/release
  13 +# OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv_4_1
  14 +OPENCV_ROOT = $(THIRDPARTY_ROOT)/opencv-4.5.2
  15 +JSON_ROOT = $(THIRDPARTY_ROOT)/jsoncpp-1.9.5/release
  16 +FFMPEG_ROOT = $(THIRDPARTY_ROOT)/ffmpeg-4.4.4/release
  17 +RABBITMQ_CLIENT_ROOT = $(THIRDPARTY_ROOT)/rabbitmq-c-0.11.0/release
  18 +BOOST_ROOT = $(THIRDPARTY_ROOT)/boost_1_81_0/release
  19 +WEBSOCKETPP_ROOT = $(THIRDPARTY_ROOT)/websocketpp-0.8.2/release/include \
  20 +
  21 +JRTP_ROOT = $(THIRDPARTY_ROOT)/gb28181_3rd/jrtp_export
  22 +
  23 +DEFS = -DENABLE_DVPP_INTERFACE -DWITH_FACE_DET_SS
  24 +# DEFS = -DENABLE_DVPP_INTERFACE -DUSE_VILLAGE -DPOST_USE_RABBITMQ
  25 +
  26 +include_dir=-I/usr/local/Ascend/ascend-toolkit/latest/include \
  27 + -I $(SRC_ROOT)/common \
  28 + -I $(SPDLOG_ROOT)/include \
  29 + -I $(OPENCV_ROOT)/include \
  30 + -I $(JSON_ROOT)/include \
  31 + -I $(FFMPEG_ROOT)/include \
  32 + -I $(RABBITMQ_CLIENT_ROOT)/include \
  33 + -I $(JRTP_ROOT)/jrtplib/include/jrtplib3 \
  34 + -I $(SRC_ROOT)/decoder/gb28181/rtp \
  35 + -I $(SRC_ROOT)/decoder/gb28181 \
  36 + -I $(WEBSOCKETPP_ROOT) \
  37 + -I $(BOOST_ROOT)/include \
  38 +
  39 +
  40 +LIBS= -L $(SPDLOG_ROOT)/lib -l:libspdlog.a \
  41 + -L $(DEPEND_DIR) -lvpt_det -lsycheck -lface_det_vdec \
  42 + -L $(OPENCV_ROOT)/lib -lopencv_world\
  43 + -L $(JSON_ROOT)/lib -l:libjsoncpp.a \
  44 + -L $(FFMPEG_ROOT)/lib -lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice -lx264\
  45 + -L $(RABBITMQ_CLIENT_ROOT)/lib/x86_64-linux-gnu -l:librabbitmq.a \
  46 + -L $(JRTP_ROOT)/jrtplib/lib -l:libjrtp.a \
  47 + -L/usr/local/Ascend/ascend-toolkit/latest/runtime/lib64 -lacl_dvpp -lascendcl \
  48 + -L $(BOOST_ROOT)/lib -lboost_system \
  49 +
  50 +
  51 +
  52 +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
  53 +
  54 +
  55 +
  56 +SRCS:=$(wildcard $(SRC_ROOT)/ai_platform/*.cpp) \
  57 + $(wildcard $(SRC_ROOT)/decoder/interface/*.cpp) \
  58 + $(wildcard $(SRC_ROOT)/decoder/dvpp/*.cpp) \
  59 + $(wildcard $(SRC_ROOT)/ai_engine_module/sort/*.cpp) \
  60 + $(wildcard $(SRC_ROOT)/ai_engine_module/*.cpp) \
  61 + $(wildcard $(SRC_ROOT)/util/*.cpp) \
  62 + $(wildcard $(SRC_ROOT)/reprocessing_module/*.cpp) \
  63 + $(wildcard $(SRC_ROOT)/reprocessing_module/rbmq/*.cpp) \
  64 + $(wildcard $(SRC_ROOT)/helpers/*.cpp) \
  65 +
  66 +OBJS = $(patsubst %.cpp, %.o, $(notdir $(SRCS)))
  67 +
  68 +
  69 +$(TARGET):$(OBJS)
  70 + rm -f $(TARGET)
  71 + $(XX) -shared -o $@ $^ $(CXXFLAGS)
  72 +# rm -f *.o
  73 +
  74 +%.o:$(SRC_ROOT)/decoder/dvpp/%.cpp
  75 + $(XX) $(CXXFLAGS) -c $<
  76 +
  77 +%.o:$(SRC_ROOT)/decoder/interface/%.cpp
  78 + $(XX) $(CXXFLAGS) -c $<
  79 +
  80 +%.o:$(SRC_ROOT)/ai_platform/%.cpp
  81 + $(XX) $(CXXFLAGS) -c $<
  82 +
  83 +%.o:$(SRC_ROOT)/ai_engine_module/sort/%.cpp
  84 + $(XX) $(CXXFLAGS) -c $<
  85 +
  86 +%.o:$(SRC_ROOT)/ai_engine_module/%.cpp
  87 + $(XX) $(CXXFLAGS) -c $<
  88 +
  89 +%.o:$(SRC_ROOT)/util/%.cpp
  90 + $(XX) $(CXXFLAGS) -c $<
  91 +
  92 +%.o:$(SRC_ROOT)/reprocessing_module/%.cpp
  93 + $(XX) $(CXXFLAGS) -c $<
  94 +
  95 +%.o:$(SRC_ROOT)/reprocessing_module/rbmq/%.cpp
  96 + $(XX) $(CXXFLAGS) -c $<
  97 +
  98 +%.o:$(SRC_ROOT)/decoder/gb28181/%.cpp
  99 + $(XX) $(CXXFLAGS) -c $<
  100 +
  101 +%.o:$(SRC_ROOT)/decoder/gb28181/rtp/%.cpp
  102 + $(XX) $(CXXFLAGS) -c $<
  103 +
  104 +%.o:$(SRC_ROOT)/decoder/gb28181/websocket/%.cpp
  105 + $(XX) $(CXXFLAGS) -c $<
  106 +
  107 +%.o:$(SRC_ROOT)/decoder/gb28181/Message/%.cpp
  108 + $(XX) $(CXXFLAGS) -c $<
  109 +
  110 +%.o:$(SRC_ROOT)/decoder/gb28181/tinyxml2/%.cpp
  111 + $(XX) $(CXXFLAGS) -c $<
  112 +
  113 +%.o:$(SRC_ROOT)/helpers/%.cpp
  114 + $(XX) $(CXXFLAGS) -c $<
  115 +
  116 +
  117 +
  118 +
  119 +clean:
  120 + rm -f *.o $(TARGET)
  121 +
  122 +
  123 +cleano:
  124 + rm -f *.o
0 125 \ No newline at end of file
... ...