forked from breakfastquay/rubberband
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.osx
261 lines (225 loc) · 10.7 KB
/
Makefile.osx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
PREFIX := /usr/local
CXX := clang++ -stdlib=libc++
CC := clang
ARCHFLAGS := -arch x86_64 -mmacosx-version-min=10.7
OPTFLAGS := -DNDEBUG -ffast-math -mfpmath=sse -msse -msse2 -O3 -ftree-vectorize
CXXFLAGS := $(ARCHFLAGS) $(OPTFLAGS) -I. -Isrc -Irubberband -I/usr/local/include -DUSE_PTHREADS -DMALLOC_IS_ALIGNED -DHAVE_VDSP -DUSE_SPEEX -DNO_THREAD_CHECKS -DNO_TIMING
CFLAGS := $(ARCHFLAGS) $(OPTFLAGS)
LDFLAGS := $(ARCHFLAGS) -lpthread $(LDFLAGS)
LIBRARY_LIBS := -framework Accelerate
PROGRAM_LIBS := -L$(PREFIX)/lib -lsndfile $(LIBRARY_LIBS)
VAMP_PLUGIN_LIBS := -L$(PREFIX)/lib -lvamp-sdk $(LIBRARY_LIBS)
LADSPA_PLUGIN_LIBS := $(LIBRARY_LIBS)
MKDIR := mkdir
AR := ar
INSTALL_BINDIR := $(PREFIX)/bin
INSTALL_INCDIR := $(PREFIX)/include/rubberband
INSTALL_LIBDIR := $(PREFIX)/lib
INSTALL_VAMPDIR := $(PREFIX)/lib/vamp
INSTALL_LADSPADIR := $(PREFIX)/lib/ladspa
INSTALL_LRDFDIR := $(PREFIX)/share/ladspa/rdf
INSTALL_PKGDIR := $(PREFIX)/lib/pkgconfig
LIBNAME := librubberband
DYNAMIC_EXTENSION := .dylib
DYNAMIC_FULL_VERSION := 2.1.1
DYNAMIC_ABI_VERSION := 2
DYNAMIC_LDFLAGS := -dynamiclib -install_name $(INSTALL_LIBDIR)/$(LIBNAME).$(DYNAMIC_ABI_VERSION)$(DYNAMIC_EXTENSION) -current_version $(DYNAMIC_FULL_VERSION) -compatibility_version $(DYNAMIC_ABI_VERSION)
PROGRAM_TARGET := bin/rubberband
STATIC_TARGET := lib/$(LIBNAME).a
DYNAMIC_TARGET := lib/$(LIBNAME)$(DYNAMIC_EXTENSION)
VAMP_TARGET := lib/vamp-rubberband$(DYNAMIC_EXTENSION)
LADSPA_TARGET := lib/ladspa-rubberband$(DYNAMIC_EXTENSION)
default: bin lib $(STATIC_TARGET) $(DYNAMIC_TARGET) $(PROGRAM_TARGET)
all: bin lib $(STATIC_TARGET) $(DYNAMIC_TARGET) $(PROGRAM_TARGET) $(VAMP_TARGET) $(LADSPA_TARGET)
static: $(STATIC_TARGET)
dynamic: $(DYNAMIC_TARGET)
library: $(STATIC_TARGET) $(DYNAMIC_TARGET)
program: $(PROGRAM_TARGET)
vamp: $(VAMP_TARGET)
ladspa: $(LADSPA_TARGET)
PUBLIC_INCLUDES := \
rubberband/rubberband-c.h \
rubberband/RubberBandStretcher.h
LIBRARY_INCLUDES := \
src/StretcherChannelData.h \
src/float_cast/float_cast.h \
src/StretcherImpl.h \
src/StretchCalculator.h \
src/base/Profiler.h \
src/base/RingBuffer.h \
src/base/Scavenger.h \
src/dsp/AudioCurveCalculator.h \
src/audiocurves/CompoundAudioCurve.h \
src/audiocurves/ConstantAudioCurve.h \
src/audiocurves/HighFrequencyAudioCurve.h \
src/audiocurves/PercussiveAudioCurve.h \
src/audiocurves/SilentAudioCurve.h \
src/audiocurves/SpectralDifferenceAudioCurve.h \
src/dsp/Resampler.h \
src/dsp/FFT.h \
src/dsp/MovingMedian.h \
src/dsp/SincWindow.h \
src/dsp/Window.h \
src/system/Allocators.h \
src/system/Thread.h \
src/system/VectorOps.h \
src/system/VectorOpsComplex.h \
src/system/sysutils.h
LIBRARY_SOURCES := \
src/rubberband-c.cpp \
src/RubberBandStretcher.cpp \
src/StretcherProcess.cpp \
src/StretchCalculator.cpp \
src/base/Profiler.cpp \
src/dsp/AudioCurveCalculator.cpp \
src/audiocurves/CompoundAudioCurve.cpp \
src/audiocurves/SpectralDifferenceAudioCurve.cpp \
src/audiocurves/HighFrequencyAudioCurve.cpp \
src/audiocurves/SilentAudioCurve.cpp \
src/audiocurves/ConstantAudioCurve.cpp \
src/audiocurves/PercussiveAudioCurve.cpp \
src/dsp/Resampler.cpp \
src/dsp/FFT.cpp \
src/system/Allocators.cpp \
src/system/sysutils.cpp \
src/system/Thread.cpp \
src/system/VectorOpsComplex.cpp \
src/StretcherChannelData.cpp \
src/StretcherImpl.cpp
# For Speex resampler -- comment these lines out if not specifying USE_SPEEX
LIBRARY_INCLUDES := $(LIBRARY_INCLUDES) \
src/speex/speex_resampler.h
LIBRARY_SOURCES := $(LIBRARY_SOURCES) \
src/speex/resample.c
PROGRAM_SOURCES := \
main/main.cpp
VAMP_HEADERS := \
vamp/RubberBandVampPlugin.h
VAMP_SOURCES := \
vamp/RubberBandVampPlugin.cpp \
vamp/libmain.cpp
LADSPA_HEADERS := \
ladspa/RubberBandPitchShifter.h
LADSPA_SOURCES := \
ladspa/RubberBandPitchShifter.cpp \
ladspa/libmain.cpp
LIBRARY_OBJECTS := $(LIBRARY_SOURCES:.cpp=.o)
LIBRARY_OBJECTS := $(LIBRARY_OBJECTS:.c=.o)
PROGRAM_OBJECTS := $(PROGRAM_SOURCES:.cpp=.o)
VAMP_OBJECTS := $(VAMP_SOURCES:.cpp=.o)
LADSPA_OBJECTS := $(LADSPA_SOURCES:.cpp=.o)
$(PROGRAM_TARGET): $(LIBRARY_OBJECTS) $(PROGRAM_OBJECTS)
$(CXX) -o $@ $^ $(PROGRAM_LIBS) $(LDFLAGS)
$(STATIC_TARGET): $(LIBRARY_OBJECTS)
rm -f $@
$(AR) rsc $@ $^
$(DYNAMIC_TARGET): $(LIBRARY_OBJECTS)
$(CXX) $(DYNAMIC_LDFLAGS) $^ -o $@ $(LIBRARY_LIBS) $(LDFLAGS)
$(VAMP_TARGET): $(LIBRARY_OBJECTS) $(VAMP_OBJECTS)
$(CXX) $(VAMP_LDFLAGS) -o $@ $^ $(VAMP_PLUGIN_LIBS) $(LDFLAGS)
$(LADSPA_TARGET): $(LIBRARY_OBJECTS) $(LADSPA_OBJECTS)
$(CXX) $(LADSPA_LDFLAGS) -o $@ $^ $(LADSPA_PLUGIN_LIBS) $(LDFLAGS)
bin:
$(MKDIR) $@
lib:
$(MKDIR) $@
install: default
$(MKDIR) -p $(DESTDIR)$(INSTALL_BINDIR)
$(MKDIR) -p $(DESTDIR)$(INSTALL_INCDIR)
$(MKDIR) -p $(DESTDIR)$(INSTALL_LIBDIR)
$(MKDIR) -p $(DESTDIR)$(INSTALL_VAMPDIR)
$(MKDIR) -p $(DESTDIR)$(INSTALL_LADSPADIR)
$(MKDIR) -p $(DESTDIR)$(INSTALL_LRDFDIR)
$(MKDIR) -p $(DESTDIR)$(INSTALL_PKGDIR)
cp $(PROGRAM_TARGET) $(DESTDIR)$(INSTALL_BINDIR)
cp $(PUBLIC_INCLUDES) $(DESTDIR)$(INSTALL_INCDIR)
cp $(STATIC_TARGET) $(DESTDIR)$(INSTALL_LIBDIR)
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME).$(DYNAMIC_ABI_VERSION)$(DYNAMIC_EXTENSION)
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)$(DYNAMIC_EXTENSION)
cp $(DYNAMIC_TARGET) $(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME).$(DYNAMIC_FULL_VERSION)$(DYNAMIC_EXTENSION)
ln -s $(LIBNAME).$(DYNAMIC_FULL_VERSION)$(DYNAMIC_EXTENSION) $(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME).$(DYNAMIC_ABI_VERSION)$(DYNAMIC_EXTENSION)
ln -s $(LIBNAME).$(DYNAMIC_FULL_VERSION)$(DYNAMIC_EXTENSION) $(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)$(DYNAMIC_EXTENSION)
cp $(VAMP_TARGET) $(DESTDIR)$(INSTALL_VAMPDIR)
cp vamp/vamp-rubberband.cat $(DESTDIR)$(INSTALL_VAMPDIR)
cp $(LADSPA_TARGET) $(DESTDIR)$(INSTALL_LADSPADIR)
cp ladspa/ladspa-rubberband.cat $(DESTDIR)$(INSTALL_LADSPADIR)
cp ladspa/ladspa-rubberband.rdf $(DESTDIR)$(INSTALL_LRDFDIR)
sed "s,%PREFIX%,$(PREFIX)," rubberband.pc.in \
> $(DESTDIR)$(INSTALL_PKGDIR)/rubberband.pc
clean:
rm -f $(LIBRARY_OBJECTS) $(PROGRAM_OBJECTS) $(LADSPA_OBJECTS) $(VAMP_OBJECTS)
distclean: clean
rm -f $(PROGRAM_TARGET) $(STATIC_TARGET) $(DYNAMIC_TARGET) $(VAMP_TARGET) $(LADSPA_TARGET)
depend:
makedepend -f Makefile.osx -Y $(LIBRARY_SOURCES) $(PROGRAM_SOURCES)
# DO NOT DELETE
src/rubberband-c.o: rubberband/rubberband-c.h
src/rubberband-c.o: rubberband/RubberBandStretcher.h
src/RubberBandStretcher.o: src/StretcherImpl.h
src/RubberBandStretcher.o: rubberband/RubberBandStretcher.h src/dsp/Window.h
src/RubberBandStretcher.o: src/dsp/FFT.h src/base/RingBuffer.h
src/RubberBandStretcher.o: src/base/Scavenger.h src/system/Thread.h
src/RubberBandStretcher.o: src/system/Thread.h src/system/sysutils.h
src/StretcherProcess.o: src/StretcherImpl.h rubberband/RubberBandStretcher.h
src/StretcherProcess.o: src/dsp/Window.h src/dsp/FFT.h src/base/RingBuffer.h
src/StretcherProcess.o: src/base/Scavenger.h src/system/Thread.h
src/StretcherProcess.o: src/system/Thread.h src/system/sysutils.h
src/StretcherProcess.o: src/audiocurves/PercussiveAudioCurve.h
src/StretcherProcess.o: src/dsp/AudioCurveCalculator.h
src/StretcherProcess.o: src/audiocurves/HighFrequencyAudioCurve.h
src/StretcherProcess.o: src/audiocurves/ConstantAudioCurve.h src/StretchCalculator.h
src/StretcherProcess.o: src/StretcherChannelData.h src/dsp/Resampler.h
src/StretcherProcess.o: src/base/Profiler.h src/system/VectorOps.h
src/StretcherProcess.o: src/system/sysutils.h
src/StretchCalculator.o: src/StretchCalculator.h src/system/sysutils.h
src/system/Thread.o: src/system/Thread.h
src/base/Profiler.o: src/base/Profiler.h src/system/sysutils.h
src/dsp/AudioCurveCalculator.o: src/dsp/AudioCurveCalculator.h
src/dsp/AudioCurveCalculator.o: src/system/sysutils.h
src/audiocurves/SpectralDifferenceAudioCurve.o: src/audiocurves/SpectralDifferenceAudioCurve.h
src/audiocurves/SpectralDifferenceAudioCurve.o: src/dsp/AudioCurveCalculator.h
src/audiocurves/SpectralDifferenceAudioCurve.o: src/system/sysutils.h
src/audiocurves/SpectralDifferenceAudioCurve.o: src/dsp/Window.h
src/audiocurves/SpectralDifferenceAudioCurve.o: src/system/VectorOps.h
src/audiocurves/SpectralDifferenceAudioCurve.o: src/system/sysutils.h
src/audiocurves/HighFrequencyAudioCurve.o: src/audiocurves/HighFrequencyAudioCurve.h
src/audiocurves/HighFrequencyAudioCurve.o: src/dsp/AudioCurveCalculator.h
src/audiocurves/HighFrequencyAudioCurve.o: src/system/sysutils.h
src/audiocurves/SilentAudioCurve.o: src/audiocurves/SilentAudioCurve.h
src/audiocurves/SilentAudioCurve.o: src/dsp/AudioCurveCalculator.h
src/audiocurves/SilentAudioCurve.o: src/system/sysutils.h
src/audiocurves/ConstantAudioCurve.o: src/audiocurves/ConstantAudioCurve.h
src/audiocurves/ConstantAudioCurve.o: src/dsp/AudioCurveCalculator.h
src/audiocurves/ConstantAudioCurve.o: src/system/sysutils.h
src/audiocurves/PercussiveAudioCurve.o: src/audiocurves/PercussiveAudioCurve.h
src/audiocurves/PercussiveAudioCurve.o: src/dsp/AudioCurveCalculator.h
src/audiocurves/PercussiveAudioCurve.o: src/system/sysutils.h src/system/VectorOps.h
src/audiocurves/PercussiveAudioCurve.o: src/system/sysutils.h
src/dsp/Resampler.o: src/dsp/Resampler.h src/system/sysutils.h
src/dsp/Resampler.o: src/base/Profiler.h
src/dsp/FFT.o: src/dsp/FFT.h src/system/sysutils.h src/system/Thread.h
src/dsp/FFT.o: src/base/Profiler.h src/system/VectorOps.h
src/dsp/FFT.o: src/system/sysutils.h
src/system/Allocators.o: src/system/Allocators.h src/system/VectorOps.h
src/system/Allocators.o: src/system/sysutils.h
src/system/sysutils.o: src/system/sysutils.h
src/StretcherChannelData.o: src/StretcherChannelData.h src/StretcherImpl.h
src/StretcherChannelData.o: rubberband/RubberBandStretcher.h src/dsp/Window.h
src/StretcherChannelData.o: src/dsp/FFT.h src/base/RingBuffer.h
src/StretcherChannelData.o: src/base/Scavenger.h src/system/Thread.h
src/StretcherChannelData.o: src/system/Thread.h src/system/sysutils.h
src/StretcherChannelData.o: src/dsp/Resampler.h src/system/Allocators.h
src/StretcherChannelData.o: src/system/VectorOps.h src/system/sysutils.h
src/StretcherImpl.o: src/StretcherImpl.h rubberband/RubberBandStretcher.h
src/StretcherImpl.o: src/dsp/Window.h src/dsp/FFT.h src/base/RingBuffer.h
src/StretcherImpl.o: src/base/Scavenger.h src/system/Thread.h src/system/Thread.h
src/StretcherImpl.o: src/system/sysutils.h src/audiocurves/PercussiveAudioCurve.h
src/StretcherImpl.o: src/dsp/AudioCurveCalculator.h
src/StretcherImpl.o: src/audiocurves/HighFrequencyAudioCurve.h
src/StretcherImpl.o: src/audiocurves/SpectralDifferenceAudioCurve.h src/dsp/Window.h
src/StretcherImpl.o: src/system/VectorOps.h src/system/sysutils.h
src/StretcherImpl.o: src/audiocurves/SilentAudioCurve.h src/audiocurves/ConstantAudioCurve.h
src/StretcherImpl.o: src/dsp/Resampler.h src/StretchCalculator.h
src/StretcherImpl.o: src/StretcherChannelData.h src/base/Profiler.h
main/main.o: rubberband/RubberBandStretcher.h src/system/sysutils.h
main/main.o: src/base/Profiler.h