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.

131 lines
4.2KB

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