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.

170 lines
5.8KB

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