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

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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../backend -I../includes -I../utils -isystem ../modules
  8. # --------------------------------------------------------------
  9. ifeq ($(HAVE_AF_DEPS),true)
  10. BUILD_CXX_FLAGS += -DWANT_AUDIOFILE
  11. endif
  12. ifeq ($(HAVE_MF_DEPS),true)
  13. BUILD_CXX_FLAGS += -DWANT_MIDIFILE
  14. endif
  15. ifeq ($(HAVE_ZYN_DEPS),true)
  16. BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX
  17. endif
  18. # --------------------------------------------------------------
  19. # Common
  20. LINK_FLAGS += $(LIBLO_LIBS)
  21. LINK_FLAGS += $(QTCORE_LIBS)
  22. LINK_FLAGS += $(QTXML_LIBS)
  23. LINK_FLAGS += $(RTMEMPOOL_LIBS)
  24. # --------------------------------------------------------------
  25. # Engine
  26. LINK_FLAGS += $(JACKBRIDGE_LIBS)
  27. # --------------------------------------------------------------
  28. # Plugin
  29. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  30. LINK_FLAGS += $(LILV_LIBS)
  31. endif
  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. # ifeq ($(WIN32),true)
  39. # LINK_FLAGS += lrpcrt4
  40. # endif
  41. # endif
  42. # --------------------------------------------------------------
  43. # Coomon
  44. ifeq ($(HAVE_JUCE),true)
  45. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  46. LINK_FLAGS += $(JUCE_CORE_LIBS)
  47. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  48. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  49. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  50. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  51. endif
  52. ifeq ($(HAVE_OPENGL),true)
  53. LINK_FLAGS += $(DGL_LIBS)
  54. endif
  55. # --------------------------------------------------------------
  56. # Native
  57. ifeq ($(HAVE_AF_DEPS),true)
  58. LINK_FLAGS += $(shell pkg-config --libs sndfile)
  59. ifeq ($(HAVE_FFMPEG),true)
  60. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  61. endif
  62. endif
  63. ifeq ($(HAVE_MF_DEPS),true)
  64. LINK_FLAGS += $(shell pkg-config --libs smf)
  65. endif
  66. ifeq ($(HAVE_ZYN_DEPS),true)
  67. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  68. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  69. LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  70. endif
  71. endif
  72. # --------------------------------------------------------------
  73. # Libs
  74. LIBS += ../backend/carla_engine_plugin.a
  75. LIBS += ../backend/carla_plugin.a
  76. LIBS += ../modules/carla_native.a
  77. LIBS += ../modules/jackbridge.a
  78. LIBS += ../modules/rtmempool.a
  79. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  80. LIBS += ../modules/lilv.a
  81. endif
  82. ifeq ($(HAVE_JUCE),true)
  83. LIBS += ../modules/juce_audio_basics.a
  84. # LIBS += ../modules/juce_audio_devices.a
  85. LIBS += ../modules/juce_core.a
  86. LIBS += ../modules/juce_data_structures.a
  87. LIBS += ../modules/juce_events.a
  88. LIBS += ../modules/juce_graphics.a
  89. LIBS += ../modules/juce_gui_basics.a
  90. endif
  91. ifeq ($(HAVE_OPENGL),true)
  92. LIBS += ../modules/dgl.a
  93. endif
  94. # --------------------------------------------------------------
  95. ifeq ($(WIN32),true)
  96. TARGETS = carla-native-lv2-export.exe carla-native.lv2/carla-native.dll
  97. else
  98. ifeq ($(MACOS),true)
  99. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.dylib
  100. else
  101. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.so
  102. endif
  103. endif
  104. # --------------------------------------------------------------
  105. all: $(TARGETS)
  106. clean:
  107. $(RM) $(TARGETS) *.o
  108. $(RM) carla-native.lv2/*.*
  109. debug:
  110. $(MAKE) DEBUG=true
  111. # --------------------------------------------------------------
  112. carla-native-base.cpp.o: carla-native-base.cpp ../modules/CarlaNative.h
  113. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  114. carla-native-lv2.cpp.o: carla-native-lv2.cpp carla-native-base.cpp ../modules/CarlaNative.h
  115. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  116. carla-native-lv2-export.cpp.o: carla-native-lv2-export.cpp carla-native-base.cpp ../modules/CarlaNative.h
  117. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  118. # --------------------------------------------------------------
  119. carla-native-lv2-export: carla-native-lv2-export.cpp.o $(LIBS)
  120. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
  121. ./carla-native-lv2-export
  122. carla-native-lv2-export.exe: carla-native-lv2-export.cpp.o $(LIBS)
  123. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
  124. ./carla-native-lv2-export.exe
  125. # --------------------------------------------------------------
  126. carla-native.lv2/carla-native.dll: carla-native-lv2.cpp.o $(LIBS)
  127. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
  128. carla-native.lv2/carla-native.dylib: carla-native-lv2.cpp.o $(LIBS)
  129. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -dynamiclib $(LINK_FLAGS) -o $@
  130. carla-native.lv2/carla-native.so: carla-native-lv2.cpp.o $(LIBS)
  131. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
  132. # --------------------------------------------------------------
  133. .FORCE:
  134. .PHONY: .FORCE
  135. ../modules/%.a: .FORCE
  136. $(MAKE) -C ../modules $*
  137. # --------------------------------------------------------------