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.

125 lines
4.0KB

  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..
  11. ifeq ($(WIN32),true)
  12. # BUILD_CXX_FLAGS += -I$(CWD)/includes/asio
  13. BUILD_CXX_FLAGS += -I$(CWD)/modules/rtaudio/include
  14. endif
  15. # ----------------------------------------------------------------------------------------------------------------------------
  16. ifeq ($(MACOS),true)
  17. OBJS = $(OBJDIR)/$(MODULENAME).mm.o
  18. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).mm.posix32.o
  19. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o
  20. else
  21. OBJS = $(OBJDIR)/$(MODULENAME).cpp.o
  22. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
  23. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
  24. endif
  25. OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
  26. OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
  27. # ----------------------------------------------------------------------------------------------------------------------------
  28. all: $(MODULEDIR)/$(MODULENAME).a
  29. posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
  30. posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
  31. win32: $(MODULEDIR)/$(MODULENAME).win32.a
  32. win64: $(MODULEDIR)/$(MODULENAME).win64.a
  33. # ----------------------------------------------------------------------------------------------------------------------------
  34. clean:
  35. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a
  36. debug:
  37. $(MAKE) DEBUG=true
  38. # ----------------------------------------------------------------------------------------------------------------------------
  39. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  40. -@mkdir -p $(MODULEDIR)
  41. @echo "Creating $(MODULENAME).a"
  42. @rm -f $@
  43. @$(AR) crs $@ $^
  44. $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
  45. -@mkdir -p $(MODULEDIR)
  46. @echo "Creating $(MODULENAME).posix32.a"
  47. @rm -f $@
  48. @$(AR) crs $@ $^
  49. $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
  50. -@mkdir -p $(MODULEDIR)
  51. @echo "Creating $(MODULENAME).posix64.a"
  52. @rm -f $@
  53. @$(AR) crs $@ $^
  54. $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
  55. -@mkdir -p $(MODULEDIR)
  56. @echo "Creating $(MODULENAME).win32.a"
  57. @rm -f $@
  58. @$(AR) crs $@ $^
  59. $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
  60. -@mkdir -p $(MODULEDIR)
  61. @echo "Creating $(MODULENAME).win64.a"
  62. @rm -f $@
  63. @$(AR) crs $@ $^
  64. # ----------------------------------------------------------------------------------------------------------------------------
  65. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  66. -@mkdir -p $(OBJDIR)
  67. @echo "Compiling $<"
  68. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  69. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  70. -@mkdir -p $(OBJDIR)
  71. @echo "Compiling $< (32bit)"
  72. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  73. $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
  74. -@mkdir -p $(OBJDIR)
  75. @echo "Compiling $< (64bit)"
  76. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  77. # ----------------------------------------------------------------------------------------------------------------------------
  78. $(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp
  79. -@mkdir -p $(OBJDIR)
  80. @echo "Compiling $<"
  81. @$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  82. $(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp
  83. -@mkdir -p $(OBJDIR)
  84. @echo "Compiling $< (32bit)"
  85. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -ObjC++ -c -o $@
  86. $(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp
  87. -@mkdir -p $(OBJDIR)
  88. @echo "Compiling $< (64bit)"
  89. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -ObjC++ -c -o $@
  90. # ----------------------------------------------------------------------------------------------------------------------------
  91. -include $(OBJS:%.o=%.d)
  92. -include $(OBJS_posix32:%.o=%.d)
  93. -include $(OBJS_posix64:%.o=%.d)
  94. -include $(OBJS_win32:%.o=%.d)
  95. -include $(OBJS_win64:%.o=%.d)
  96. # ----------------------------------------------------------------------------------------------------------------------------