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.

187 lines
6.3KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-discovery #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. include $(CWD)/Makefile.deps
  8. include $(CWD)/Makefile.mk
  9. # --------------------------------------------------------------
  10. ifeq ($(WIN64),true)
  11. winv=64
  12. else
  13. winv=32
  14. endif
  15. # --------------------------------------------------------------
  16. BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules
  17. BUILD_CXX_FLAGS += -I../includes/vst
  18. ifeq ($(MACOS_OR_WIN32),true)
  19. BUILD_CXX_FLAGS += -I../includes/vst3
  20. endif
  21. ifeq ($(MACOS),true)
  22. BUILD_CXX_FLAGS += -ObjC++
  23. endif
  24. 32BIT_FLAGS += -DBUILD_BRIDGE
  25. 64BIT_FLAGS += -DBUILD_BRIDGE
  26. # --------------------------------------------------------------
  27. ifeq ($(CARLA_VESTIGE_HEADER),true)
  28. BUILD_CXX_FLAGS += -DVESTIGE_HEADER
  29. endif
  30. # --------------------------------------------------------------
  31. ifeq ($(HAVE_FLUIDSYNTH),true)
  32. NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
  33. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  34. endif
  35. ifeq ($(HAVE_LINUXSAMPLER),true)
  36. NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS)
  37. NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  38. endif
  39. # --------------------------------------------------------------
  40. LIBS = ../modules/lilv.a
  41. LIBS_posix32 = ../modules/lilv.posix32.a
  42. LIBS_posix64 = ../modules/lilv.posix64.a
  43. LIBS_win32 = ../modules/lilv.win32.a
  44. LIBS_win64 = ../modules/lilv.win64.a
  45. LINK_FLAGS += $(LILV_LIBS)
  46. LIBS += ../modules/juce_core.a
  47. LIBS_posix32 += ../modules/juce_core.posix32.a
  48. LIBS_posix64 += ../modules/juce_core.posix64.a
  49. LIBS_win32 += ../modules/juce_core.win32.a
  50. LIBS_win64 += ../modules/juce_core.win64.a
  51. LINK_FLAGS += $(JUCE_CORE_LIBS)
  52. ifeq ($(MACOS_OR_WIN32),true)
  53. LIBS += ../modules/juce_audio_basics.a
  54. LIBS_posix32 += ../modules/juce_audio_basics.posix32.a
  55. LIBS_posix64 += ../modules/juce_audio_basics.posix64.a
  56. LIBS_win32 += ../modules/juce_audio_basics.win32.a
  57. LIBS_win64 += ../modules/juce_audio_basics.win64.a
  58. LIBS += ../modules/juce_audio_processors.a
  59. LIBS_posix32 += ../modules/juce_audio_processors.posix32.a
  60. LIBS_posix64 += ../modules/juce_audio_processors.posix64.a
  61. LIBS_win32 += ../modules/juce_audio_processors.win32.a
  62. LIBS_win64 += ../modules/juce_audio_processors.win64.a
  63. LIBS += ../modules/juce_data_structures.a
  64. LIBS_posix32 += ../modules/juce_data_structures.posix32.a
  65. LIBS_posix64 += ../modules/juce_data_structures.posix64.a
  66. LIBS_win32 += ../modules/juce_data_structures.win32.a
  67. LIBS_win64 += ../modules/juce_data_structures.win64.a
  68. LIBS += ../modules/juce_events.a
  69. LIBS_posix32 += ../modules/juce_events.posix32.a
  70. LIBS_posix64 += ../modules/juce_events.posix64.a
  71. LIBS_win32 += ../modules/juce_events.win32.a
  72. LIBS_win64 += ../modules/juce_events.win64.a
  73. LIBS += ../modules/juce_graphics.a
  74. LIBS_posix32 += ../modules/juce_graphics.posix32.a
  75. LIBS_posix64 += ../modules/juce_graphics.posix64.a
  76. LIBS_win32 += ../modules/juce_graphics.win32.a
  77. LIBS_win64 += ../modules/juce_graphics.win64.a
  78. LIBS += ../modules/juce_gui_basics.a
  79. LIBS_posix32 += ../modules/juce_gui_basics.posix32.a
  80. LIBS_posix64 += ../modules/juce_gui_basics.posix64.a
  81. LIBS_win32 += ../modules/juce_gui_basics.win32.a
  82. LIBS_win64 += ../modules/juce_gui_basics.win64.a
  83. ifeq ($(MACOS),true)
  84. LIBS += ../modules/juce_gui_extra.a
  85. LIBS_posix32 += ../modules/juce_gui_extra.posix32.a
  86. LIBS_posix64 += ../modules/juce_gui_extra.posix64.a
  87. endif
  88. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  89. LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  90. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  91. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  92. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  93. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  94. ifeq ($(MACOS),true)
  95. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  96. endif
  97. endif
  98. ifeq ($(UNIX),true)
  99. LINK_FLAGS += -ldl
  100. endif
  101. # --------------------------------------------------------------
  102. DEPS = $(CARLA_BACKEND_UTILS_HPP)
  103. DEPS += $(CARLA_LIB_UTILS_HPP)
  104. DEPS += $(CARLA_MATH_UTILS_HPP)
  105. DEPS += $(CARLA_MIDI_H)
  106. # juce_audio_processors.h
  107. DEPS += $(CARLA_LADSPA_UTILS_HPP)
  108. DEPS += $(CARLA_DSSI_UTILS_CPP)
  109. DEPS += $(CARLA_LV2_UTILS_HPP)
  110. DEPS += $(CARLA_VST_UTILS_HPP)
  111. OBJS = carla-discovery.cpp
  112. # --------------------------------------------------------------
  113. all: ../../bin/carla-discovery-native$(APP_EXT)
  114. posix32: ../../bin/carla-discovery-posix32
  115. posix64: ../../bin/carla-discovery-posix64
  116. win32: ../../bin/carla-discovery-win32.exe
  117. win64: ../../bin/carla-discovery-win64.exe
  118. # --------------------------------------------------------------
  119. carla-discovery.cpp.o: carla-discovery.cpp $(DEPS)
  120. $(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  121. carla-discovery.cpp.posix32.o: carla-discovery.cpp $(DEPS)
  122. $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  123. carla-discovery.cpp.posix64.o: carla-discovery.cpp $(DEPS)
  124. $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  125. carla-discovery.cpp.win32.o: carla-discovery.cpp $(DEPS)
  126. $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  127. carla-discovery.cpp.win64.o: carla-discovery.cpp $(DEPS)
  128. $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  129. # --------------------------------------------------------------
  130. ../../bin/carla-discovery-native: carla-discovery.cpp.o $(LIBS)
  131. $(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
  132. ../../bin/carla-discovery-native.exe: carla-discovery.cpp.o $(LIBS)
  133. $(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@ && \
  134. cd ../../bin/ && ln -s carla-discovery-native.exe carla-discovery-win$(winv).exe
  135. ../../bin/carla-discovery-posix32: carla-discovery.cpp.posix32.o $(LIBS_posix32)
  136. $(CXX) $< $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(32BIT_FLAGS) $(LINK_FLAGS) -o $@
  137. ../../bin/carla-discovery-posix64: carla-discovery.cpp.posix64.o $(DEPS) $(LIBS_posix64)
  138. $(CXX) $< $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(64BIT_FLAGS) $(LINK_FLAGS) -o $@
  139. ../../bin/carla-discovery-win32.exe: carla-discovery.cpp.win32.o $(DEPS) $(LIBS_win32)
  140. $(CXX) $< $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(32BIT_FLAGS) $(LINK_FLAGS) -o $@
  141. ../../bin/carla-discovery-win64.exe: carla-discovery.cpp.win64.o $(DEPS) $(LIBS_win64)
  142. $(CXX) $< $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(64BIT_FLAGS) $(LINK_FLAGS) -o $@
  143. # --------------------------------------------------------------
  144. clean:
  145. $(RM) *.o ../../bin/carla-discovery-*
  146. debug:
  147. $(MAKE) DEBUG=true
  148. # --------------------------------------------------------------