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.

103 lines
3.3KB

  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 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. # Support for Native Audio (ALSA and/or PulseAudio in Linux)
  15. CARLA_RTAUDIO_SUPPORT = true
  16. # Use the free vestige header instead of the official VST SDK
  17. CARLA_VESTIGE_HEADER = true
  18. # --------------------------------------------------------------
  19. # DO NOT MODIFY PAST THIS POINT!
  20. AR ?= ar
  21. CC ?= gcc
  22. CXX ?= g++
  23. # --------------------------------------------------------------
  24. BASE_FLAGS = -Wall -Wextra -fPIC -DPIC -pipe
  25. BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections
  26. LINK_OPTS = -Wl,--gc-sections
  27. ifeq ($(RASPPI),true)
  28. # Raspberry-Pi optimization flags
  29. BASE_OPTS = -O3 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
  30. LINK_OPTS =
  31. endif
  32. ifeq ($(DEBUG),true)
  33. BASE_FLAGS += -DDEBUG -O0 -g
  34. else
  35. BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
  36. CXXFLAGS += -fvisibility-inlines-hidden
  37. LINK_OPTS += -Wl,--strip-all
  38. endif
  39. 32BIT_FLAGS = -m32
  40. 64BIT_FLAGS = -m64
  41. BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
  42. BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS)
  43. LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
  44. ifeq ($(MACOS),true)
  45. # No C++11 support; force 32bit per default
  46. BUILD_C_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) -std=gnu99 $(CFLAGS)
  47. BUILD_CXX_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) $(CXXFLAGS)
  48. endif
  49. # --------------------------------------------------------------
  50. HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && pkg-config --max-version=1.9 libavcodec && echo true)
  51. HAVE_OPENGL = $(shell pkg-config --exists gl && echo true)
  52. HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
  53. HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
  54. HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true)
  55. HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
  56. HAVE_AF_DEPS = $(shell pkg-config --exists sndfile && echo true)
  57. HAVE_MF_DEPS = $(shell pkg-config --exists smf && echo true)
  58. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true)
  59. HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk ntk_images && echo true)
  60. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  61. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  62. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  63. endif
  64. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  65. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  66. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  67. endif
  68. # --------------------------------------------------------------
  69. # TODO - move this to theme
  70. ifeq ($(HAVE_QT4),true)
  71. MOC ?= $(shell pkg-config --variable=moc_location QtCore)
  72. RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
  73. UIC ?= $(shell pkg-config --variable=uic_location QtCore)
  74. else
  75. MOC ?= moc
  76. RCC ?= rcc
  77. UIC ?= uic
  78. endif
  79. # --------------------------------------------------------------