gfasitarautils.pro 4.4 KB

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