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.

139 lines
4.4KB

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