Debian Codegraph @

Makefile

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 PREFIX ?= /usr/local
2 bindir ?= $(PREFIX)/bin
3 libdir ?= $(PREFIX)/lib
4
5 #FIX locally. Line below removed from dsp file.
6 #effect.bypass2(checkbox("[6] bypass"), compressor)
7
8 # These two commands are used by me, since most of the source files are stored in the Radium tree.
9 # You would normally just run "make" to compile the program.
10 #
11 # make copy_files && make all && ./radium_compressor
12 # make copy_files && rm -f benchmark && make benchmark && ./benchmark && ./benchmark && ./benchmark
13
14 OPT = -O3 -ffast-math
15 OPT_DSP = -O3 -ffast-math -Wno-strict-aliasing
16 #-funroll-loops
•17 CPP = g++ -DDEBUG -Wall -DUSE_QT_REQTYPE -DUSE_QT4 -g -I. -IQt -fPIC -Wno-class-memaccess $(CXXFLAGS) $(CPPFLAGS)
18 # -fpredictive-commoning -ftree-vectorize
19 # -funroll-loops -fira-loop-pressure -fipa-cp-clone -ftree-loop-distribute-patterns
20
21 #-finline-functions
22
23 #FAUST = /home/kjetil/faudiostream/compiler/faust -vec
24 FAUST = faust -vec
25
26 # only used for copy files
27 RADIUM_PATH = /home/kjetil/radium-qt4
28
29 all: system_compressor_wrapper.o myladspa.o
30 cd Qt && ./create_source_from_ui.sh `../find_moc_and_uic_paths.sh uic` `../find_moc_and_uic_paths.sh moc` compressor_widget
31 $(CPP) Qt/Qt_SliderPainter.cpp `pkg-config --cflags Qt5Widgets` -c $(OPT)
•32 $(CPP) $(LDFLAGS) main.cpp Qt_SliderPainter.o system_compressor_wrapper.o myladspa.o -DCOMPILING_STANDALONE -Iaudio/faudiostream/architecture/ `pkg-config --cflags Qt5Widgets --libs Qt5Core --libs Qt5Widgets` `pkg-config --cflags --libs liblo` -ljack -o radium_compressor $(OPT)
33 # /usr/lib64/libprofiler.so.0
34 # make copy_files && make all && CPUPROFILE=ls.prof ./radium_compressor
35
36 clean:
37 rm -f *.o
38
39 install:
40 install -d $(DESTDIR)$(bindir)
41 cp radium_compressor $(DESTDIR)$(bindir)/
42
43
44 uninstall:
45 rm -f $(DESTDIR)$(bindir)/radium_compressor
46
47 # ladpa plugin
48 radium_compressor.so: audio/system_compressor.cpp myladspa.o system_compressor_wrapper_ladspa.o
49 $(CPP) Qt/Qt_SliderPainter.cpp `pkg-config --cflags Qt5Widgets` -c -fPIC $(OPT)
50 $(CPP) -DCOMPILING_LADSPA main.cpp -Iaudio/faudiostream/architecture/ `pkg-config --libs --cflags Qt5Widgets` -c -fPIC $(OPT)
51 $(CPP) `pkg-config --libs Qt5Widgets` myladspa.o system_compressor_wrapper_ladspa.o -shared -fPIC -o radium_compressor.so
52
53 system_compressor_wrapper.o: audio/system_compressor_wrapper.cpp audio/system_compressor.cpp
54 $(CPP) -Ifaudiostream/architecture `pkg-config --cflags Qt5Core` -DCOMPILING_STANDALONE audio/system_compressor_wrapper.cpp -c -fPIC $(OPT_DSP)
55
56 system_compressor_wrapper_ladspa.o: audio/system_compressor_wrapper.cpp audio/system_compressor.cpp
57 $(CPP) -Ifaudiostream/architecture `pkg-config --cflags Qt5Core` -DCOMPILING_LADSPA audio/system_compressor_wrapper.cpp -c -fPIC -o system_compressor_wrapper_ladspa.o $(OPT_DSP)
58
59 myladspa.o: myladspa.cpp audio/system_compressor.cpp
60 $(CPP) -DCOMPILING_LADSPA -Ifaudiostream/architecture `pkg-config --cflags Qt5Core` myladspa.cpp -fPIC -c $(OPT_DSP)
61
62 audio/system_compressor.cpp: audio/system_compressor.dsp standalone_compressor.dsp
63 cp standalone_compressor.dsp audio/
64 $(FAUST) -cn Faust_system_compressor audio/standalone_compressor.dsp >audio/system_compressor.cpp
65
66 #audio/system_compressor_ladspa.cpp: audio/system_compressor.dsp standalone_compressor.dsp
67 # cp standalone_compressor.dsp audio/
68 # $(FAUST) -cn Faust_system_compressor -a myladspa.cpp audio/standalone_compressor.dsp >audio/system_compressor_ladspa.cpp
69
70
71 copy_files:
72 cp $(RADIUM_PATH)/Qt/qt4_compressor_widget.ui Qt/
73 cp $(RADIUM_PATH)/Qt/compressor_vertical_sliders.cpp Qt/
74 cp $(RADIUM_PATH)/Qt/Qt_compressor_widget_callbacks.h Qt/
75 cp $(RADIUM_PATH)/Qt/Qt_MyQCheckBox.h Qt/
76 cp $(RADIUM_PATH)/Qt/Qt_MyQButton.h Qt/
77 cp $(RADIUM_PATH)/Qt/Qt_MyQSlider.* Qt/
78 cp $(RADIUM_PATH)/Qt/Qt_SliderPainter* Qt/
79 cp $(RADIUM_PATH)/Qt/create_source_from_ui.sh Qt/
80 cp $(RADIUM_PATH)/Qt/EditorWidget.h Qt/
81 cp $(RADIUM_PATH)/Qt/OS_Visual.h Qt/
82 cp $(RADIUM_PATH)/Qt/Qt_ReqType.h Qt/
83 cp $(RADIUM_PATH)/Qt/Qt_instruments_proc.h Qt/
84
85 cp $(RADIUM_PATH)/audio/system_compressor.dsp audio/
86 cp $(RADIUM_PATH)/audio/fast_log_exp.dsp audio/
87 cp $(RADIUM_PATH)/audio/system_compressor_wrapper_proc.h audio/
88 cp $(RADIUM_PATH)/audio/system_compressor_wrapper.cpp audio/
89 cp $(RADIUM_PATH)/audio/typepunning.h audio/
90 cp $(RADIUM_PATH)/audio/undo_audio_effect_proc.h audio/
91 cp $(RADIUM_PATH)/audio/SoundPlugin.h audio/
92 cp $(RADIUM_PATH)/audio/SoundPlugin_proc.h audio/
93 cp $(RADIUM_PATH)/audio/Smooth_proc.h audio/
94
95 cp $(RADIUM_PATH)/common/nsmtracker.h common/
96 cp $(RADIUM_PATH)/common/debug_proc.h common/
97 cp $(RADIUM_PATH)/common/memory_proc.h common/
98 cp $(RADIUM_PATH)/common/nsmtracker_events.h common/
99 cp $(RADIUM_PATH)/common/keyboard_sub_ids.h common/
100 cp $(RADIUM_PATH)/common/OS_error_proc.h common/
101 cp $(RADIUM_PATH)/common/OS_Semaphores.h common/
102 cp $(RADIUM_PATH)/common/mouse.h common/
103 cp $(RADIUM_PATH)/common/windows_proc.h common/
104 cp $(RADIUM_PATH)/common/visual_proc.h common/
105 cp $(RADIUM_PATH)/common/OS_visual_input.h common/
106 cp $(RADIUM_PATH)/common/visual_op_queue_proc.h common/
107 cp $(RADIUM_PATH)/common/undo_patchvoice_proc.h common/
108 cp $(RADIUM_PATH)/common/instruments_proc.h common/
109 cp $(RADIUM_PATH)/common/vector_proc.h common/
110 cp $(RADIUM_PATH)/common/settings_proc.h common/
111 cp $(RADIUM_PATH)/common/hashmap_proc.h common/
112
113 cp $(RADIUM_PATH)/find_moc_and_uic_paths.sh .
114 cp -a $(RADIUM_PATH)/audio/faudiostream audio/
115
116
117 # Note that 0.9.55 runs the benchmark program a bit faster than 0.9.46.
118 # I guess it's because of more min/max functions in 0.9.55, but it could also
119 # be because of some castings.
120 benchmark:
121 $(FAUST) -a bench.cpp audio/system_compressor.dsp >compressor_benchmark.cpp
122 $(CPP) benchmark.cpp -Iaudio -o benchmark -lpthread $(OPT_DSP)
123
124 # original db2linear/linear2db: 60 MB/s
125 # fast pow2/log: 420 MB/s
126 # faster pow2/log: 530 MB/s
127 # lookup table: 420 MB/s
128 # no db<->linear conversion: 610 MB/s
129
130 # Relative accuracy of faster pow2 / faster log: 0.0152579 / 0.0130367
131 # Relative accuracy of fast pow2 / fast log: 1.58868e-05 / 2.09348e-05
132
133 #/home/kjetil/faudiostream/compiler/faust -a ladspa.cpp system_compressor.dsp >ladspa_compressor.cpp
134 #g++ ladspa_compressor.cpp -I /home/kjetil/faudiostream/architecture/ -shared -fPIC -o ladspa_compressor.so
135
136 VSTPATH = /home/kjetil/Dropbox/radium_build/vstsdk2.4
137 vst:
138 $(FAUST) audio/standalone_compressor.dsp >compressor_vst.cpp
139 $(CPP) Qt/Qt_SliderPainter.cpp `pkg-config --cflags Qt5Widgets` -c -fPIC
140 $(CPP) -DCOMPILING_VST main.cpp -Iaudio/faudiostream/architecture/ `pkg-config --libs --cflags Qt5Widgets` -c -fPIC
141 $(CPP) -I $(VSTPATH)/public.sdk/source/vst2.x/ -I $(VSTPATH)/pluginterfaces/vst2.x/ -I $(VSTPATH) `pkg-config --cflags Qt5Widgets` `pkg-config --libs Qt5Widgets` vstplugin.cpp -Iaudio $(VSTPATH)/public.sdk/source/vst2.x/audioeffectx.cpp $(VSTPATH)/public.sdk/source/vst2.x/audioeffect.cpp $(VSTPATH)/public.sdk/source/vst2.x/vstplugmain.cpp main.o Qt_SliderPainter.o -shared -o radium_compressor.so -fPIC
142