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.

130 lines
4.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for juce_audio_devices #
  3. # ------------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. MODULENAME=juce_audio_devices
  8. include ../Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. BUILD_CXX_FLAGS += $(JUCE_AUDIO_DEVICES_FLAGS) -I.. -std=gnu++14
  11. ifeq ($(WINDOWS),true)
  12. # BUILD_CXX_FLAGS += -Wno-missing-field-initializers
  13. # BUILD_CXX_FLAGS += -I$(CWD)/includes/asio
  14. BUILD_CXX_FLAGS += -I$(CWD)/modules/rtaudio/include
  15. endif
  16. ifeq ($(WINDOWS),true)
  17. BUILD_CXX_FLAGS += -I../mingw-std-threads
  18. endif
  19. # ---------------------------------------------------------------------------------------------------------------------
  20. ifeq ($(MACOS),true)
  21. OBJS = $(OBJDIR)/$(MODULENAME).mm.o
  22. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).mm.posix32.o
  23. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o
  24. else
  25. OBJS = $(OBJDIR)/$(MODULENAME).cpp.o
  26. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
  27. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
  28. endif
  29. OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
  30. OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
  31. # ---------------------------------------------------------------------------------------------------------------------
  32. all: $(MODULEDIR)/$(MODULENAME).a
  33. posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
  34. posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
  35. win32: $(MODULEDIR)/$(MODULENAME).win32.a
  36. win64: $(MODULEDIR)/$(MODULENAME).win64.a
  37. # ---------------------------------------------------------------------------------------------------------------------
  38. clean:
  39. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a
  40. debug:
  41. $(MAKE) DEBUG=true
  42. # ---------------------------------------------------------------------------------------------------------------------
  43. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  44. -@mkdir -p $(MODULEDIR)
  45. @echo "Creating $(MODULENAME).a"
  46. $(SILENT)rm -f $@
  47. $(SILENT)$(AR) crs $@ $^
  48. $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
  49. -@mkdir -p $(MODULEDIR)
  50. @echo "Creating $(MODULENAME).posix32.a"
  51. $(SILENT)rm -f $@
  52. $(SILENT)$(AR) crs $@ $^
  53. $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
  54. -@mkdir -p $(MODULEDIR)
  55. @echo "Creating $(MODULENAME).posix64.a"
  56. $(SILENT)rm -f $@
  57. $(SILENT)$(AR) crs $@ $^
  58. $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
  59. -@mkdir -p $(MODULEDIR)
  60. @echo "Creating $(MODULENAME).win32.a"
  61. $(SILENT)rm -f $@
  62. $(SILENT)$(AR) crs $@ $^
  63. $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
  64. -@mkdir -p $(MODULEDIR)
  65. @echo "Creating $(MODULENAME).win64.a"
  66. $(SILENT)rm -f $@
  67. $(SILENT)$(AR) crs $@ $^
  68. # ---------------------------------------------------------------------------------------------------------------------
  69. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  70. -@mkdir -p $(OBJDIR)
  71. @echo "Compiling $<"
  72. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  73. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  74. -@mkdir -p $(OBJDIR)
  75. @echo "Compiling $< (32bit)"
  76. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  77. $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
  78. -@mkdir -p $(OBJDIR)
  79. @echo "Compiling $< (64bit)"
  80. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  81. # ---------------------------------------------------------------------------------------------------------------------
  82. $(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp
  83. -@mkdir -p $(OBJDIR)
  84. @echo "Compiling $<"
  85. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  86. $(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp
  87. -@mkdir -p $(OBJDIR)
  88. @echo "Compiling $< (32bit)"
  89. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -ObjC++ -c -o $@
  90. $(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp
  91. -@mkdir -p $(OBJDIR)
  92. @echo "Compiling $< (64bit)"
  93. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -ObjC++ -c -o $@
  94. # ---------------------------------------------------------------------------------------------------------------------
  95. -include $(OBJS:%.o=%.d)
  96. -include $(OBJS_posix32:%.o=%.d)
  97. -include $(OBJS_posix64:%.o=%.d)
  98. -include $(OBJS_win32:%.o=%.d)
  99. -include $(OBJS_win64:%.o=%.d)
  100. # ---------------------------------------------------------------------------------------------------------------------