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.

187 lines
6.2KB

  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 = \
  59. source/canvaspreviewframe.py \
  60. source/digitalpeakmeter.py \
  61. source/ledbutton.py \
  62. source/paramspinbox.py \
  63. source/pixmapbutton.py \
  64. source/pixmapdial.py \
  65. source/pixmapkeyboard.py
  66. WIDGETS: $(WIDGETS)
  67. source/%.py: source/widgets/%.py
  68. $(LINK) widgets/$*.py $@
  69. # -----------------------------------------------------------------------------------------------------------------------------------------
  70. clean:
  71. $(MAKE) clean -C source/backend
  72. $(MAKE) clean -C source/bridges
  73. $(MAKE) clean -C source/discovery
  74. $(MAKE) clean -C source/libs
  75. rm -f $(RES)
  76. rm -f $(UIs)
  77. rm -f $(WIDGETS)
  78. rm -f *~ source/*~ source/*.pyc source/ui_*.py source/resources_rc.py
  79. # -----------------------------------------------------------------------------------------------------------------------------------------
  80. debug:
  81. $(MAKE) DEBUG=true
  82. # -----------------------------------------------------------------------------------------------------------------------------------------
  83. install:
  84. # Create directories
  85. install -d $(DESTDIR)$(PREFIX)/bin/
  86. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  87. install -d $(DESTDIR)$(PREFIX)/share/applications/
  88. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  89. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  90. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  91. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  92. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  93. install -d $(DESTDIR)$(PREFIX)/share/carla/
  94. # Install script files and binaries
  95. install -m 755 \
  96. data/carla \
  97. data/carla-control \
  98. data/carla-single \
  99. $(DESTDIR)$(PREFIX)/bin/
  100. # Install desktop files
  101. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  102. # Install icons, 16x16
  103. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  104. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  105. # Install icons, 48x48
  106. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  107. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  108. # Install icons, 128x128
  109. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  110. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  111. # Install icons, 256x256
  112. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  113. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  114. # Install icons, scalable
  115. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  116. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  117. # Install binary data
  118. install -m 755 \
  119. source/backend/*.so \
  120. source/bridges/carla-bridge-* \
  121. source/discovery/carla-discovery-* \
  122. $(DESTDIR)$(PREFIX)/lib/carla/
  123. # Install python code
  124. install -m 755 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  125. # Adjust PREFIX value in script files
  126. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  127. $(DESTDIR)$(PREFIX)/bin/carla \
  128. $(DESTDIR)$(PREFIX)/bin/carla-control \
  129. $(DESTDIR)$(PREFIX)/bin/carla-single
  130. # -----------------------------------------------------------------------------------------------------------------------------------------
  131. uninstall:
  132. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  133. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  134. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  135. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  136. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  137. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  138. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  139. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  140. rm -rf $(DESTDIR)$(PREFIX)/share/carla/