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.

111 lines
3.2KB

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