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.

Makefile 4.2KB

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