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.4KB

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