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.

232 lines
7.0KB

  1. #!/usr/bin/make -f
  2. # Makefile for DISTRHO Plugins #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. include dpf/Makefile.base.mk
  7. # also set in:
  8. # plugins/Common/IldaeilPlugin.cpp `getVersion`
  9. VERSION = 1.1
  10. # ---------------------------------------------------------------------------------------------------------------------
  11. # Build targets
  12. all: carla dgl plugins gen
  13. # ---------------------------------------------------------------------------------------------------------------------
  14. # Build config
  15. PREFIX ?= /usr/local
  16. DESTDIR ?=
  17. # ---------------------------------------------------------------------------------------------------------------------
  18. # Carla config
  19. ifeq ($(WASM),true)
  20. USE_SYSTEM_CARLA_BINS = true
  21. endif
  22. CARLA_EXTRA_ARGS = CARLA_BACKEND_NAMESPACE=Ildaeil \
  23. CAN_GENERATE_LV2_TTL=false \
  24. STATIC_PLUGIN_TARGET=true \
  25. HAVE_FFMPEG=false \
  26. HAVE_FLUIDSYNTH=false \
  27. HAVE_PROJECTM=false \
  28. HAVE_ZYN_DEPS=false \
  29. HAVE_ZYN_UI_DEPS=false
  30. ifneq ($(DEBUG),true)
  31. CARLA_EXTRA_ARGS += EXTERNAL_PLUGINS=true
  32. endif
  33. CARLA_TARGETS = static-plugin
  34. ifneq ($(USE_SYSTEM_CARLA_BINS),true)
  35. CARLA_TARGETS += bridges-plugin bridges-ui
  36. ifeq ($(CARLA_EXTRA_TARGETS),true)
  37. # 32bit bridge
  38. ifeq ($(CPU_X86_64),true)
  39. ifeq ($(WINDOWS),true)
  40. CARLA_TARGETS += win32
  41. else ifneq ($(MACOS),true)
  42. CARLA_TARGETS += posix32
  43. endif
  44. endif
  45. # native wine bridge
  46. ifeq ($(CPU_I386_OR_X86_64)$(LINUX),truetrue)
  47. ifeq ($(CPU_X86_64),true)
  48. CARLA_TARGETS += wine64
  49. else
  50. CARLA_TARGETS += wine32
  51. endif
  52. endif
  53. endif # CARLA_EXTRA_TARGETS
  54. endif # USE_SYSTEM_CARLA_BINS
  55. # ---------------------------------------------------------------------------------------------------------------------
  56. # DPF bundled plugins
  57. ifneq ($(MACOS),true)
  58. ILDAEIL_FX_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-FX$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-FX.clap
  59. ILDAEIL_MIDI_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-MIDI$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-MIDI.clap
  60. ILDAEIL_SYNTH_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-Synth$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-Synth.clap
  61. endif
  62. # ---------------------------------------------------------------------------------------------------------------------
  63. # Check for X11+OpenGL dependencies
  64. ifneq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
  65. ifneq ($(HAVE_OPENGL),true)
  66. $(error OpenGL dependency not installed/available)
  67. endif
  68. ifneq ($(HAVE_X11),true)
  69. $(error X11 dependency not installed/available)
  70. endif
  71. ifneq ($(HAVE_XCURSOR),true)
  72. $(warning Xcursor dependency not installed/available)
  73. endif
  74. ifneq ($(HAVE_XEXT),true)
  75. $(warning Xext dependency not installed/available)
  76. endif
  77. ifneq ($(HAVE_XRANDR),true)
  78. $(warning Xrandr dependency not installed/available)
  79. endif
  80. endif
  81. # ---------------------------------------------------------------------------------------------------------------------
  82. carla: dgl
  83. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla $(CARLA_TARGETS)
  84. extra-bins:
  85. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) carlabins -C plugins/FX
  86. ifneq ($(WASM),true)
  87. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) carlabins -C plugins/MIDI
  88. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) carlabins -C plugins/Synth
  89. endif
  90. extra-posix32:
  91. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla posix32
  92. extra-win32:
  93. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla win32 AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++
  94. extra-win64:
  95. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla win64 AR=x86_64-w64-mingw32-ar CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++
  96. extra-wine32:
  97. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla wine32
  98. extra-wine64:
  99. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla wine64
  100. dgl:
  101. $(MAKE) -C dpf/dgl opengl
  102. plugins: carla dgl
  103. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) all -C plugins/FX
  104. ifneq ($(WASM),true)
  105. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) all -C plugins/MIDI
  106. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) all -C plugins/Synth
  107. endif
  108. ifneq ($(CROSS_COMPILING),true)
  109. gen: plugins dpf/utils/lv2_ttl_generator
  110. @$(CURDIR)/dpf/utils/generate-ttl.sh
  111. dpf/utils/lv2_ttl_generator:
  112. $(MAKE) -C dpf/utils/lv2-ttl-generator
  113. else
  114. gen:
  115. endif
  116. # ---------------------------------------------------------------------------------------------------------------------
  117. install:
  118. install -d $(DESTDIR)$(PREFIX)/lib/clap/Ildaeil.clap
  119. install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-FX.lv2
  120. install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-MIDI.lv2
  121. install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-Synth.lv2
  122. install -d $(DESTDIR)$(PREFIX)/lib/vst/Ildaeil.vst
  123. install -d $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-FX.vst3/Contents
  124. install -d $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-Synth.vst3/Contents
  125. install -m 644 bin/Ildaeil.clap/* $(DESTDIR)$(PREFIX)/lib/clap/Ildaeil.clap/
  126. install -m 644 bin/Ildaeil-FX.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-FX.lv2/
  127. install -m 644 bin/Ildaeil-MIDI.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-MIDI.lv2/
  128. install -m 644 bin/Ildaeil-Synth.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-Synth.lv2/
  129. install -m 644 bin/Ildaeil.vst/* $(DESTDIR)$(PREFIX)/lib/vst/Ildaeil.vst/
  130. cp -rL bin/Ildaeil-FX.vst3/Contents/*-* $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-FX.vst3/Contents/
  131. cp -rL bin/Ildaeil-Synth.vst3/Contents/*-* $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-Synth.vst3/Contents/
  132. # ---------------------------------------------------------------------------------------------------------------------
  133. clean:
  134. $(MAKE) $(CARLA_EXTRA_ARGS) distclean -C carla
  135. $(MAKE) clean -C dpf/dgl
  136. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  137. $(MAKE) $(ILDAEIL_FX_ARGS) clean -C plugins/FX
  138. $(MAKE) $(ILDAEIL_MIDI_ARGS) clean -C plugins/MIDI
  139. $(MAKE) $(ILDAEIL_SYNTH_ARGS) clean -C plugins/Synth
  140. rm -rf bin build
  141. rm -f dpf-widgets/opengl/*.d
  142. rm -f dpf-widgets/opengl/*.o
  143. # ---------------------------------------------------------------------------------------------------------------------
  144. # tarball target, generating release source-code tarballs ready for packaging
  145. TAR_ARGS = \
  146. --exclude=".appveyor*" \
  147. --exclude=".ci*" \
  148. --exclude=".clang*" \
  149. --exclude=".drone*" \
  150. --exclude=".editor*" \
  151. --exclude=".git*" \
  152. --exclude="*.kdev*" \
  153. --exclude=".travis*" \
  154. --exclude=".vscode*" \
  155. --exclude="*.d" \
  156. --exclude="*.o" \
  157. --exclude=bin \
  158. --exclude=build \
  159. --exclude=carla/data \
  160. --exclude=carla/source/frontend \
  161. --exclude=carla/source/interposer \
  162. --exclude=carla/source/libjack \
  163. --exclude=carla/source/native-plugins/resources \
  164. --exclude=carla/source/rest \
  165. --exclude=carla/source/tests.old \
  166. --exclude=carla/source/theme \
  167. --exclude=carla/resources \
  168. --exclude=dpf/build \
  169. --exclude=dpf/cmake \
  170. --exclude=dpf/examples \
  171. --exclude=dpf/lac \
  172. --exclude=dpf/tests \
  173. --exclude=dpf-widgets/generic \
  174. --exclude=dpf-widgets/opengl/Blendish* \
  175. --exclude=dpf-widgets/opengl/DearImGuiColorTextEditor* \
  176. --exclude=dpf-widgets/tests \
  177. --transform='s,^\.\.,-.-.,' \
  178. --transform='s,^\.,Ildaeil-$(VERSION),' \
  179. --transform='s,^-\.-\.,..,' \
  180. tarball:
  181. rm -f ../Ildaeil-src-$(VERSION).tar.xz
  182. tar -c --lzma $(TAR_ARGS) -f ../Ildaeil-src-$(VERSION).tar.xz .
  183. # ---------------------------------------------------------------------------------------------------------------------
  184. .PHONY: carla plugins