SONAME = libtensorrtpro.so SOLINK = $(SONAME).0.0 SOTARGET = $(SONAME).0.0.0 cuda_arch = -gencode=arch=compute_75,code=sm_75 # NVIDIA GeForce RTX 2070 SOLIB_OBJS = application/yolocrowd.o\ tensorrt/cuda_tools.o tensorrt/ilogger.o \ tensorrt/trt_infer.o tensorrt/trt_tensor.o SOLIB_CU_OBJS = application/yolocrowd_decode.o tensorrt/preprocess_kernel.o INCLUDE = -I../include/application \ -I../include/tensorrt \ -I../../../../../links/common/include \ -I/usr/local/include/opencv4 \ -I/usr/local/cuda/include CC = g++ NVCC = nvcc RM = rm -f LN = ln -sf CXXFLAGS = -std=gnu++11 -g -O0 -Wall -fPIC -DLINUX -D__STDC_CONSTANT_MACROS NVCCFLAGS = -std=c++11 -g -w -O0 -Xcompiler "$(CXXFLAGS)" $(cuda_arch) LDPATH = -L../../../../../links/common/libs -L/usr/local/cuda/lib64 -L/home/flechazo/tools/TensorRT-8.5.3.1/lib LDFLAGS = -lpthread -ldl -lcommon\ -lopencv_core -lopencv_imgproc -lopencv_imgcodecs \ -lnvinfer -lnvinfer_plugin\ -lcuda -lcudart .SUFFIXES: .cu .cpp .h .o .cpp.o: $(CC) $(CXXFLAGS) $(INCLUDE) -o $@ -c $< .cu.o: $(NVCC) $(NVCCFLAGS) $(INCLUDE) -o $@ -c $< $(SOTARGET): $(SOLIB_OBJS) $(SOLIB_CU_OBJS) $(CC) -shared -Wl,-Bsymbolic -o $@ $^ $(LDPATH) $(LDFLAGS) $(LN) $(SOTARGET) $(SOLINK) $(LN) $(SOLINK) $(SONAME) all: $(SOTARGET) clean: $(RM) $(SONAME) $(SOLIB_OBJS) $(SOLIB_CU_OBJS) $(SOLINK) $(SOTARGET) .PHONY: clean all