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.

133 lines
4.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for juce_gui_basics #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. MODULENAME=juce_gui_basics
  8. include ../Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. BUILD_CXX_FLAGS += $(JUCE_GUI_BASICS_FLAGS) -I.. -std=gnu++14
  11. # needed for mingw juce
  12. # ifeq ($(WINDOWS),true)
  13. # BUILD_CXX_FLAGS += -Wno-missing-field-initializers -Wno-multichar
  14. # # needed for bloated juce
  15. # ifeq ($(DEBUG),true)
  16. # BUILD_CXX_FLAGS += -Wa,-mbig-obj
  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. # ---------------------------------------------------------------------------------------------------------------------