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.

156 lines
3.7KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla plugin exports #
  3. # --------------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. BUILD_CXX_FLAGS += -I../includes -I../modules -I../utils
  8. # --------------------------------------------------------------
  9. ifeq ($(HAVE_OPENGL),true)
  10. BUILD_CXX_FLAGS += -DWANT_OPENGL
  11. endif
  12. ifeq ($(HAVE_AF_DEPS),true)
  13. BUILD_CXX_FLAGS += -DWANT_AUDIOFILE
  14. endif
  15. ifeq ($(HAVE_MF_DEPS),true)
  16. BUILD_CXX_FLAGS += -DWANT_MIDIFILE
  17. endif
  18. ifeq ($(HAVE_ZYN_DEPS),true)
  19. BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX
  20. endif
  21. # --------------------------------------------------------------
  22. # Common
  23. # LINK_FLAGS += $(shell pkg-config --libs liblo)
  24. #
  25. # ifeq ($(HAVE_QT4),true)
  26. # LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui QtXml)
  27. # else
  28. # LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Xml Qt5Widgets)
  29. # endif
  30. # --------------------------------------------------------------
  31. # Plugin
  32. # ifeq ($(HAVE_FLUIDSYNTH),true)
  33. # LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
  34. # endif
  35. #
  36. # ifeq ($(HAVE_LINUXSAMPLER),true)
  37. # LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
  38. # endif
  39. # --------------------------------------------------------------
  40. # Native
  41. DGL_LIBS = -lX11
  42. ifeq ($(HAVE_OPENGL),true)
  43. LINK_FLAGS += $(shell pkg-config --libs gl) $(DGL_LIBS)
  44. endif
  45. ifeq ($(HAVE_AF_DEPS),true)
  46. LINK_FLAGS += $(shell pkg-config --libs sndfile)
  47. ifeq ($(HAVE_FFMPEG),true)
  48. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  49. endif
  50. endif
  51. ifeq ($(HAVE_MF_DEPS),true)
  52. LINK_FLAGS += $(shell pkg-config --libs smf)
  53. endif
  54. ifeq ($(HAVE_ZYN_DEPS),true)
  55. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  56. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  57. LINK_FLAGS += $(shell pkg-config --libs ntk ntk_images)
  58. endif
  59. endif
  60. LINK_FLAGS += $(EXTRA_LIBS)
  61. # --------------------------------------------------------------
  62. LIBS = ../modules/carla_native.a
  63. LIBS += ../modules/juce_audio_basics.a
  64. LIBS += ../modules/juce_core.a
  65. LIBS += ../modules/rtmempool.a
  66. # ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  67. # LIBS += ../modules/lilv.a
  68. # endif
  69. ifeq ($(HAVE_OPENGL),true)
  70. LIBS += ../modules/dgl.a
  71. endif
  72. ifeq ($(WIN32),true)
  73. TARGETS = carla-native-lv2-export.exe
  74. TARGETS += carla-native.lv2/carla-native.dll
  75. else
  76. TARGETS = carla-native-lv2-export
  77. ifeq ($(MACOS),true)
  78. TARGETS += carla-native.lv2/carla-native.dylib
  79. else
  80. LIBS += -ldl -lpthread -lrt
  81. TARGETS += carla-native.lv2/carla-native.so
  82. endif
  83. endif
  84. # --------------------------------------------------------------
  85. all: $(TARGETS)
  86. clean:
  87. rm -f *.o
  88. rm -f carla-native.lv2/*.*
  89. debug:
  90. $(MAKE) DEBUG=true
  91. # --------------------------------------------------------------
  92. carla-native-base.cpp.o: carla-native-base.cpp ../modules/CarlaNative.h
  93. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  94. carla-native-lv2.cpp.o: carla-native-lv2.cpp carla-native-base.cpp ../modules/CarlaNative.h
  95. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  96. carla-native-lv2-export.cpp.o: carla-native-lv2-export.cpp carla-native-base.cpp ../modules/CarlaNative.h
  97. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  98. # --------------------------------------------------------------
  99. carla-native.lv2/carla-native.dll: carla-native-lv2.cpp.o $(LIBS)
  100. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  101. carla-native.lv2/carla-native.dylib: carla-native-lv2.cpp.o $(LIBS)
  102. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  103. carla-native.lv2/carla-native.so: carla-native-lv2.cpp.o $(LIBS)
  104. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  105. carla-native-lv2-export: carla-native-lv2-export.cpp.o $(LIBS)
  106. $(CXX) $^ $(LINK_FLAGS) -o $@
  107. ./carla-native-lv2-export
  108. carla-native-lv2-export.exe: carla-native-lv2-export.cpp.o $(LIBS)
  109. $(CXX) $^ $(LINK_FLAGS) -o $@
  110. ./carla-native-lv2-export.exe
  111. # --------------------------------------------------------------
  112. .FORCE:
  113. .PHONY: .FORCE
  114. ../modules/%.a: .FORCE
  115. $(MAKE) -C ../modules $*