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.8KB

10 years ago
10 years ago
11 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. BUILD_CXX_FLAGS += $(MAGIC_FLAGS)
  15. ifneq ($(HAIKU),true)
  16. ifneq ($(WASM),true)
  17. BUILD_CXX_FLAGS += -pthread
  18. endif
  19. endif
  20. # ---------------------------------------------------------------------------------------------------------------------
  21. OBJS = \
  22. $(OBJDIR)/CarlaEngine.cpp.o \
  23. $(OBJDIR)/CarlaEngineClient.cpp.o \
  24. $(OBJDIR)/CarlaEngineData.cpp.o \
  25. $(OBJDIR)/CarlaEngineGraph.cpp.o \
  26. $(OBJDIR)/CarlaEngineInternal.cpp.o \
  27. $(OBJDIR)/CarlaEnginePorts.cpp.o \
  28. $(OBJDIR)/CarlaEngineRunner.cpp.o
  29. ifneq ($(WASM),true)
  30. OBJS += \
  31. $(OBJDIR)/CarlaEngineDummy.cpp.o
  32. endif
  33. ifeq ($(HAVE_LIBLO),true)
  34. OBJS += \
  35. $(OBJDIR)/CarlaEngineOsc.cpp.o \
  36. $(OBJDIR)/CarlaEngineOscHandlers.cpp.o \
  37. $(OBJDIR)/CarlaEngineOscSend.cpp.o
  38. endif
  39. OBJSa = $(OBJS) \
  40. $(OBJDIR)/CarlaEngineNative.cpp.o
  41. ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
  42. OBJSa += \
  43. $(OBJDIR)/CarlaEngineJuce.cpp.o
  44. endif
  45. ifeq ($(USING_RTAUDIO),true)
  46. OBJSa += \
  47. $(OBJDIR)/CarlaEngineRtAudio.cpp.o
  48. endif
  49. ifeq ($(HAVE_JACK),true)
  50. OBJSa += \
  51. $(OBJDIR)/CarlaEngineJack.cpp.o
  52. endif
  53. ifeq ($(HAVE_SDL),true)
  54. OBJSa += \
  55. $(OBJDIR)/CarlaEngineSDL.cpp.o
  56. endif
  57. OBJSp = $(OBJS) \
  58. $(OBJDIR)/CarlaEngineNative.cpp.exp.o
  59. TARGETS = \
  60. $(MODULEDIR)/carla_engine.a \
  61. $(MODULEDIR)/carla_engine_plugin.a
  62. # ---------------------------------------------------------------------------------------------------------------------
  63. all: $(TARGETS)
  64. # ---------------------------------------------------------------------------------------------------------------------
  65. clean:
  66. rm -f $(OBJSa) $(OBJSp) $(TARGETS)
  67. debug:
  68. $(MAKE) DEBUG=true
  69. # ---------------------------------------------------------------------------------------------------------------------
  70. $(MODULEDIR)/carla_engine.a: $(OBJSa)
  71. -@mkdir -p $(MODULEDIR)
  72. @echo "Creating carla_engine.a"
  73. $(SILENT)rm -f $@
  74. $(SILENT)$(AR) crs $@ $^
  75. $(MODULEDIR)/carla_engine_plugin.a: $(OBJSp)
  76. -@mkdir -p $(MODULEDIR)
  77. @echo "Creating carla_engine_plugin.a"
  78. $(SILENT)rm -f $@
  79. $(SILENT)$(AR) crs $@ $^
  80. # ---------------------------------------------------------------------------------------------------------------------
  81. $(OBJDIR)/CarlaEngineRtAudio.cpp.o: CarlaEngineRtAudio.cpp
  82. -@mkdir -p $(OBJDIR)
  83. @echo "Compiling CarlaEngineRtAudio.cpp"
  84. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(RTAUDIO_FLAGS) $(RTMIDI_FLAGS) -c -o $@
  85. $(OBJDIR)/CarlaEngineSDL.cpp.o: CarlaEngineSDL.cpp
  86. -@mkdir -p $(OBJDIR)
  87. @echo "Compiling CarlaEngineSDL.cpp"
  88. @$(CXX) $< $(BUILD_CXX_FLAGS) $(SDL_FLAGS) -c -o $@
  89. ifeq ($(MACOS),true)
  90. $(OBJDIR)/CarlaEngineNative.cpp.exp.o: CarlaEngineNative.cpp
  91. -@mkdir -p $(OBJDIR)
  92. @echo "Compiling CarlaEngineNative.cpp (plugin)"
  93. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_BUILD -UHAVE_JACK -ObjC++ -c -o $@
  94. else
  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 -UHAVE_JACK -c -o $@
  99. endif
  100. ifeq ($(JACKBRIDGE_DIRECT),true)
  101. $(OBJDIR)/CarlaEngineJack.cpp.o: CarlaEngineJack.cpp
  102. -@mkdir -p $(OBJDIR)
  103. @echo "Compiling CarlaEngineJack.cpp"
  104. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(JACK_FLAGS) -c -o $@
  105. endif
  106. ifeq ($(USING_JUCE),true)
  107. $(OBJDIR)/CarlaEngineJuce.cpp.o: CarlaEngineJuce.cpp
  108. -@mkdir -p $(OBJDIR)
  109. @echo "Compiling $<"
  110. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -std=gnu++14 -c -o $@
  111. endif
  112. $(OBJDIR)/%.cpp.o: %.cpp
  113. -@mkdir -p $(OBJDIR)
  114. @echo "Compiling $<"
  115. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  116. -include $(OBJSa:%.o=%.d)
  117. -include $(OBJDIR)/CarlaEngineNative.cpp.exp.d
  118. # ---------------------------------------------------------------------------------------------------------------------