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.

95 lines
3.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for Carla C++ code #
  3. # --------------------------- #
  4. # Created by falkTX
  5. #
  6. # --------------------------------------------------------------
  7. # Modify to enable/disable specific features
  8. # Support for LADSPA, DSSI, LV2, VST and AU plugins
  9. CARLA_PLUGIN_SUPPORT = true
  10. # Support for csound files (version 6)
  11. CARLA_CSOUND_SUPPORT = true
  12. # Support for GIG, SF2 and SFZ sample banks (through fluidsynth and linuxsampler)
  13. CARLA_SAMPLERS_SUPPORT = true
  14. # Use the free vestige header instead of the official VST SDK
  15. CARLA_VESTIGE_HEADER = true
  16. # --------------------------------------------------------------
  17. # DO NOT MODIFY PAST THIS POINT!
  18. AR ?= ar
  19. CC ?= gcc
  20. CXX ?= g++
  21. MOC ?= moc
  22. RCC ?= rcc
  23. UIC ?= uic
  24. # --------------------------------------------------------------
  25. BASE_FLAGS = -Wall -Wextra -fPIC -DPIC -pipe
  26. BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections
  27. LINK_OPTS = -Wl,--gc-sections
  28. ifeq ($(RASPPI),true)
  29. # Raspberry-Pi optimization flags
  30. BASE_OPTS = -O3 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
  31. LINK_OPTS =
  32. endif
  33. ifeq ($(DEBUG),true)
  34. BASE_FLAGS += -DDEBUG -O0 -g
  35. LINK_OPTS =
  36. else
  37. BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
  38. CXXFLAGS += -fvisibility-inlines-hidden
  39. LINK_OPTS += -Wl,--strip-all
  40. endif
  41. 32BIT_FLAGS = -m32
  42. 64BIT_FLAGS = -m64
  43. BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
  44. BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS)
  45. LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS)
  46. ifeq ($(MACOS),true)
  47. # No C++11 support; force 32bit per default
  48. BUILD_C_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) -std=gnu99 $(CFLAGS)
  49. BUILD_CXX_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) $(CXXFLAGS)
  50. LINK_FLAGS = $(32BIT_FLAGS) $(LDFLAGS)
  51. endif
  52. # --------------------------------------------------------------
  53. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  54. HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && pkg-config --max-version=1.9 libavcodec && echo true)
  55. HAVE_OPENGL = $(shell pkg-config --exists gl && echo true)
  56. HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
  57. HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
  58. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  59. HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true)
  60. HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
  61. HAVE_AF_DEPS = $(shell pkg-config --exists sndfile && echo true)
  62. HAVE_MF_DEPS = $(shell pkg-config --exists smf && echo true)
  63. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true)
  64. HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk ntk_images && echo true)
  65. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  66. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  67. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  68. endif
  69. ifeq ($(HAVE_QT4),true)
  70. MOC_QT4 ?= $(shell pkg-config --variable=moc_location QtCore)
  71. RCC_QT4 ?= $(shell pkg-config --variable=rcc_location QtCore)
  72. UIC_QT4 ?= $(shell pkg-config --variable=uic_location QtCore)
  73. endif
  74. # --------------------------------------------------------------