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.

105 lines
3.0KB

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