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.

129 lines
4.0KB

  1. #!/usr/bin/make -f
  2. # Makefile for juce_audio_basics #
  3. # ------------------------------ #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. MODULENAME=juce_audio_basics
  8. include ../Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. BUILD_CXX_FLAGS += $(JUCE_AUDIO_BASICS_FLAGS) -I..
  11. # needed for older mingw, crashes on optimized float operations
  12. ifeq ($(WIN32),true)
  13. ifneq (,$(findstring i686,$(TARGET_MACHINE)))
  14. BUILD_CXX_FLAGS += -mpreferred-stack-boundary=2
  15. else
  16. 32BIT_FLAGS += -mpreferred-stack-boundary=2
  17. endif
  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. @rm -f $@
  47. @$(AR) crs $@ $^
  48. $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
  49. -@mkdir -p $(MODULEDIR)
  50. @echo "Creating $(MODULENAME).posix32.a"
  51. @rm -f $@
  52. @$(AR) crs $@ $^
  53. $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
  54. -@mkdir -p $(MODULEDIR)
  55. @echo "Creating $(MODULENAME).posix64.a"
  56. @rm -f $@
  57. @$(AR) crs $@ $^
  58. $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
  59. -@mkdir -p $(MODULEDIR)
  60. @echo "Creating $(MODULENAME).win32.a"
  61. @rm -f $@
  62. @$(AR) crs $@ $^
  63. $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
  64. -@mkdir -p $(MODULEDIR)
  65. @echo "Creating $(MODULENAME).win64.a"
  66. @rm -f $@
  67. @$(AR) crs $@ $^
  68. # ---------------------------------------------------------------------------------------------------------------------
  69. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  70. -@mkdir -p $(OBJDIR)
  71. @echo "Compiling $<"
  72. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  73. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  74. -@mkdir -p $(OBJDIR)
  75. @echo "Compiling $< (32bit)"
  76. @$(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. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  81. # ---------------------------------------------------------------------------------------------------------------------
  82. $(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp
  83. -@mkdir -p $(OBJDIR)
  84. @echo "Compiling $<"
  85. @$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  86. $(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp
  87. -@mkdir -p $(OBJDIR)
  88. @echo "Compiling $< (32bit)"
  89. @$(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. @$(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. # ---------------------------------------------------------------------------------------------------------------------