gfanet.pro 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. TEMPLATE = lib
  2. VERSION = 1.2
  3. CONFIG += c++11 shared thread
  4. CONFIG -= qt app_bundle
  5. ####################################################################################
  6. SOURCES += \
  7. src/gfanet.cpp \
  8. src/gfanetmon.cpp \
  9. src/gfawifimon.cpp \
  10. src/interfaces.cpp \
  11. src/inet4s.cpp \
  12. src/inet4d.cpp \
  13. src/inet4m.cpp \
  14. src/util.cpp
  15. HEADERS += \
  16. src/gfanet.h \
  17. src/gfanetmon.h \
  18. src/interfaces.h \
  19. src/inet4s.h \
  20. src/inet4d.h \
  21. src/inet4m.h \
  22. src/util.h
  23. ####################################################################################
  24. GFA_LIB_PATH = /usr/lib/gfa
  25. GFA_INC_PATH = /usr/include/gfa
  26. QMAKE_RPATHLINKDIR += $$[QT_SYSROOT]$$GFA_LIB_PATH
  27. QMAKE_RPATHDIR += $$GFA_LIB_PATH
  28. QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty
  29. QMAKE_LN_SHLIB = :
  30. ####################################################################################
  31. CONFIG(debug, debug|release) {
  32. QMAKE_CXXFLAGS -= -Os
  33. QMAKE_CFLAGS -= -Os
  34. QMAKE_CXXFLAGS += -D_DEBUG
  35. QMAKE_CFLAGS += -D_DEBUG
  36. TARGET = $$join(TARGET,,,d)
  37. }
  38. ####################################################################################
  39. target.path = $$GFA_LIB_PATH
  40. INSTALLS += target
  41. ####################################################################################
  42. linux-g++ {
  43. QMAKE_CXXFLAGS += -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-unused-result
  44. QMAKE_CFLAGS += -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-unused-result
  45. includes.path = $$GFA_INC_PATH
  46. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfanet.h $(INSTALL_ROOT)$$includes.path
  47. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/interfaces.h $(INSTALL_ROOT)$$includes.path
  48. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4s.h $(INSTALL_ROOT)$$includes.path
  49. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4d.h $(INSTALL_ROOT)$$includes.path
  50. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4m.h $(INSTALL_ROOT)$$includes.path
  51. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfanetmon.h $(INSTALL_ROOT)$$includes.path
  52. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanet.h
  53. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/interfaces.h
  54. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4s.h
  55. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4d.h
  56. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4m.h
  57. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanetmon.h
  58. INSTALLS += includes
  59. }
  60. ####################################################################################
  61. linux-buildroot-g++ {
  62. exists($$[QT_SYSROOT]) {
  63. library.path = $$[QT_SYSROOT]$$target.path
  64. library.extra += -$(INSTALL_PROGRAM) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET)
  65. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  66. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  67. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  68. library.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET)
  69. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  70. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  71. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  72. INSTALLS += library
  73. includes.path = $$[QT_SYSROOT]$$GFA_INC_PATH
  74. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfanet.h $(INSTALL_ROOT)$$includes.path
  75. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/interfaces.h $(INSTALL_ROOT)$$includes.path
  76. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4s.h $(INSTALL_ROOT)$$includes.path
  77. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4d.h $(INSTALL_ROOT)$$includes.path
  78. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4m.h $(INSTALL_ROOT)$$includes.path
  79. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfanetmon.h $(INSTALL_ROOT)$$includes.path
  80. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanet.h
  81. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/interfaces.h
  82. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4s.h
  83. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4d.h
  84. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4m.h
  85. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanetmon.h
  86. INSTALLS += includes
  87. itoolchain.target = install_toolchain
  88. itoolchain.depends = install_library install_includes
  89. QMAKE_EXTRA_TARGETS += itoolchain
  90. utoolchain.target = uninstall_toolchain
  91. utoolchain.depends = uninstall_library uninstall_includes
  92. QMAKE_EXTRA_TARGETS += utoolchain
  93. }
  94. QMAKE_CXXFLAGS += -D_TARGET_BUILD
  95. QMAKE_CFLAGS += -D_TARGET_BUILD
  96. }
  97. ####################################################################################
  98. deploylib.target = deploylib
  99. deploylib.commands = @echo BASENAME="$(QMAKE_TARGET)" > deploytargets
  100. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET="$(TARGET)" >> deploytargets
  101. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET0="$(TARGET0)" >> deploytargets
  102. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET1="$(TARGET1)" >> deploytargets
  103. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET2="$(TARGET2)" >> deploytargets
  104. deploylib.commands += $$escape_expand(\\n\\t)@echo HEADERS="\\\"gfanet.h gfanetmon.h interfaces.h inet4s.h inet4d.h inet4m.h\\\"" >> deploytargets
  105. PRE_TARGETDEPS += deploylib
  106. QMAKE_EXTRA_TARGETS += deploylib