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 7.0KB

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