Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. SONAME = libclipdetector.so
  2. SOLINK = $(SONAME).0.0
  3. SOTARGET = $(SONAME).0.0.0
  4. SOLIB_OBJS = ClipAPI.o ClipDetector.o ClipApp.o
  5. INCLUDE = -I/usr/local/include/opencv4 \
  6. -I../include \
  7. -I../../abandobj/include \
  8. -I../../deps/detutils/include \
  9. -I../../deps/onnxruntime/include \
  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/detutils/source -L../../deps/onnxruntime/lib
  21. LDFLAGS = -lcommon -lpthread -ldl -lonnxruntime -ldetutils \
  22. -lopencv_core -lopencv_imgproc -lopencv_imgcodecs \
  23. -lopencv_video -lopencv_videoio -lopencv_highgui
  24. .SUFFIXES: .cpp .h .o
  25. .cpp.o:
  26. $(CC) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
  27. $(SOTARGET): $(SOLIB_OBJS)
  28. $(CC) -shared -Wl,-Bsymbolic -o $@ $^ $(LDPATH) $(LDFLAGS)
  29. $(LN) $(SOTARGET) $(SOLINK)
  30. $(LN) $(SOLINK) $(SONAME)
  31. clean:
  32. $(RM) $(SOLIB_OBJS) $(SONAME) $(SOLINK) $(SOTARGET)