gfaipc.pro 5.8 KB

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