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.

79 lines
2.5KB

  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. MOC ?= $(shell pkg-config --variable=moc_location QtCore)
  10. RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
  11. UIC ?= $(shell pkg-config --variable=uic_location QtCore)
  12. STRIP ?= strip
  13. WINDRES ?= windres
  14. # --------------------------------------------------------------
  15. DEBUG ?= false
  16. ifeq ($(DEBUG),true)
  17. BASE_FLAGS = -O0 -g
  18. BASE_FLAGS += -DDEBUG
  19. STRIP = true # FIXME
  20. else
  21. BASE_FLAGS = -O2 -ffast-math -mtune=generic -msse -mfpmath=sse
  22. BASE_FLAGS += -DNDEBUG
  23. endif
  24. BASE_FLAGS += -ansi -pedantic -pedantic-errors -Wall -Wextra -Wformat=2 -Wunused-parameter -Wuninitialized
  25. BASE_FLAGS += -Wcast-qual -Wconversion -Wsign-conversion -Wlogical-op -Waggregate-return
  26. BASE_FLAGS += -fipa-pure-const -Wsuggest-attribute=noreturn #pure,const,noreturn
  27. BASE_FLAGS += -Wno-vla -isystem /usr/include/qt4/
  28. 32BIT_FLAGS = -m32
  29. 64BIT_FLAGS = -m64
  30. BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -Wc++-compat -Wunsuffixed-float-constants -Wwrite-strings $(CFLAGS)
  31. BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x $(CXXFLAGS)
  32. LINK_FLAGS = $(LDFLAGS)
  33. BUILD_CXX_FLAGS += -Wzero-as-null-pointer-constant
  34. ifneq ($(DEBUG),true)
  35. BUILD_CXX_FLAGS += -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM -DQT_NO_DEBUG_OUTPUT
  36. endif
  37. # --------------------------------------------------------------
  38. # Modify to enable/disable specific features
  39. # Support for LADSPA, DSSI, LV2 and VST plugins
  40. CARLA_PLUGIN_SUPPORT = true
  41. # Support for GIG, SF2 and SFZ sample banks (through fluidsynth and linuxsampler)
  42. CARLA_SAMPLERS_SUPPORT = true
  43. # Support for Native Audio (ALSA and/or PulseAudio in Linux)
  44. CARLA_RTAUDIO_SUPPORT = true
  45. # Comment this line to not use vestige header
  46. BUILD_CXX_FLAGS += -DVESTIGE_HEADER
  47. # --------------------------------------------------------------
  48. HAVE_JACK = $(shell pkg-config --exists jack && echo true)
  49. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml && echo true)
  50. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  51. HAVE_SUIL = $(shell pkg-config --exists suil-0 && echo true)
  52. endif
  53. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  54. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  55. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  56. endif
  57. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  58. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  59. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  60. endif