gfanet.pro 5.3 KB

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