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

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