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.

Makefile 6.8KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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/bridges posix32
  25. $(MAKE) -C source/discovery posix32
  26. posix64:
  27. $(MAKE) -C source/bridges posix64
  28. $(MAKE) -C source/discovery posix64
  29. win32:
  30. $(MAKE) -C source/bridges win32
  31. $(MAKE) -C source/discovery win32
  32. win64:
  33. $(MAKE) -C source/bridges win64
  34. $(MAKE) -C source/discovery win64
  35. wine32:
  36. $(MAKE) -C source/libs jackbridge-win32.dll.so
  37. $(LINK) ../libs/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll
  38. wine64:
  39. $(MAKE) -C source/libs jackbridge-win64.dll.so
  40. $(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll
  41. # -------------------------------------------------------------------------------------------------------------------------------------
  42. # Resources
  43. RES = source/resources_rc.py
  44. RES: $(RES)
  45. source/%_rc.py: resources/%.qrc
  46. $(PYRCC) $< -o $@
  47. # -------------------------------------------------------------------------------------------------------------------------------------
  48. # UI code
  49. UIs = \
  50. source/ui_carla.py \
  51. source/ui_carla_control.py \
  52. source/ui_carla_about.py \
  53. source/ui_carla_database.py \
  54. source/ui_carla_edit.py \
  55. source/ui_carla_parameter.py \
  56. source/ui_carla_plugin.py \
  57. source/ui_carla_refresh.py \
  58. source/ui_carla_settings.py \
  59. source/ui_carla_settings_driver.py \
  60. source/ui_inputdialog_value.py
  61. UI: $(UIs)
  62. source/ui_%.py: resources/ui/%.ui
  63. $(PYUIC) $< -o $@
  64. # -------------------------------------------------------------------------------------------------------------------------------------
  65. # Widgets
  66. WIDGETS = \
  67. source/canvaspreviewframe.py \
  68. source/digitalpeakmeter.py \
  69. source/ledbutton.py \
  70. source/paramspinbox.py \
  71. source/pixmapbutton.py \
  72. source/pixmapdial.py \
  73. source/pixmapkeyboard.py
  74. WIDGETS: $(WIDGETS)
  75. source/%.py: source/widgets/%.py
  76. $(LINK) widgets/$*.py $@
  77. # -------------------------------------------------------------------------------------------------------------------------------------
  78. clean:
  79. $(MAKE) clean -C source/backend
  80. $(MAKE) clean -C source/bridges
  81. $(MAKE) clean -C source/discovery
  82. $(MAKE) clean -C source/libs
  83. rm -f $(RES)
  84. rm -f $(UIs)
  85. rm -f $(WIDGETS)
  86. rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
  87. # -------------------------------------------------------------------------------------------------------------------------------------
  88. config:
  89. $(MAKE) config -C source/backend
  90. # -------------------------------------------------------------------------------------------------------------------------------------
  91. debug:
  92. $(MAKE) DEBUG=true
  93. # -------------------------------------------------------------------------------------------------------------------------------------
  94. install:
  95. # Create directories
  96. install -d $(DESTDIR)$(PREFIX)/bin/
  97. install -d $(DESTDIR)$(PREFIX)/lib/carla/
  98. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/
  99. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  100. install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  101. install -d $(DESTDIR)$(PREFIX)/share/applications/
  102. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  103. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  104. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  105. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  106. install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  107. install -d $(DESTDIR)$(PREFIX)/share/carla/
  108. # Install script files
  109. install -m 755 \
  110. data/carla \
  111. data/carla-control \
  112. data/carla-single \
  113. $(DESTDIR)$(PREFIX)/bin/
  114. # Install desktop files
  115. install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
  116. # Install icons, 16x16
  117. install -m 644 resources/16x16/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  118. install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
  119. # Install icons, 48x48
  120. install -m 644 resources/48x48/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  121. install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
  122. # Install icons, 128x128
  123. install -m 644 resources/128x128/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  124. install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
  125. # Install icons, 256x256
  126. install -m 644 resources/256x256/carla.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  127. install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
  128. # Install icons, scalable
  129. install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  130. install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
  131. # Install binaries
  132. install -m 755 \
  133. source/backend/*.so \
  134. source/bridges/carla-bridge-* \
  135. source/discovery/carla-discovery-* \
  136. $(DESTDIR)$(PREFIX)/lib/carla/
  137. # Install python code
  138. install -m 755 source/*.py $(DESTDIR)$(PREFIX)/share/carla/
  139. # Install resources
  140. install -m 644 source/backend/resources/nekofilter-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
  141. install -m 644 source/backend/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
  142. install -m 644 source/backend/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
  143. # Adjust PREFIX value in script files
  144. sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
  145. $(DESTDIR)$(PREFIX)/bin/carla \
  146. $(DESTDIR)$(PREFIX)/bin/carla-single
  147. # $(DESTDIR)$(PREFIX)/bin/carla-control \
  148. # -------------------------------------------------------------------------------------------------------------------------------------
  149. uninstall:
  150. rm -f $(DESTDIR)$(PREFIX)/bin/carla*
  151. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla.desktop
  152. rm -f $(DESTDIR)$(PREFIX)/share/applications/carla-control.desktop
  153. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla.png
  154. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/carla-control.png
  155. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla.svg
  156. rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/carla-control.svg
  157. rm -rf $(DESTDIR)$(PREFIX)/lib/carla/
  158. rm -rf $(DESTDIR)$(PREFIX)/share/carla/