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

10 years ago
10 years ago
11 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #!/usr/bin/make -f
  2. # Makefile for carla-engine #
  3. # ------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. include ../Makefile.mk
  8. # Workaround GCC bug
  9. ifeq ($(TESTBUILD),true)
  10. ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
  11. BUILD_CXX_FLAGS += -Wno-undef
  12. endif
  13. endif
  14. ifeq ($(USING_JUCE),true)
  15. ifeq ($(WINDOWS),true)
  16. BUILD_CXX_FLAGS += -I$(CWD)/modules/mingw-std-threads
  17. endif
  18. endif
  19. BUILD_CXX_FLAGS += $(MAGIC_FLAGS)
  20. ifneq ($(HAIKU),true)
  21. ifneq ($(WASM),true)
  22. BUILD_CXX_FLAGS += -pthread
  23. endif
  24. endif
  25. # ---------------------------------------------------------------------------------------------------------------------
  26. OBJS = \
  27. $(OBJDIR)/CarlaEngine.cpp.o \
  28. $(OBJDIR)/CarlaEngineClient.cpp.o \
  29. $(OBJDIR)/CarlaEngineData.cpp.o \
  30. $(OBJDIR)/CarlaEngineGraph.cpp.o \
  31. $(OBJDIR)/CarlaEngineInternal.cpp.o \
  32. $(OBJDIR)/CarlaEnginePorts.cpp.o \
  33. $(OBJDIR)/CarlaEngineRunner.cpp.o
  34. ifneq ($(WASM),true)
  35. OBJS += \
  36. $(OBJDIR)/CarlaEngineDummy.cpp.o
  37. endif
  38. ifeq ($(HAVE_LIBLO),true)
  39. OBJS += \
  40. $(OBJDIR)/CarlaEngineOsc.cpp.o \
  41. $(OBJDIR)/CarlaEngineOscHandlers.cpp.o \
  42. $(OBJDIR)/CarlaEngineOscSend.cpp.o
  43. endif
  44. OBJSa = $(OBJS) \
  45. $(OBJDIR)/CarlaEngineNative.cpp.o
  46. ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
  47. OBJSa += \
  48. $(OBJDIR)/CarlaEngineJuce.cpp.o
  49. endif
  50. ifeq ($(USING_RTAUDIO),true)
  51. OBJSa += \
  52. $(OBJDIR)/CarlaEngineRtAudio.cpp.o
  53. endif
  54. ifeq ($(HAVE_JACK),true)
  55. OBJSa += \
  56. $(OBJDIR)/CarlaEngineJack.cpp.o
  57. endif
  58. ifeq ($(HAVE_SDL),true)
  59. OBJSa += \
  60. $(OBJDIR)/CarlaEngineSDL.cpp.o
  61. endif
  62. OBJSp = $(OBJS) \
  63. $(OBJDIR)/CarlaEngineNative.cpp.exp.o
  64. TARGETS = \
  65. $(MODULEDIR)/carla_engine.a \
  66. $(MODULEDIR)/carla_engine_plugin.a
  67. # ---------------------------------------------------------------------------------------------------------------------
  68. all: $(TARGETS)
  69. # ---------------------------------------------------------------------------------------------------------------------
  70. clean:
  71. rm -f $(OBJSa) $(OBJSp) $(TARGETS)
  72. debug:
  73. $(MAKE) DEBUG=true
  74. # ---------------------------------------------------------------------------------------------------------------------
  75. $(MODULEDIR)/carla_engine.a: $(OBJSa)
  76. -@mkdir -p $(MODULEDIR)
  77. @echo "Creating carla_engine.a"
  78. $(SILENT)rm -f $@
  79. $(SILENT)$(AR) crs $@ $^
  80. $(MODULEDIR)/carla_engine_plugin.a: $(OBJSp)
  81. -@mkdir -p $(MODULEDIR)
  82. @echo "Creating carla_engine_plugin.a"
  83. $(SILENT)rm -f $@
  84. $(SILENT)$(AR) crs $@ $^
  85. # ---------------------------------------------------------------------------------------------------------------------
  86. $(OBJDIR)/CarlaEngineRtAudio.cpp.o: CarlaEngineRtAudio.cpp
  87. -@mkdir -p $(OBJDIR)
  88. @echo "Compiling CarlaEngineRtAudio.cpp"
  89. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(RTAUDIO_FLAGS) $(RTMIDI_FLAGS) -c -o $@
  90. $(OBJDIR)/CarlaEngineSDL.cpp.o: CarlaEngineSDL.cpp
  91. -@mkdir -p $(OBJDIR)
  92. @echo "Compiling CarlaEngineSDL.cpp"
  93. @$(CXX) $< $(BUILD_CXX_FLAGS) $(SDL_FLAGS) -c -o $@
  94. ifeq ($(MACOS),true)
  95. $(OBJDIR)/CarlaEngineNative.cpp.exp.o: CarlaEngineNative.cpp
  96. -@mkdir -p $(OBJDIR)
  97. @echo "Compiling CarlaEngineNative.cpp (plugin)"
  98. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_BUILD -ObjC++ -c -o $@
  99. else
  100. $(OBJDIR)/CarlaEngineNative.cpp.exp.o: CarlaEngineNative.cpp
  101. -@mkdir -p $(OBJDIR)
  102. @echo "Compiling CarlaEngineNative.cpp (plugin)"
  103. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_BUILD -c -o $@
  104. endif
  105. ifeq ($(JACKBRIDGE_DIRECT),true)
  106. $(OBJDIR)/CarlaEngineJack.cpp.o: CarlaEngineJack.cpp
  107. -@mkdir -p $(OBJDIR)
  108. @echo "Compiling CarlaEngineJack.cpp"
  109. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(JACK_FLAGS) -c -o $@
  110. endif
  111. ifeq ($(USING_JUCE),true)
  112. $(OBJDIR)/CarlaEngineJuce.cpp.o: CarlaEngineJuce.cpp
  113. -@mkdir -p $(OBJDIR)
  114. @echo "Compiling $<"
  115. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -std=gnu++14 -c -o $@
  116. endif
  117. $(OBJDIR)/%.cpp.o: %.cpp
  118. -@mkdir -p $(OBJDIR)
  119. @echo "Compiling $<"
  120. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  121. -include $(OBJSa:%.o=%.d)
  122. -include $(OBJDIR)/CarlaEngineNative.cpp.exp.d
  123. # ---------------------------------------------------------------------------------------------------------------------