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.

94 lines
2.9KB

  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 and VST plugins
  9. CARLA_PLUGIN_SUPPORT = true
  10. # Support for GIG, SF2 and SFZ sample banks (through fluidsynth and linuxsampler)
  11. CARLA_SAMPLERS_SUPPORT = true
  12. # Support for Native Audio (ALSA and/or PulseAudio in Linux)
  13. CARLA_RTAUDIO_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. STRIP ?= strip
  22. # --------------------------------------------------------------
  23. BASE_FLAGS = -Wall -Wextra -fPIC -pipe
  24. BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -mfpmath=sse
  25. ifeq ($(RASPPI),true)
  26. # Raspberry-Pi optimization flags
  27. BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
  28. endif
  29. ifeq ($(DEBUG),true)
  30. BASE_FLAGS += -DDEBUG -O0 -g
  31. else
  32. BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
  33. # BASE_FLAGS += -DCARLA_NO_ASSERTS
  34. endif
  35. 32BIT_FLAGS = -m32
  36. 64BIT_FLAGS = -m64
  37. BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
  38. BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS)
  39. LINK_FLAGS = $(LDFLAGS)
  40. ifeq ($(MACOS),true)
  41. # No C++11 support, force 32bit per default
  42. BUILD_CXX_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) $(CXXFLAGS)
  43. endif
  44. # --------------------------------------------------------------
  45. HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true)
  46. HAVE_OPENGL = $(shell pkg-config --exists gl && echo true)
  47. HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
  48. HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
  49. HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true)
  50. HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
  51. HAVE_AF_DEPS = $(shell pkg-config --exists sndfile && echo true)
  52. HAVE_MF_DEPS = $(shell pkg-config --exists smf && echo true)
  53. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true)
  54. HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk ntk_images && echo true)
  55. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  56. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  57. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  58. endif
  59. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  60. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  61. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  62. endif
  63. # --------------------------------------------------------------
  64. ifeq ($(HAVE_QT4),true)
  65. MOC ?= $(shell pkg-config --variable=moc_location QtCore)
  66. RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
  67. UIC ?= $(shell pkg-config --variable=uic_location QtCore)
  68. else
  69. MOC ?= moc
  70. RCC ?= rcc
  71. UIC ?= uic
  72. endif