gfaipc.pro 6.7 KB

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