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.

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