common.pro 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. CONFIG += c++11
  2. CONFIG -= qt
  3. CONFIG += staticlib
  4. TEMPLATE = lib
  5. QMAKE_CXXFLAGS += -Wstrict-aliasing=0 -Wall -Wextra -Wformat -Wconversion -Wuninitialized -Wno-unused-variable -Wno-unused-parameter -Wundef -Wwrite-strings -std=c++11 -pthread -fPIC -D_GNU_SOURCE -Wno-format-overflow -Wno-format-truncation
  6. QMAKE_CFLAGS += -Wstrict-aliasing=0 -Wall -Wextra -Wformat -Wconversion -Wuninitialized -Wno-unused-variable -Wno-unused-parameter -Wundef -Wwrite-strings -pthread -fPIC -D_GNU_SOURCE -Wno-format-overflow -Wno-format-truncation
  7. _LIB_PATH = $$[QT_SYSROOT]/usr/lib/gfa/svc/
  8. _INC_PATH = $$[QT_SYSROOT]/usr/include/gfa/svc/common/
  9. CONFIG(debug, debug|release) {
  10. QMAKE_CXXFLAGS -= -Os
  11. QMAKE_CFLAGS -= -Os
  12. QMAKE_CXXFLAGS += -D_DEBUG
  13. QMAKE_CFLAGS += -D_DEBUG
  14. TARGET = commond
  15. QMAKE_CLEAN += libcommond.a
  16. }
  17. CONFIG(release, debug|release) {
  18. QMAKE_CXXFLAGS += -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-result
  19. QMAKE_CFLAGS += -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-result
  20. TARGET = common
  21. QMAKE_CLEAN += libcommon.a
  22. }
  23. linux-buildroot-g++ {
  24. QMAKE_CXXFLAGS += -D_TARGET_BUILD
  25. QMAKE_CFLAGS += -D_TARGET_BUILD
  26. QMAKE_CXXFLAGS += -DSITARA_BUILD
  27. QMAKE_CFLAGS += -DSITARA_BUILD
  28. }
  29. HEADERS += \
  30. conv.h \
  31. debug.h \
  32. fileutil.h \
  33. instance.h \
  34. logfile.h \
  35. mysqlwrap.h \
  36. singleton.h \
  37. strutil.h \
  38. processclock.h \
  39. uuid.h
  40. SOURCES += \
  41. instance.cpp \
  42. logfile.cpp \
  43. mysqlwrap.cpp \
  44. strutil.cpp \
  45. processclock.cpp \
  46. conv.c \
  47. fileutil.c \
  48. singleton.c \
  49. uuid.c
  50. includes.path = $$_INC_PATH
  51. includes.extra += -$(INSTALL_FILE) $$PWD/conv.h $(INSTALL_ROOT)$$includes.path
  52. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/debug.h $(INSTALL_ROOT)$$includes.path
  53. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/fileutil.h $(INSTALL_ROOT)$$includes.path
  54. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/instance.h $(INSTALL_ROOT)$$includes.path
  55. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/logfile.h $(INSTALL_ROOT)$$includes.path
  56. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/mysqlwrap.h $(INSTALL_ROOT)$$includes.path
  57. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/singleton.h $(INSTALL_ROOT)$$includes.path
  58. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/strutil.h $(INSTALL_ROOT)$$includes.path
  59. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/processclock.h $(INSTALL_ROOT)$$includes.path
  60. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/uuid.h $(INSTALL_ROOT)$$includes.path
  61. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/conv.h
  62. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/debug.h
  63. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/fileutil.h
  64. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/instance.h
  65. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/logfile.h
  66. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/mysqlwrap.h
  67. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/singleton.h
  68. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/strutil.h
  69. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/processclock.h
  70. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/uuid.h
  71. INSTALLS += includes
  72. library.path = $$_LIB_PATH
  73. library.extra += -$(INSTALL_FILE) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET)
  74. library.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET)
  75. INSTALLS += library