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.

128 lines
4.0KB

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