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

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