gfamininet.pro 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. TEMPLATE = lib
  2. VERSION = 1.0
  3. CONFIG -= qt app_bundle
  4. CONFIG += c++11 shared thread
  5. ####################################################################################
  6. SOURCES += \
  7. src/gfaserial.c \
  8. src/gfamininetmst.c \
  9. src/gfamininetdev.c \
  10. src/gfabootlmast.c \
  11. src/dbghlp.c
  12. linux-buildroot-g++ {
  13. }
  14. HEADERS += \
  15. src/gfamininetmst.h \
  16. src/gfamininetdev.h \
  17. src/gfagenericdev.h \
  18. src/gfaserial.h \
  19. src/gfabootlmast.h \
  20. src/dbghlp.h
  21. ####################################################################################
  22. GFA_LIB_PATH = /usr/lib/gfa
  23. GFA_INC_PATH = /usr/include/gfa
  24. QMAKE_INCDIR += ti
  25. QMAKE_RPATHLINKDIR += $$GFA_LIB_PATH
  26. QMAKE_RPATHDIR += $$GFA_LIB_PATH
  27. QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty
  28. QMAKE_LN_SHLIB = :
  29. ####################################################################################
  30. CONFIG(debug, debug|release) {
  31. QMAKE_CXXFLAGS -= -Os
  32. QMAKE_CFLAGS -= -Os
  33. QMAKE_CXXFLAGS += -D_DEBUG
  34. QMAKE_CFLAGS += -D_DEBUG
  35. TARGET = $$join(TARGET,,,d)
  36. }
  37. ####################################################################################
  38. target.path = $$GFA_LIB_PATH
  39. INSTALLS += target
  40. ####################################################################################
  41. linux-g++ {
  42. includes.path = $$GFA_INC_PATH
  43. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfamininetmst.h $(INSTALL_ROOT)$$includes.path
  44. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfamininetdev.h $(INSTALL_ROOT)$$includes.path
  45. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfagenericdev.h $(INSTALL_ROOT)$$includes.path
  46. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfaserial.h $(INSTALL_ROOT)$$includes.path
  47. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfabootlmast.h $(INSTALL_ROOT)$$includes.path
  48. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfamininetmst.h
  49. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfamininetdev.h
  50. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfagenericdev.h
  51. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaserial.h
  52. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfabootlmast.h
  53. INSTALLS += includes
  54. }
  55. ####################################################################################
  56. linux-buildroot-g++ {
  57. exists($$[QT_SYSROOT]) {
  58. library.path = $$[QT_SYSROOT]$$target.path
  59. library.extra += -$(INSTALL_PROGRAM) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET)
  60. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  61. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  62. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  63. library.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET)
  64. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  65. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  66. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  67. INSTALLS += library
  68. includes.path = $$[QT_SYSROOT]$$GFA_INC_PATH
  69. includes.extra += -$(INSTALL_FILE) $$PWD/src/gfamininetmst.h $(INSTALL_ROOT)$$includes.path
  70. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfamininetdev.h $(INSTALL_ROOT)$$includes.path
  71. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfagenericdev.h $(INSTALL_ROOT)$$includes.path
  72. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfaserial.h $(INSTALL_ROOT)$$includes.path
  73. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfabootlmast.h $(INSTALL_ROOT)$$includes.path
  74. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfamininetmst.h
  75. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfamininetdev.h
  76. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfagenericdev.h
  77. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfaserial.h
  78. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfabootlmast.h
  79. INSTALLS += includes
  80. itoolchain.target = install_toolchain
  81. itoolchain.depends = install_library install_includes
  82. QMAKE_EXTRA_TARGETS += itoolchain
  83. utoolchain.target = uninstall_toolchain
  84. utoolchain.depends = uninstall_library uninstall_includes
  85. QMAKE_EXTRA_TARGETS += utoolchain
  86. }
  87. QMAKE_CXXFLAGS += -D_TARGET_BUILD
  88. QMAKE_CFLAGS += -D_TARGET_BUILD
  89. }
  90. ####################################################################################
  91. deploylib.target = deploylib
  92. deploylib.commands = @echo BASENAME="$(QMAKE_TARGET)" > deploytargets
  93. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET="$(TARGET)" >> deploytargets
  94. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET0="$(TARGET0)" >> deploytargets
  95. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET1="$(TARGET1)" >> deploytargets
  96. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET2="$(TARGET2)" >> deploytargets
  97. deploylib.commands += $$escape_expand(\\n\\t)@echo HEADERS="\\\"gfamininetmst.h gfamininetdev.h gfagenericdev.h gfaserial.h gfabootlmast.h\\\"" >> deploytargets
  98. PRE_TARGETDEPS += deploylib
  99. QMAKE_EXTRA_TARGETS += deploylib