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.

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