gfanet.pro 5.8 KB

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