Makefile 1.1 KB

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