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.

123 lines
3.3KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-discovery #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_CXX_FLAGS += -I../backend -I../includes -I../modules -I../utils
  9. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  10. BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST
  11. ifeq ($(CARLA_VESTIGE_HEADER),true)
  12. BUILD_CXX_FLAGS += -DVESTIGE_HEADER
  13. endif
  14. endif
  15. ifeq ($(HAVE_FLUIDSYNTH),true)
  16. NATIVE_FLAGS += $(shell pkg-config --cflags --libs fluidsynth) -DWANT_FLUIDSYNTH
  17. endif
  18. ifeq ($(HAVE_LINUXSAMPLER),true)
  19. NATIVE_FLAGS += $(shell pkg-config --cflags --libs linuxsampler) -DWANT_LINUXSAMPLER
  20. endif
  21. # --------------------------------------------------------------
  22. POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  23. POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  24. POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  25. POSIX_LINK_FLAGS = $(LINK_FLAGS) -ldl
  26. ifeq ($(MACOS),true)
  27. POSIX_32BIT_FLAGS = $(32BIT_FLAGS)
  28. POSIX_64BIT_FLAGS = $(64BIT_FLAGS)
  29. endif
  30. WIN_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  31. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  32. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  33. WIN_LINK_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS) -lole32 -luuid -lws2_32
  34. ifeq ($(HAVE_FLUIDSYNTH),true)
  35. WIN_LINK_FLAGS += -ldsound -lwinmm
  36. endif
  37. ifeq ($(HAVE_LINUXSAMPLER),true)
  38. WIN_LINK_FLAGS += -lrpcrt4
  39. endif
  40. LIBS = ../modules/juce_core.a
  41. LIBS_posix32 = ../modules/juce_core.posix32.a
  42. LIBS_posix64 = ../modules/juce_core.posix64.a
  43. LIBS_win32 = ../modules/juce_core.win32.a
  44. LIBS_win64 = ../modules/juce_core.win64.a
  45. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  46. LIBS += ../modules/lilv.a
  47. LIBS_posix32 += ../modules/lilv.posix32.a
  48. LIBS_posix64 += ../modules/lilv.posix64.a
  49. LIBS_win32 += ../modules/lilv.win32.a
  50. LIBS_win64 += ../modules/lilv.win64.a
  51. endif
  52. OBJS = carla-discovery.cpp
  53. # --------------------------------------------------------------
  54. ifeq ($(WIN32),true)
  55. all: carla-discovery-native.exe
  56. else
  57. all: carla-discovery-native
  58. endif
  59. posix32: carla-discovery-posix32
  60. posix64: carla-discovery-posix64
  61. win32: carla-discovery-win32.exe
  62. win64: carla-discovery-win64.exe
  63. # --------------------------------------------------------------
  64. carla-discovery-native: $(OBJS) $(LIBS)
  65. $(CXX) $^ $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  66. carla-discovery-native.exe: $(OBJS) $(LIBS)
  67. $(CXX) $^ $(WIN_BUILD_FLAGS) $(NATIVE_FLAGS) $(WIN_LINK_FLAGS) -o $@
  68. carla-discovery-posix32: $(OBJS) $(LIBS_posix32)
  69. $(CXX) $^ $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  70. carla-discovery-posix64: $(OBJS) $(LIBS_posix64)
  71. $(CXX) $^ $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  72. carla-discovery-win32.exe: $(OBJS) $(LIBS_win32)
  73. $(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  74. carla-discovery-win64.exe: $(OBJS) $(LIBS_win64)
  75. $(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  76. # --------------------------------------------------------------
  77. clean:
  78. rm -f carla-discovery-*
  79. debug:
  80. $(MAKE) DEBUG=true
  81. # --------------------------------------------------------------
  82. .FORCE:
  83. .PHONY: .FORCE
  84. ../modules/%.a: .FORCE
  85. $(MAKE) -C ../modules $*
  86. ../modules/juce_core.%.a: .FORCE
  87. $(MAKE) -C ../modules juce_core_$*
  88. ../modules/lilv.%.a: .FORCE
  89. $(MAKE) -C ../modules lilv_$*