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 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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..
  11. ifeq ($(LINUX),true)
  12. BUILD_CXX_FLAGS += $(shell pkg-config --cflags freetype2)
  13. endif
  14. ifeq ($(WIN32),true)
  15. BUILD_CXX_FLAGS += -Wno-missing-field-initializers -Wno-strict-overflow
  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. @rm -f $@
  45. @$(AR) crs $@ $^
  46. $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
  47. -@mkdir -p $(MODULEDIR)
  48. @echo "Creating $(MODULENAME).posix32.a"
  49. @rm -f $@
  50. @$(AR) crs $@ $^
  51. $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
  52. -@mkdir -p $(MODULEDIR)
  53. @echo "Creating $(MODULENAME).posix64.a"
  54. @rm -f $@
  55. @$(AR) crs $@ $^
  56. $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
  57. -@mkdir -p $(MODULEDIR)
  58. @echo "Creating $(MODULENAME).win32.a"
  59. @rm -f $@
  60. @$(AR) crs $@ $^
  61. $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
  62. -@mkdir -p $(MODULEDIR)
  63. @echo "Creating $(MODULENAME).win64.a"
  64. @rm -f $@
  65. @$(AR) crs $@ $^
  66. # ---------------------------------------------------------------------------------------------------------------------
  67. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  68. -@mkdir -p $(OBJDIR)
  69. @echo "Compiling $<"
  70. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  71. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  72. -@mkdir -p $(OBJDIR)
  73. @echo "Compiling $< (32bit)"
  74. @$(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. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  79. # ---------------------------------------------------------------------------------------------------------------------
  80. $(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp
  81. -@mkdir -p $(OBJDIR)
  82. @echo "Compiling $<"
  83. @$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  84. $(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp
  85. -@mkdir -p $(OBJDIR)
  86. @echo "Compiling $< (32bit)"
  87. @$(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. @$(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. # ---------------------------------------------------------------------------------------------------------------------