gfaipc.pro 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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/sysinfo.cpp \
  16. src/uuid.c
  17. HEADERS += \
  18. src/appctrl.h \
  19. src/defines.h \
  20. src/gfaipc.h \
  21. src/ipcpriv.h \
  22. src/mutex.h \
  23. src/procmem.h \
  24. src/sema.h \
  25. src/shm.h \
  26. src/shmrot.h \
  27. src/sysinfo.h \
  28. src/uuid.h
  29. ####################################################################################
  30. GFA_LIB_PATH = /usr/lib/gfa
  31. GFA_INC_PATH = /usr/include/gfa
  32. QMAKE_RPATHLINKDIR += $$GFA_LIB_PATH
  33. QMAKE_RPATHDIR += $$GFA_LIB_PATH
  34. QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty
  35. QMAKE_LN_SHLIB = :
  36. ####################################################################################
  37. CONFIG(debug, debug|release) {
  38. QMAKE_CXXFLAGS -= -Os
  39. QMAKE_CFLAGS -= -Os
  40. QMAKE_CXXFLAGS += -D_DEBUG
  41. QMAKE_CFLAGS += -D_DEBUG
  42. TARGET = $$join(TARGET,,,d)
  43. }
  44. ####################################################################################
  45. target.path = $$GFA_LIB_PATH
  46. INSTALLS += target
  47. ####################################################################################
  48. linux-g++ {
  49. includes.path = $$GFA_INC_PATH
  50. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfaipc.h $(INSTALL_ROOT)$$includes.path
  51. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/mutex.h $(INSTALL_ROOT)$$includes.path
  52. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/sema.h $(INSTALL_ROOT)$$includes.path
  53. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shm.h $(INSTALL_ROOT)$$includes.path
  54. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/procmem.h $(INSTALL_ROOT)$$includes.path
  55. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/uuid.h $(INSTALL_ROOT)$$includes.path
  56. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/ipcpriv.h $(INSTALL_ROOT)$$includes.path
  57. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaipc.h
  58. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/mutex.h
  59. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/sema.h
  60. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shm.h
  61. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/procmem.h
  62. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/uuid.h
  63. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/ipcpriv.h
  64. INSTALLS += includes
  65. }
  66. ####################################################################################
  67. linux-buildroot-g++ {
  68. exists($$[QT_SYSROOT]) {
  69. library.path = $$[QT_SYSROOT]$$target.path
  70. library.extra += -$(INSTALL_PROGRAM) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET)
  71. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  72. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  73. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  74. library.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET)
  75. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  76. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  77. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  78. INSTALLS += library
  79. includes.path = $$[QT_SYSROOT]$$GFA_INC_PATH
  80. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfaipc.h $(INSTALL_ROOT)$$includes.path
  81. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/mutex.h $(INSTALL_ROOT)$$includes.path
  82. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/sema.h $(INSTALL_ROOT)$$includes.path
  83. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/shm.h $(INSTALL_ROOT)$$includes.path
  84. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/procmem.h $(INSTALL_ROOT)$$includes.path
  85. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/uuid.h $(INSTALL_ROOT)$$includes.path
  86. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/ipcpriv.h $(INSTALL_ROOT)$$includes.path
  87. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaipc.h
  88. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/mutex.h
  89. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/sema.h
  90. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/shm.h
  91. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/procmem.h
  92. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/uuid.h
  93. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/ipcpriv.h
  94. INSTALLS += includes
  95. itoolchain.target = install_toolchain
  96. itoolchain.depends = install_library install_includes
  97. QMAKE_EXTRA_TARGETS += itoolchain
  98. utoolchain.target = uninstall_toolchain
  99. utoolchain.depends = uninstall_library uninstall_includes
  100. QMAKE_EXTRA_TARGETS += utoolchain
  101. }
  102. QMAKE_CXXFLAGS += -D_TARGET_BUILD
  103. QMAKE_CFLAGS += -D_TARGET_BUILD
  104. }
  105. ####################################################################################
  106. deploylib.target = deploylib
  107. deploylib.commands = @echo BASENAME="$(QMAKE_TARGET)" > deploytargets
  108. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET="$(TARGET)" >> deploytargets
  109. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET0="$(TARGET0)" >> deploytargets
  110. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET1="$(TARGET1)" >> deploytargets
  111. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET2="$(TARGET2)" >> deploytargets
  112. deploylib.commands += $$escape_expand(\\n\\t)@echo HEADERS="\\\"gfaipc.h mutex.h sema.h shm.h procmem.h uuid.h ipcpriv.h\\\"" >> deploytargets
  113. PRE_TARGETDEPS += deploylib
  114. QMAKE_EXTRA_TARGETS += deploylib
  115. # message($$basename(QMAKESPEC))