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.

245 lines
8.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.2
  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. CUSTOM_DPF_PATH=$(CURDIR)/dpf \
  25. DGL_NAMESPACE=IldaeilDGL \
  26. STATIC_PLUGIN_TARGET=true \
  27. USING_CUSTOM_DPF=true \
  28. HAVE_FFMPEG=false \
  29. HAVE_FLUIDSYNTH=false \
  30. HAVE_PROJECTM=false \
  31. HAVE_ZYN_DEPS=false \
  32. HAVE_ZYN_UI_DEPS=false
  33. ifneq ($(DEBUG),true)
  34. CARLA_EXTRA_ARGS += EXTERNAL_PLUGINS=true
  35. endif
  36. CARLA_TARGETS = static-plugin
  37. ifneq ($(USE_SYSTEM_CARLA_BINS),true)
  38. CARLA_TARGETS += bridges-plugin bridges-ui discovery
  39. ifeq ($(CARLA_EXTRA_TARGETS),true)
  40. # 32bit bridge
  41. ifeq ($(WINDOWS)$(CPU_X86_64),truetrue)
  42. CARLA_TARGETS += win32
  43. else ifneq ($(MACOS)$(WINDOWS),true)
  44. CARLA_TARGETS += posix32
  45. endif
  46. # Windows bridges
  47. ifeq ($(CPU_I386_OR_X86_64)$(LINUX),truetrue)
  48. CARLA_TARGETS += wine32
  49. endif
  50. ifeq ($(CPU_X86_64)$(LINUX),truetrue)
  51. CARLA_TARGETS += wine64
  52. endif
  53. endif # CARLA_EXTRA_TARGETS
  54. endif # USE_SYSTEM_CARLA_BINS
  55. # ---------------------------------------------------------------------------------------------------------------------
  56. # DGL config
  57. DGL_EXTRA_ARGS = \
  58. DISTRHO_NAMESPACE=IldaeilDISTRHO \
  59. DGL_NAMESPACE=IldaeilDGL
  60. # ---------------------------------------------------------------------------------------------------------------------
  61. # DPF bundled plugins
  62. ifneq ($(MACOS),true)
  63. ILDAEIL_FX_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-FX$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-FX.clap
  64. ILDAEIL_MIDI_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-MIDI$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-MIDI.clap
  65. ILDAEIL_SYNTH_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-Synth$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-Synth.clap
  66. endif
  67. # ---------------------------------------------------------------------------------------------------------------------
  68. # Check for OpenGL + X11 dependencies
  69. ifneq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
  70. ifneq ($(HAVE_OPENGL),true)
  71. $(error OpenGL dependency not installed/available)
  72. endif
  73. ifneq ($(HAVE_X11),true)
  74. $(error X11 dependency not installed/available)
  75. endif
  76. ifneq ($(HAVE_XCURSOR),true)
  77. $(warning Xcursor dependency not installed/available)
  78. endif
  79. ifneq ($(HAVE_XEXT),true)
  80. $(warning Xext dependency not installed/available)
  81. endif
  82. ifneq ($(HAVE_XRANDR),true)
  83. $(warning Xrandr dependency not installed/available)
  84. endif
  85. endif
  86. # ---------------------------------------------------------------------------------------------------------------------
  87. carla: dgl
  88. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla $(CARLA_TARGETS)
  89. extra-bins:
  90. $(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) carlabins -C plugins/Standalone
  91. ifneq ($(WASM),true)
  92. $(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) carlabins -C plugins/FX
  93. $(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) carlabins -C plugins/MIDI
  94. $(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) carlabins -C plugins/Synth
  95. endif
  96. extra-posix32:
  97. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla posix32
  98. extra-win32:
  99. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla win32 AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++
  100. extra-win64:
  101. $(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++
  102. extra-wine32:
  103. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla wine32
  104. extra-wine64:
  105. $(MAKE) $(CARLA_EXTRA_ARGS) -C carla wine64
  106. dgl:
  107. $(MAKE) $(DGL_EXTRA_ARGS) -C dpf/dgl opengl
  108. plugins: carla dgl
  109. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) -C plugins/Standalone
  110. ifneq ($(WASM),true)
  111. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) -C plugins/FX
  112. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) -C plugins/MIDI
  113. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) -C plugins/Synth
  114. endif
  115. ifneq ($(CROSS_COMPILING),true)
  116. gen: plugins dpf/utils/lv2_ttl_generator
  117. @$(CURDIR)/dpf/utils/generate-ttl.sh
  118. dpf/utils/lv2_ttl_generator:
  119. $(MAKE) -C dpf/utils/lv2-ttl-generator
  120. else
  121. gen:
  122. endif
  123. jack: carla dgl
  124. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) -C plugins/Standalone
  125. # ---------------------------------------------------------------------------------------------------------------------
  126. install:
  127. install -d $(DESTDIR)$(PREFIX)/bin
  128. install -d $(DESTDIR)$(PREFIX)/lib/clap/Ildaeil.clap
  129. install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-FX.lv2
  130. install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-MIDI.lv2
  131. install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-Synth.lv2
  132. install -d $(DESTDIR)$(PREFIX)/lib/vst/Ildaeil.vst
  133. install -d $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-FX.vst3/$(VST3_BINARY_DIR)
  134. install -d $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-Synth.vst3/$(VST3_BINARY_DIR)
  135. install -m 755 bin/Ildaeil$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
  136. install -m 644 bin/Ildaeil.clap/* $(DESTDIR)$(PREFIX)/lib/clap/Ildaeil.clap/
  137. install -m 644 bin/Ildaeil-FX.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-FX.lv2/
  138. install -m 644 bin/Ildaeil-MIDI.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-MIDI.lv2/
  139. install -m 644 bin/Ildaeil-Synth.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-Synth.lv2/
  140. install -m 644 bin/Ildaeil.vst/* $(DESTDIR)$(PREFIX)/lib/vst/Ildaeil.vst/
  141. install -m 644 bin/Ildaeil-FX.vst3/$(VST3_BINARY_DIR)/* $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-FX.vst3/$(VST3_BINARY_DIR)/
  142. install -m 644 bin/Ildaeil-Synth.vst3/$(VST3_BINARY_DIR)/* $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-Synth.vst3/$(VST3_BINARY_DIR)/
  143. # ---------------------------------------------------------------------------------------------------------------------
  144. clean:
  145. $(MAKE) $(CARLA_EXTRA_ARGS) distclean -C carla
  146. $(MAKE) $(CARLA_EXTRA_ARGS) clean -C plugins/Standalone
  147. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) clean -C plugins/FX
  148. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) clean -C plugins/MIDI
  149. $(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) clean -C plugins/Synth
  150. $(MAKE) clean -C dpf/dgl
  151. $(MAKE) clean -C dpf/utils/lv2-ttl-generator
  152. rm -rf bin build
  153. rm -f dpf-widgets/opengl/*.d
  154. rm -f dpf-widgets/opengl/*.o
  155. # ---------------------------------------------------------------------------------------------------------------------
  156. # tarball target, generating release source-code tarballs ready for packaging
  157. TAR_ARGS = \
  158. --exclude=".appveyor*" \
  159. --exclude=".ci*" \
  160. --exclude=".clang*" \
  161. --exclude=".drone*" \
  162. --exclude=".editor*" \
  163. --exclude=".git*" \
  164. --exclude="*.kdev*" \
  165. --exclude=".travis*" \
  166. --exclude=".vscode*" \
  167. --exclude="*.d" \
  168. --exclude="*.o" \
  169. --exclude=bin \
  170. --exclude=build \
  171. --exclude=carla/data \
  172. --exclude=carla/source/frontend \
  173. --exclude=carla/source/interposer \
  174. --exclude=carla/source/libjack \
  175. --exclude=carla/source/native-plugins/resources \
  176. --exclude=carla/source/rest \
  177. --exclude=carla/source/tests.old \
  178. --exclude=carla/source/theme \
  179. --exclude=carla/resources \
  180. --exclude=dpf/build \
  181. --exclude=dpf/cmake \
  182. --exclude=dpf/examples \
  183. --exclude=dpf/lac \
  184. --exclude=dpf/tests \
  185. --exclude=dpf-widgets/generic \
  186. --exclude=dpf-widgets/opengl/Blendish* \
  187. --exclude=dpf-widgets/opengl/DearImGuiColorTextEditor* \
  188. --exclude=dpf-widgets/opengl/Quantum* \
  189. --exclude=dpf-widgets/tests \
  190. --transform='s,^\.\.,-.-.,' \
  191. --transform='s,^\.,Ildaeil-$(VERSION),' \
  192. --transform='s,^-\.-\.,..,' \
  193. tarball:
  194. rm -f ../Ildaeil-src-$(VERSION).tar.xz
  195. tar -c --lzma $(TAR_ARGS) -f ../Ildaeil-src-$(VERSION).tar.xz .
  196. # ---------------------------------------------------------------------------------------------------------------------
  197. .PHONY: carla plugins