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 4.5KB

10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #!/usr/bin/make -f
  2. # Makefile for carla tests #
  3. # ------------------------ #
  4. # Created by falkTX
  5. #
  6. # --------------------------------------------------------------
  7. BASE_FLAGS = -Wall -Wextra -Werror -fPIC -DPIC -pipe -DREAL_BUILD
  8. BASE_FLAGS += -Wcast-qual -Wconversion -Wlogical-op
  9. BASE_FLAGS += -Wsign-conversion -Wuninitialized -Wunused-parameter
  10. BASE_FLAGS += -DDEBUG -O0 -g
  11. BASE_FLAGS += -I. -I../backend -I../includes -I../utils
  12. BASE_FLAGS += -isystem ../modules
  13. # --------------------------------------------------------------
  14. ANSI_FLAGS = $(BASE_FLAGS) -DBUILD_ANSI_TEST
  15. ANSI_FLAGS += -ansi -pedantic -pedantic-errors -Waggregate-return
  16. ANSI_FLAGS += -I../backend -I../includes
  17. ANSI_FLAGS += -L../backend -lcarla_standalone2
  18. # --------------------------------------------------------------
  19. GNU_CXX_FLAGS = $(BASE_FLAGS)
  20. GNU_CXX_FLAGS += -std=c++11 -std=gnu++11 -Wzero-as-null-pointer-constant
  21. # --------------------------------------------------------------
  22. PEDANTIC_CXX_FLAGS = $(BASE_FLAGS)
  23. PEDANTIC_CXX_FLAGS += -std=c++11 -pedantic -pedantic-errors -Wzero-as-null-pointer-constant -Wno-vla
  24. PEDANTIC_CXX_FLAGS += -isystem /opt/kxstudio/include
  25. # --------------------------------------------------------------
  26. TARGETS = ansi-pedantic-test_c ansi-pedantic-test_c99 ansi-pedantic-test_cxx ansi-pedantic-test_cxx11
  27. TARGETS += CarlaString EngineEvents PipeServer Print RtLinkedList RtLinkedListGnu Utils
  28. all: $(TARGETS)
  29. # --------------------------------------------------------------
  30. ansi-pedantic-test_c: ansi-pedantic-test.c ../backend/Carla*.h
  31. $(CC) $< $(ANSI_FLAGS) -Wc++-compat -o $@
  32. ansi-pedantic-test_c99: ansi-pedantic-test.c ../backend/Carla*.h
  33. $(CC) $< $(ANSI_FLAGS) -std=c99 -Wc++-compat -o $@
  34. ansi-pedantic-test_cxx: ansi-pedantic-test.c ../backend/Carla*.h
  35. $(CXX) $< $(ANSI_FLAGS) -o $@
  36. ansi-pedantic-test_cxx11: ansi-pedantic-test.c ../backend/Carla*.h
  37. $(CXX) $< $(ANSI_FLAGS) -std=c++11 -Wzero-as-null-pointer-constant -o $@
  38. # --------------------------------------------------------------
  39. CarlaString: CarlaString.cpp ../utils/CarlaString.hpp
  40. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  41. valgrind ./$@
  42. Engine: Engine.cpp
  43. $(CXX) $< \
  44. ../backend/standalone/CarlaStandalone.cpp.o \
  45. -Wl,--start-group \
  46. ../backend/carla_engine.a ../backend/carla_plugin.a ../modules/daz-plugins.a \
  47. ../modules/dgl.a ../modules/jackbridge.a ../modules/lilv.a ../modules/rtmempool.a ../modules/rtaudio.a ../modules/rtmidi.a \
  48. -Wl,--end-group \
  49. $(PEDANTIC_CXX_FLAGS) $(shell pkg-config --libs alsa libpulse-simple liblo QtCore QtXml fluidsynth linuxsampler x11 gl smf fftw3 mxml zlib ntk_images ntk) -o $@
  50. env LD_LIBRARY_PATH=../backend valgrind --leak-check=full ./$@
  51. # ../modules/juce_audio_basics.a ../modules/juce_core.a \
  52. EngineEvents: EngineEvents.cpp
  53. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -L../backend -lcarla_standalone2 -o $@
  54. env LD_LIBRARY_PATH=../backend valgrind ./$@
  55. PipeServer: PipeServer.cpp ../utils/CarlaPipeUtils.hpp
  56. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  57. # valgrind ./$@
  58. Print: Print.cpp ../utils/CarlaUtils.hpp
  59. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  60. valgrind ./$@
  61. RtLinkedList: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  62. $(CXX) $< ../modules/rtmempool.a $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  63. valgrind ./$@
  64. RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  65. $(CXX) $< ../modules/rtmempool.a $(GNU_CXX_FLAGS) -lpthread -o $@
  66. valgrind ./$@
  67. Utils: Utils.cpp ../utils/*.hpp
  68. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -ldl -lpthread -o $@
  69. valgrind ./$@
  70. # --------------------------------------------------------------
  71. ../modules/%.a:
  72. $(MAKE) -C ../modules $*
  73. # --------------------------------------------------------------
  74. clean:
  75. rm -f *.o $(TARGETS)
  76. debug:
  77. $(MAKE) DEBUG=true
  78. # --------------------------------------------------------------
  79. DISTRHO: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  80. $(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/daz-plugins/nekobi $(LINK_FLAGS) $(DGL_LIBS) -lpthread -o $@
  81. ./DISTRHO
  82. DISTRHO.so: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  83. $(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/daz-plugins/nekobi -DSHARED_DLL $(LINK_FLAGS) $(DGL_LIBS) -lpthread -shared -Wl,--no-undefined -o $@
  84. DGL: DGL.cpp ../modules/distrho/dgl/src/Window.cpp
  85. $(CXX) $< $(PEDANTIC_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) -o $@
  86. # ./DGL
  87. # valgrind ./DGL
  88. # --------------------------------------------------------------