Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

179 lines
6.1KB

  1. #!/usr/bin/make -f
  2. # Makefile for Carla #
  3. # ---------------------- #
  4. # Created by falkTX
  5. #
  6. PREFIX = /usr/local
  7. DESTDIR =
  8. SED_PREFIX = $(shell echo $(PREFIX) | sed "s/\//\\\\\\\\\//g")
  9. LINK = ln -sf
  10. PYUIC = pyuic4
  11. PYRCC = pyrcc4 -py3
  12. # -----------------------------------------------------------------------------------------------------------------------------------------
  13. all: CPP RES UI WIDGETS
  14. # -----------------------------------------------------------------------------------------------------------------------------------------
  15. # C++ code
  16. CPP: backend bridges discovery
  17. backend:
  18. $(MAKE) -C source/backend
  19. bridges:
  20. $(MAKE) -C source/bridges
  21. discovery:
  22. $(MAKE) -C source/discovery
  23. posix32:
  24. $(MAKE) -C source/bridge posix32
  25. $(MAKE) -C source/discovery posix32
  26. posix64:
  27. $(MAKE) -C source/bridge posix64
  28. $(MAKE) -C source/discovery posix64
  29. win32:
  30. $(MAKE) -C source/bridge win32
  31. $(MAKE) -C source/discovery win32
  32. win64:
  33. $(MAKE) -C source/bridge win64
  34. $(MAKE) -C source/discovery win64
  35. wine32:
  36. $(MAKE) -C source/jackbridge wine32
  37. $(LINK) source/libs/jackbridge/libcarla-jackbridge-win32.dll.so source/bridge/libcarla-jackbridge-win32.dll
  38. wine64:
  39. $(MAKE) -C source/jackbridge wine64
  40. $(LINK) source/libs/jackbridge/libcarla-jackbridge-win64.dll.so source/bridge/libcarla-jackbridge-win64.dll
  41. # -----------------------------------------------------------------------------------------------------------------------------------------
  42. # Resources
  43. RES = source/resources_rc.py
  44. RES: $(RES)
  45. source/resources_rc.py: resources/resources.qrc
  46. $(PYRCC) $< -o $@
  47. # -----------------------------------------------------------------------------------------------------------------------------------------
  48. # UI code
  49. UIs = source/ui_carla.py source/ui_carla_control.py\
  50. source/ui_carla_about.py source/ui_carla_database.py source/ui_carla_edit.py source/ui_carla_parameter.py source/ui_carla_plugin.py \
  51. source/ui_carla_refresh.py source/ui_carla_settings.py \
  52. source/ui_inputdialog_value.py
  53. UI: $(UIs)
  54. source/ui_%.py: resources/ui/%.ui
  55. $(PYUIC) $< -o $@
  56. # -----------------------------------------------------------------------------------------------------------------------------------------
  57. # Widgets
  58. WIDGETS = source/digitalpeakmeter.py source/ledbutton.py source/paramspinbox.py source/pixmapdial.py source/pixmapkeyboard.py
  59. WIDGETS: $(WIDGETS)
  60. source/%.py: source/widgets/%.py
  61. $(LINK) widgets/$*.py $@
  62. # -----------------------------------------------------------------------------------------------------------------------------------------
  63. clean:
  64. $(MAKE) clean -C source/backend
  65. $(MAKE) clean -C source/bridges
  66. $(MAKE) clean -C source/discovery
  67. rm -f $(RES)
  68. rm -f $(UIs)
  69. rm -f $(WIDGETS)
  70. rm -f *~ source/*~ source/*.pyc source/ui_*.py source/resources_rc.py
  71. # -----------------------------------------------------------------------------------------------------------------------------------------
  72. debug:
  73. $(MAKE) DEBUG=true
  74. # -----------------------------------------------------------------------------------------------------------------------------------------
  75. install:
  76. # Create directories
  77. install -d $(DESTDIR)$(PREFIX)/bin/
  78. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  79. install -d $(DESTDIR)$(PREFIX)/share/applications/
  80. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  81. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  82. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  83. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  84. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  85. install -d $(DESTDIR)$(PREFIX)/share/carla/
  86. # Install script files and binaries
  87. install -m 755 \
  88. data/carla \
  89. data/carla-control \
  90. data/carla-standalone \
  91. $(DESTDIR)$(PREFIX)/bin/
  92. # Install desktop files
  93. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  94. # Install icons, 16x16
  95. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  96. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  97. # Install icons, 48x48
  98. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  99. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  100. # Install icons, 128x128
  101. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  102. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  103. # Install icons, 256x256
  104. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  105. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  106. # Install icons, scalable
  107. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  108. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  109. # Install binary data
  110. install -m 755 \
  111. source/backend/*.so \
  112. source/bridges/carla-bridge-* \
  113. source/discovery/carla-discovery-* \
  114. $(DESTDIR)$(PREFIX)/lib/carla/
  115. # Install python code
  116. install -m 755 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  117. # Adjust PREFIX value in script files
  118. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  119. $(DESTDIR)$(PREFIX)/bin/carla \
  120. $(DESTDIR)$(PREFIX)/bin/carla-control \
  121. $(DESTDIR)$(PREFIX)/bin/carla-standalone \
  122. # -----------------------------------------------------------------------------------------------------------------------------------------
  123. uninstall:
  124. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  125. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  126. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  127. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  128. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  129. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  130. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  131. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  132. rm -rf $(DESTDIR)$(PREFIX)/share/carla/