gfaipc.pro 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. TEMPLATE = lib
  2. VERSION = 1.2
  3. CONFIG -= qt app_bundle
  4. CONFIG += c++11 shared thread
  5. ####################################################################################
  6. SOURCES += \
  7. src/appctrl.cpp \
  8. src/ipcshm.cpp \
  9. src/locmtx.cpp \
  10. src/mutex.cpp \
  11. src/procmem.cpp \
  12. src/sema.cpp \
  13. src/shm.cpp \
  14. src/shmrot.cpp \
  15. src/uuid.c
  16. HEADERS += \
  17. src/appctrl.h \
  18. src/defines.h \
  19. src/gfaipc.h \
  20. src/mutex.h \
  21. src/procmem.h \
  22. src/sema.h \
  23. src/shm.h \
  24. src/shmrot.h \
  25. src/uuid.h
  26. ####################################################################################
  27. GFA_LIB_PATH = /usr/lib/gfa
  28. GFA_INC_PATH = /usr/include/gfa
  29. QMAKE_RPATHLINKDIR += $$GFA_LIB_PATH
  30. QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty
  31. QMAKE_LN_SHLIB = :
  32. ####################################################################################
  33. CONFIG(debug, debug|release) {
  34. QMAKE_CXXFLAGS -= -Os
  35. QMAKE_CFLAGS -= -Os
  36. QMAKE_CXXFLAGS += -D_DEBUG
  37. QMAKE_CFLAGS += -D_DEBUG
  38. TARGET = $$join(TARGET,,,d)
  39. }
  40. ####################################################################################
  41. target.path = $$GFA_LIB_PATH
  42. INSTALLS += target
  43. ####################################################################################
  44. linux-g++ {
  45. includes.path = $$GFA_INC_PATH
  46. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfaipc.h $(INSTALL_ROOT)$$includes.path
  47. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/mutex.h $(INSTALL_ROOT)$$includes.path
  48. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/sema.h $(INSTALL_ROOT)$$includes.path
  49. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shm.h $(INSTALL_ROOT)$$includes.path
  50. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/procmem.h $(INSTALL_ROOT)$$includes.path
  51. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/uuid.h $(INSTALL_ROOT)$$includes.path
  52. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaipc.h
  53. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/mutex.h
  54. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/sema.h
  55. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shm.h
  56. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/procmem.h
  57. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/uuid.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/gfaipc.h $(INSTALL_ROOT)$$includes.path
  75. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/mutex.h $(INSTALL_ROOT)$$includes.path
  76. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/sema.h $(INSTALL_ROOT)$$includes.path
  77. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shm.h $(INSTALL_ROOT)$$includes.path
  78. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/procmem.h $(INSTALL_ROOT)$$includes.path
  79. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/uuid.h $(INSTALL_ROOT)$$includes.path
  80. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaipc.h
  81. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/mutex.h
  82. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/sema.h
  83. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shm.h
  84. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/procmem.h
  85. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/uuid.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. }
  95. ####################################################################################
  96. deploylib.target = deploylib
  97. deploylib.commands = @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. PRE_TARGETDEPS += deploylib
  102. QMAKE_EXTRA_TARGETS += deploylib