gfasitarautils.pro 4.9 KB

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