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

11 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. #!/usr/bin/make -f
  2. # Makefile for carla-discovery #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. ifeq ($(WIN64),true)
  7. winv=64
  8. else
  9. winv=32
  10. endif
  11. CWD=..
  12. MODULENAME=carla-discovery
  13. include $(CWD)/Makefile.mk
  14. # ----------------------------------------------------------------------------------------------------------------------------
  15. BINDIR := $(CWD)/../bin
  16. ifeq ($(DEBUG),true)
  17. OBJDIR := $(CWD)/../build/discovery/Debug
  18. MODULEDIR := $(CWD)/../build/modules/Debug
  19. else
  20. OBJDIR := $(CWD)/../build/discovery/Release
  21. MODULEDIR := $(CWD)/../build/modules/Release
  22. endif
  23. # ----------------------------------------------------------------------------------------------------------------------------
  24. BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils
  25. ifeq ($(MACOS),true)
  26. BUILD_CXX_FLAGS += -ObjC++
  27. endif
  28. 32BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
  29. 64BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
  30. # ----------------------------------------------------------------------------------------------------------------------------
  31. NATIVE_BUILD_FLAGS =
  32. NATIVE_LINK_FLAGS =
  33. ifeq ($(HAVE_FLUIDSYNTH),true)
  34. NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
  35. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  36. endif
  37. # ----------------------------------------------------------------------------------------------------------------------------
  38. LIBS_native = $(MODULEDIR)/lilv.a
  39. LIBS_posix32 = $(MODULEDIR)/lilv.posix32.a
  40. LIBS_posix64 = $(MODULEDIR)/lilv.posix64.a
  41. LIBS_win32 = $(MODULEDIR)/lilv.win32.a
  42. LIBS_win64 = $(MODULEDIR)/lilv.win64.a
  43. LINK_FLAGS += $(LILV_LIBS)
  44. LIBS_native += $(MODULEDIR)/water.files.a
  45. LINK_FLAGS += $(WATER_LIBS)
  46. LINK_FLAGS += $(LIBDL_LIBS)
  47. # ----------------------------------------------------------------------------------------------------------------------------
  48. OBJS_native = $(OBJDIR)/$(MODULENAME).cpp.o
  49. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
  50. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
  51. OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
  52. OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
  53. # ----------------------------------------------------------------------------------------------------------------------------
  54. all: native
  55. # ----------------------------------------------------------------------------------------------------------------------------
  56. clean:
  57. rm -f $(OBJDIR)/*.o $(BINDIR)/$(MODULENAME)-*
  58. debug:
  59. $(MAKE) DEBUG=true
  60. # ----------------------------------------------------------------------------------------------------------------------------
  61. native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT)
  62. posix32: $(BINDIR)/$(MODULENAME)-posix32
  63. posix64: $(BINDIR)/$(MODULENAME)-posix64
  64. win32: $(BINDIR)/$(MODULENAME)-win32.exe
  65. win64: $(BINDIR)/$(MODULENAME)-win64.exe
  66. # ----------------------------------------------------------------------------------------------------------------------------
  67. $(BINDIR)/$(MODULENAME)-native: $(OBJS_native) $(LIBS_native)
  68. -@mkdir -p $(BINDIR)
  69. @echo "Linking $(MODULENAME)-native"
  70. @$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
  71. $(BINDIR)/$(MODULENAME)-native.exe: $(OBJS_native) $(LIBS_native)
  72. -@mkdir -p $(BINDIR)
  73. @echo "Linking $(MODULENAME)-native.exe"
  74. @$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
  75. @echo "Symlinking $(MODULENAME)-win$(winv).exe"
  76. @rm -f $(BINDIR)/$(MODULENAME)-win$(winv).exe
  77. @ln -s $(MODULENAME)-native.exe $(BINDIR)/$(MODULENAME)-win$(winv).exe
  78. $(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32)
  79. -@mkdir -p $(BINDIR)
  80. @echo "Linking $(MODULENAME)-posix32"
  81. @$(CXX) $< $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
  82. $(BINDIR)/$(MODULENAME)-posix64: $(OBJS_posix64) $(LIBS_posix64)
  83. -@mkdir -p $(BINDIR)
  84. @echo "Linking $(MODULENAME)-posix64"
  85. @$(CXX) $< $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
  86. $(BINDIR)/$(MODULENAME)-win32.exe: $(OBJS_win32) $(LIBS_win32)
  87. -@mkdir -p $(BINDIR)
  88. @echo "Linking $(MODULENAME)-win32.exe"
  89. @$(CXX) $< $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
  90. $(BINDIR)/$(MODULENAME)-win64.exe: $(OBJS_win64) $(LIBS_win64)
  91. -@mkdir -p $(BINDIR)
  92. @echo "Linking $(MODULENAME)-win64.exe"
  93. @$(CXX) $< $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
  94. # ----------------------------------------------------------------------------------------------------------------------------
  95. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  96. -@mkdir -p $(OBJDIR)
  97. @echo "Compiling $<"
  98. @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  99. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  100. -@mkdir -p $(OBJDIR)
  101. @echo "Compiling $< (32bit)"
  102. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  103. $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
  104. -@mkdir -p $(OBJDIR)
  105. @echo "Compiling $< (64bit)"
  106. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  107. # ----------------------------------------------------------------------------------------------------------------------------
  108. -include $(OBJS_native:%.o=%.d)
  109. -include $(OBJS_posix32:%.o=%.d)
  110. -include $(OBJS_posix64:%.o=%.d)
  111. -include $(OBJS_win32:%.o=%.d)
  112. -include $(OBJS_win64:%.o=%.d)
  113. # ----------------------------------------------------------------------------------------------------------------------------