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.5KB

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