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

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