Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. SONAME = libyolocrowddetector.so
  2. SOLINK = $(SONAME).0.0
  3. SOTARGET = $(SONAME).0.0.0
  4. SOLIB_OBJS = YoloCrowdAPI.o YoloCrowdDetector.o YoloCrowdApp.o
  5. INCLUDE = -I/usr/local/include/opencv4 \
  6. -I../include \
  7. -I../../deps/detutils/include \
  8. -I../../deps/tensorRT_Pro/include/application \
  9. -I../../deps/tensorRT_Pro/include/tensorrt \
  10. -I../../../../include \
  11. -I../../../../mascommon/include \
  12. -I../../../../detector/detdef/include \
  13. -I../../../../links/common/include \
  14. -I../../../../links/rapidjson/include \
  15. -I/usr/local/cuda/include
  16. CC = g++
  17. RM = rm -f
  18. LN = ln -sf
  19. CXXFLAGS = -std=gnu++11 -g -O2 -Wall -fPIC -DLINUX -DACTION_SINGLETON -D__STDC_CONSTANT_MACROS -Wno-deprecated -Wno-write-strings -fpermissive
  20. LDPATH = -L../../../../links/common/libs -L../../deps/tensorRT_Pro/source -L../../deps/detutils/source
  21. LDFLAGS = -lcommon -lpthread -ldl -ltensorrtpro -ldetutils \
  22. -lopencv_core -lopencv_imgproc -lopencv_imgcodecs
  23. .SUFFIXES: .cpp .h .o
  24. .cpp.o:
  25. $(CC) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
  26. $(SOTARGET): $(SOLIB_OBJS)
  27. $(CC) -shared -Wl,-Bsymbolic -o $@ $^ $(LDPATH) $(LDFLAGS)
  28. $(LN) $(SOTARGET) $(SOLINK)
  29. $(LN) $(SOLINK) $(SONAME)
  30. clean:
  31. $(RM) $(SOLIB_OBJS) $(SONAME) $(SOLINK) $(SOTARGET)