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.

Makefile.mk 2.7KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #!/usr/bin/make -f
  2. # Makefile for Carla C++ code #
  3. # --------------------------- #
  4. # Created by falkTX
  5. #
  6. AR ?= ar
  7. CC ?= gcc
  8. CXX ?= g++
  9. STRIP ?= strip
  10. # --------------------------------------------------------------
  11. DEBUG ?= false
  12. BASE_FLAGS = -Wall -Wextra -fPIC
  13. ifeq ($(DEBUG),true)
  14. BASE_FLAGS += -O0 -g
  15. BASE_FLAGS += -DDEBUG
  16. STRIP = true # FIXME
  17. else
  18. BASE_FLAGS += -O2 -ffast-math -mtune=generic -msse -mfpmath=sse
  19. BASE_FLAGS += -DNDEBUG
  20. endif
  21. 32BIT_FLAGS = -m32
  22. 64BIT_FLAGS = -m64
  23. BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
  24. BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS)
  25. LINK_FLAGS = $(LDFLAGS)
  26. # --------------------------------------------------------------
  27. # Modify to enable/disable specific features
  28. # Support for LADSPA, DSSI, LV2 and VST plugins
  29. CARLA_PLUGIN_SUPPORT = true
  30. # Support for GIG, SF2 and SFZ sample banks (through fluidsynth and linuxsampler)
  31. CARLA_SAMPLERS_SUPPORT = true
  32. # Support for Native Audio (ALSA and/or PulseAudio in Linux)
  33. CARLA_RTAUDIO_SUPPORT = false
  34. # Comment this line to not use vestige header
  35. BUILD_CXX_FLAGS += -DVESTIGE_HEADER
  36. # --------------------------------------------------------------
  37. HAVE_JACK = $(shell pkg-config --exists jack && echo true)
  38. HAVE_OPENGL = $(shell pkg-config --exists gl && echo true)
  39. HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true)
  40. HAVE_AF_DEPS = $(shell pkg-config --exists libavcodec libavformat libavutil sndfile && echo true)
  41. HAVE_MF_DEPS = $(shell pkg-config --exists smf && echo true)
  42. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true)
  43. HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk ntk_images && echo true)
  44. ifeq ($(HAVE_JACK),true)
  45. HAVE_JACK_LATENCY = $(shell pkg-config --atleast-version=0.121.0 jack && echo true)
  46. HAVE_JACK2 = $(shell pkg-config --atleast-version=1.9.0 jack && echo true)
  47. endif
  48. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  49. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  50. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  51. endif
  52. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  53. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  54. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  55. endif
  56. ifneq ($(HAVE_QT4),true)
  57. HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
  58. endif
  59. # --------------------------------------------------------------
  60. ifeq ($(HAVE_QT5),true)
  61. # Qt5 doesn't define these
  62. MOC ?= moc
  63. RCC ?= rcc
  64. UIC ?= uic
  65. else
  66. MOC ?= $(shell pkg-config --variable=moc_location QtCore)
  67. RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
  68. UIC ?= $(shell pkg-config --variable=uic_location QtCore)
  69. endif