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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. ifneq ($(HAIKU),true)
  12. ifneq ($(WASM),true)
  13. BUILD_CXX_FLAGS += -pthread
  14. endif
  15. endif
  16. # ---------------------------------------------------------------------------------------------------------------------
  17. OBJS = $(OBJDIR)/$(MODULENAME).cpp.o
  18. OBJS_files = $(OBJDIR)/$(MODULENAME).cpp.files.o
  19. OBJS_arm32 = $(OBJDIR)/$(MODULENAME).cpp.arm32.o
  20. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
  21. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
  22. OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
  23. OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
  24. # ---------------------------------------------------------------------------------------------------------------------
  25. all: $(MODULEDIR)/$(MODULENAME).a $(MODULEDIR)/$(MODULENAME).files.a
  26. files: $(MODULEDIR)/$(MODULENAME).files.a
  27. arm32: $(MODULEDIR)/$(MODULENAME).arm32.a
  28. posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
  29. posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
  30. win32: $(MODULEDIR)/$(MODULENAME).win32.a
  31. win64: $(MODULEDIR)/$(MODULENAME).win64.a
  32. # ---------------------------------------------------------------------------------------------------------------------
  33. clean:
  34. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a
  35. debug:
  36. $(MAKE) DEBUG=true
  37. # ---------------------------------------------------------------------------------------------------------------------
  38. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  39. -@mkdir -p $(MODULEDIR)
  40. @echo "Creating $(MODULENAME).a"
  41. $(SILENT)rm -f $@
  42. $(SILENT)$(AR) crs $@ $^
  43. $(MODULEDIR)/$(MODULENAME).files.a: $(OBJS_files)
  44. -@mkdir -p $(MODULEDIR)
  45. @echo "Creating $(MODULENAME).files.a"
  46. $(SILENT)rm -f $@
  47. $(SILENT)$(AR) crs $@ $^
  48. $(MODULEDIR)/$(MODULENAME).arm32.a: $(OBJS_arm32)
  49. -@mkdir -p $(MODULEDIR)
  50. @echo "Creating $(MODULENAME).arm32.a"
  51. $(SILENT)rm -f $@
  52. $(SILENT)$(AR) crs $@ $^
  53. $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
  54. -@mkdir -p $(MODULEDIR)
  55. @echo "Creating $(MODULENAME).posix32.a"
  56. $(SILENT)rm -f $@
  57. $(SILENT)$(AR) crs $@ $^
  58. $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
  59. -@mkdir -p $(MODULEDIR)
  60. @echo "Creating $(MODULENAME).posix64.a"
  61. $(SILENT)rm -f $@
  62. $(SILENT)$(AR) crs $@ $^
  63. $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
  64. -@mkdir -p $(MODULEDIR)
  65. @echo "Creating $(MODULENAME).win32.a"
  66. $(SILENT)rm -f $@
  67. $(SILENT)$(AR) crs $@ $^
  68. $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
  69. -@mkdir -p $(MODULEDIR)
  70. @echo "Creating $(MODULENAME).win64.a"
  71. $(SILENT)rm -f $@
  72. $(SILENT)$(AR) crs $@ $^
  73. # ---------------------------------------------------------------------------------------------------------------------
  74. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  75. -@mkdir -p $(OBJDIR)
  76. @echo "Compiling $<"
  77. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  78. $(OBJDIR)/$(MODULENAME).cpp.files.o: $(MODULENAME).files.cpp
  79. -@mkdir -p $(OBJDIR)
  80. @echo "Compiling $<"
  81. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  82. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  83. -@mkdir -p $(OBJDIR)
  84. @echo "Compiling $< (32bit)"
  85. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  86. $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
  87. -@mkdir -p $(OBJDIR)
  88. @echo "Compiling $< (64bit)"
  89. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  90. $(OBJDIR)/$(MODULENAME).cpp.arm32.o: $(MODULENAME).cpp
  91. -@mkdir -p $(OBJDIR)
  92. @echo "Compiling $< (ARM32)"
  93. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@
  94. ifeq ($(MACOS),true)
  95. $(OBJDIR)/$(MODULENAME).cpp.o: BUILD_CXX_FLAGS += -ObjC++
  96. $(OBJDIR)/$(MODULENAME).cpp.files.o: BUILD_CXX_FLAGS += -ObjC++
  97. $(OBJDIR)/$(MODULENAME).cpp.%32.o: BUILD_CXX_FLAGS += -ObjC++
  98. $(OBJDIR)/$(MODULENAME).cpp.%64.o: BUILD_CXX_FLAGS += -ObjC++
  99. endif
  100. # ---------------------------------------------------------------------------------------------------------------------
  101. -include $(OBJS:%.o=%.d)
  102. -include $(OBJS_files:%.o=%.d)
  103. -include $(OBJS_arm32:%.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. # ---------------------------------------------------------------------------------------------------------------------