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.4KB

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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. ifeq ($(WIN32),true)
  29. LINK_FLAGS += -lole32 -mwindows
  30. endif
  31. 32BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
  32. 64BIT_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_ALTERNATIVE_ARCH
  33. # ----------------------------------------------------------------------------------------------------------------------------
  34. NATIVE_BUILD_FLAGS =
  35. NATIVE_LINK_FLAGS =
  36. ifeq ($(HAVE_FLUIDSYNTH),true)
  37. NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
  38. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  39. endif
  40. # ----------------------------------------------------------------------------------------------------------------------------
  41. LIBS_native = $(MODULEDIR)/lilv.a
  42. LIBS_posix32 = $(MODULEDIR)/lilv.posix32.a
  43. LIBS_posix64 = $(MODULEDIR)/lilv.posix64.a
  44. LIBS_win32 = $(MODULEDIR)/lilv.win32.a
  45. LIBS_win64 = $(MODULEDIR)/lilv.win64.a
  46. LINK_FLAGS += $(LILV_LIBS)
  47. LIBS_native += $(MODULEDIR)/water.files.a
  48. LINK_FLAGS += $(WATER_LIBS)
  49. LINK_FLAGS += $(LIBDL_LIBS)
  50. # ----------------------------------------------------------------------------------------------------------------------------
  51. OBJS_native = $(OBJDIR)/$(MODULENAME).cpp.o
  52. OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
  53. OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
  54. OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
  55. OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
  56. # ----------------------------------------------------------------------------------------------------------------------------
  57. all: native
  58. # ----------------------------------------------------------------------------------------------------------------------------
  59. clean:
  60. rm -f $(OBJDIR)/*.o $(BINDIR)/$(MODULENAME)-*
  61. debug:
  62. $(MAKE) DEBUG=true
  63. # ----------------------------------------------------------------------------------------------------------------------------
  64. native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT)
  65. posix32: $(BINDIR)/$(MODULENAME)-posix32
  66. posix64: $(BINDIR)/$(MODULENAME)-posix64
  67. win32: $(BINDIR)/$(MODULENAME)-win32.exe
  68. win64: $(BINDIR)/$(MODULENAME)-win64.exe
  69. # ----------------------------------------------------------------------------------------------------------------------------
  70. $(BINDIR)/$(MODULENAME)-native: $(OBJS_native) $(LIBS_native)
  71. -@mkdir -p $(BINDIR)
  72. @echo "Linking $(MODULENAME)-native"
  73. @$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
  74. $(BINDIR)/$(MODULENAME)-native.exe: $(OBJS_native) $(LIBS_native)
  75. -@mkdir -p $(BINDIR)
  76. @echo "Linking $(MODULENAME)-native.exe"
  77. @$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
  78. @echo "Symlinking $(MODULENAME)-win$(winv).exe"
  79. @rm -f $(BINDIR)/$(MODULENAME)-win$(winv).exe
  80. @ln -s $(MODULENAME)-native.exe $(BINDIR)/$(MODULENAME)-win$(winv).exe
  81. $(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32)
  82. -@mkdir -p $(BINDIR)
  83. @echo "Linking $(MODULENAME)-posix32"
  84. @$(CXX) $< $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
  85. $(BINDIR)/$(MODULENAME)-posix64: $(OBJS_posix64) $(LIBS_posix64)
  86. -@mkdir -p $(BINDIR)
  87. @echo "Linking $(MODULENAME)-posix64"
  88. @$(CXX) $< $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
  89. $(BINDIR)/$(MODULENAME)-win32.exe: $(OBJS_win32) $(LIBS_win32)
  90. -@mkdir -p $(BINDIR)
  91. @echo "Linking $(MODULENAME)-win32.exe"
  92. @$(CXX) $< $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
  93. $(BINDIR)/$(MODULENAME)-win64.exe: $(OBJS_win64) $(LIBS_win64)
  94. -@mkdir -p $(BINDIR)
  95. @echo "Linking $(MODULENAME)-win64.exe"
  96. @$(CXX) $< $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
  97. # ----------------------------------------------------------------------------------------------------------------------------
  98. $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
  99. -@mkdir -p $(OBJDIR)
  100. @echo "Compiling $<"
  101. @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  102. $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
  103. -@mkdir -p $(OBJDIR)
  104. @echo "Compiling $< (32bit)"
  105. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  106. $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
  107. -@mkdir -p $(OBJDIR)
  108. @echo "Compiling $< (64bit)"
  109. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  110. # ----------------------------------------------------------------------------------------------------------------------------
  111. -include $(OBJS_native:%.o=%.d)
  112. -include $(OBJS_posix32:%.o=%.d)
  113. -include $(OBJS_posix64:%.o=%.d)
  114. -include $(OBJS_win32:%.o=%.d)
  115. -include $(OBJS_win64:%.o=%.d)
  116. # ----------------------------------------------------------------------------------------------------------------------------