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.

120 lines
3.9KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla_juce #
  3. # ---------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. MODULENAME=carla_juce
  8. include ../Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. BUILD_CXX_FLAGS += -I.. -std=gnu++14
  11. # ---------------------------------------------------------------------------------------------------------------------
  12. ifeq ($(MACOS),true)
  13. OBJS = $(OBJDIR)/$(MODULENAME).mm.o
  14. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).mm.posix32.o
  15. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o
  16. else
  17. OBJS = $(OBJDIR)/$(MODULENAME).cpp.o
  18. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
  19. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
  20. endif
  21. OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
  22. OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
  23. # ---------------------------------------------------------------------------------------------------------------------
  24. all: $(MODULEDIR)/$(MODULENAME).a
  25. posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
  26. posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
  27. win32: $(MODULEDIR)/$(MODULENAME).win32.a
  28. win64: $(MODULEDIR)/$(MODULENAME).win64.a
  29. # ---------------------------------------------------------------------------------------------------------------------
  30. clean:
  31. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a
  32. debug:
  33. $(MAKE) DEBUG=true
  34. # ---------------------------------------------------------------------------------------------------------------------
  35. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  36. -@mkdir -p $(MODULEDIR)
  37. @echo "Creating $(MODULENAME).a"
  38. $(SILENT)rm -f $@
  39. $(SILENT)$(AR) crs $@ $^
  40. $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
  41. -@mkdir -p $(MODULEDIR)
  42. @echo "Creating $(MODULENAME).posix32.a"
  43. $(SILENT)rm -f $@
  44. $(SILENT)$(AR) crs $@ $^
  45. $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
  46. -@mkdir -p $(MODULEDIR)
  47. @echo "Creating $(MODULENAME).posix64.a"
  48. $(SILENT)rm -f $@
  49. $(SILENT)$(AR) crs $@ $^
  50. $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
  51. -@mkdir -p $(MODULEDIR)
  52. @echo "Creating $(MODULENAME).win32.a"
  53. $(SILENT)rm -f $@
  54. $(SILENT)$(AR) crs $@ $^
  55. $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
  56. -@mkdir -p $(MODULEDIR)
  57. @echo "Creating $(MODULENAME).win64.a"
  58. $(SILENT)rm -f $@
  59. $(SILENT)$(AR) crs $@ $^
  60. # ---------------------------------------------------------------------------------------------------------------------
  61. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  62. -@mkdir -p $(OBJDIR)
  63. @echo "Compiling $<"
  64. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  65. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  66. -@mkdir -p $(OBJDIR)
  67. @echo "Compiling $< (32bit)"
  68. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  69. $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
  70. -@mkdir -p $(OBJDIR)
  71. @echo "Compiling $< (64bit)"
  72. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  73. # ---------------------------------------------------------------------------------------------------------------------
  74. $(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp
  75. -@mkdir -p $(OBJDIR)
  76. @echo "Compiling $<"
  77. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  78. $(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp
  79. -@mkdir -p $(OBJDIR)
  80. @echo "Compiling $< (32bit)"
  81. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -ObjC++ -c -o $@
  82. $(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp
  83. -@mkdir -p $(OBJDIR)
  84. @echo "Compiling $< (64bit)"
  85. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -ObjC++ -c -o $@
  86. # ---------------------------------------------------------------------------------------------------------------------
  87. -include $(OBJS:%.o=%.d)
  88. -include $(OBJS_posix32:%.o=%.d)
  89. -include $(OBJS_posix64:%.o=%.d)
  90. -include $(OBJS_win32:%.o=%.d)
  91. -include $(OBJS_win64:%.o=%.d)
  92. # ---------------------------------------------------------------------------------------------------------------------