Makefile 781 B

123456789101112131415161718192021222324252627282930313233
  1. SONAME = libdetutils.so
  2. SOLINK = $(SONAME).0.0
  3. SOTARGET = $(SONAME).0.0.0
  4. SOLIB_OBJS = DetUtils.o
  5. INCLUDE = -I../include \
  6. -I../../../../../include \
  7. -I../../../../../links/common/include \
  8. -I../../../../../links/rapidjson/include
  9. CC = g++
  10. RM = rm -f
  11. LN = ln -sf
  12. CXXFLAGS = -std=gnu++11 -g -O2 -Wall -fPIC -DLINUX -DACTION_SINGLETON -D__STDC_CONSTANT_MACROS -Wno-deprecated -Wno-write-strings -fpermissive
  13. LDPATH = -L../../../../../links/common/libs
  14. LDFLAGS = -lcommon -lpthread -ldl
  15. .SUFFIXES: .cpp .h .o
  16. .cpp.o:
  17. $(CC) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
  18. $(SOTARGET): $(SOLIB_OBJS)
  19. $(CC) -shared -Wl,-Bsymbolic -o $@ $^ $(LDPATH) $(LDFLAGS)
  20. $(LN) $(SOTARGET) $(SOLINK)
  21. $(LN) $(SOLINK) $(SONAME)
  22. clean:
  23. $(RM) $(SOLIB_OBJS) $(SONAME) $(SOLINK) $(SOTARGET)