gfaipc.pro 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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/sema.cpp \
  12. src/shm.cpp \
  13. src/shmrot.cpp \
  14. src/uuid.c
  15. HEADERS += \
  16. src/appctrl.h \
  17. src/defines.h \
  18. src/gfaipc.h \
  19. src/mutex.h \
  20. src/sema.h \
  21. src/shm.h \
  22. src/shmrot.h \
  23. src/uuid.h
  24. ####################################################################################
  25. GFA_LIB_PATH = /usr/lib/gfa
  26. GFA_INC_PATH = /usr/include/gfa
  27. QMAKE_RPATHLINKDIR += $$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. includes.path = $$GFA_INC_PATH
  44. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfaipc.h $(INSTALL_ROOT)$$includes.path
  45. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/mutex.h $(INSTALL_ROOT)$$includes.path
  46. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/sema.h $(INSTALL_ROOT)$$includes.path
  47. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shm.h $(INSTALL_ROOT)$$includes.path
  48. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shmrot.h $(INSTALL_ROOT)$$includes.path
  49. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/uuid.h $(INSTALL_ROOT)$$includes.path
  50. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaipc.h
  51. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/mutex.h
  52. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/sema.h
  53. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shm.h
  54. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shmrot.h
  55. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/uuid.h
  56. INSTALLS += includes
  57. }
  58. ####################################################################################
  59. linux-buildroot-g++ {
  60. exists($$[QT_SYSROOT]) {
  61. library.path = $$[QT_SYSROOT]$$target.path
  62. library.extra += -$(INSTALL_PROGRAM) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET)
  63. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  64. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  65. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  66. library.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET)
  67. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  68. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  69. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  70. INSTALLS += library
  71. includes.path = $$[QT_SYSROOT]$$GFA_INC_PATH
  72. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfaipc.h $(INSTALL_ROOT)$$includes.path
  73. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/mutex.h $(INSTALL_ROOT)$$includes.path
  74. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/sema.h $(INSTALL_ROOT)$$includes.path
  75. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shm.h $(INSTALL_ROOT)$$includes.path
  76. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shmrot.h $(INSTALL_ROOT)$$includes.path
  77. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/uuid.h $(INSTALL_ROOT)$$includes.path
  78. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaipc.h
  79. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/mutex.h
  80. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/sema.h
  81. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shm.h
  82. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shmrot.h
  83. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/uuid.h
  84. INSTALLS += includes
  85. itoolchain.target = install_toolchain
  86. itoolchain.depends = install_library install_includes
  87. QMAKE_EXTRA_TARGETS += itoolchain
  88. utoolchain.target = uninstall_toolchain
  89. utoolchain.depends = uninstall_library uninstall_includes
  90. QMAKE_EXTRA_TARGETS += utoolchain
  91. }
  92. }
  93. ####################################################################################
  94. deploylib.target = deploylib
  95. deploylib.commands = @echo TARGET="$(TARGET)" > deploytargets
  96. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET0="$(TARGET0)" >> deploytargets
  97. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET1="$(TARGET1)" >> deploytargets
  98. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET2="$(TARGET2)" >> deploytargets
  99. PRE_TARGETDEPS += deploylib
  100. QMAKE_EXTRA_TARGETS += deploylib