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.4KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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_OPENGL = $(shell pkg-config --exists gl && echo true)
  38. HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true)
  39. HAVE_AF_DEPS = $(shell pkg-config --exists libavcodec libavformat libavutil sndfile && echo true)
  40. HAVE_MF_DEPS = $(shell pkg-config --exists smf && echo true)
  41. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true)
  42. HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk ntk_images && echo true)
  43. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  44. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  45. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  46. endif
  47. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  48. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  49. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  50. endif
  51. ifneq ($(HAVE_QT4),true)
  52. HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
  53. endif
  54. # --------------------------------------------------------------
  55. ifeq ($(HAVE_QT5),true)
  56. # Qt5 doesn't define these
  57. MOC ?= moc
  58. RCC ?= rcc
  59. UIC ?= uic
  60. else
  61. MOC ?= $(shell pkg-config --variable=moc_location QtCore)
  62. RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
  63. UIC ?= $(shell pkg-config --variable=uic_location QtCore)
  64. endif