forked from breakfastquay/rubberband
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.ios
145 lines (115 loc) · 4.1 KB
/
Makefile.ios
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
CXX := clang++
CC := clang
OPTFLAGS := -ffast-math -freciprocal-math -O3 -ftree-vectorize
# For the device
ARCHFLAGS_DEV := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=6 -stdlib=libc++ -arch armv7 -arch arm64
# Or for the simulator
ARCHFLAGS_SIM := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -miphoneos-version-min=6 -stdlib=libc++ -arch i386 -arch x86_64
CXXFLAGS_ANY := $(OPTFLAGS) -I. -Isrc -Irubberband -DMALLOC_IS_ALIGNED -DHAVE_VDSP -DUSE_SPEEX -DUSE_POMMIER_MATHFUN -DNO_THREADING -DNO_THREAD_CHECKS -DNO_TIMING -DNO_TIMING_COMPLETE_NOOP -DNDEBUG
CXXFLAGS_DEV := $(ARCHFLAGS_DEV) $(CXXFLAGS_ANY)
CXXFLAGS_SIM := $(ARCHFLAGS_SIM) $(CXXFLAGS_ANY)
CFLAGS_DEV := $(ARCHFLAGS_DEV) $(OPTFLAGS)
CFLAGS_SIM := $(ARCHFLAGS_SIM) $(OPTFLAGS)
AR := ar
LIPO := lipo
MKDIR := mkdir
LIBNAME := librubberband
STATIC_TARGET := lib/$(LIBNAME).a
STATIC_TARGET_DEV := lib/$(LIBNAME).dev.a
STATIC_TARGET_SIM := lib/$(LIBNAME).sim.a
default: lib $(STATIC_TARGET)
all: lib $(STATIC_TARGET)
static: $(STATIC_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
LIBRARY_OBJECTS_DEV := $(LIBRARY_SOURCES:.cpp=.dev.o)
LIBRARY_OBJECTS_DEV := $(LIBRARY_OBJECTS_DEV:.c=.dev.o)
LIBRARY_OBJECTS_SIM := $(LIBRARY_SOURCES:.cpp=.sim.o)
LIBRARY_OBJECTS_SIM := $(LIBRARY_OBJECTS_SIM:.c=.sim.o)
$(STATIC_TARGET): $(STATIC_TARGET_DEV) $(STATIC_TARGET_SIM)
rm -f $@
$(LIPO) -create -output $@ $^
@echo
@echo "Build complete."
@echo
@echo "Please note that you cannot legally distribute the Rubber Band Library in an"
@echo "iOS app on the App Store, unless you have first obtained a commercial licence."
@echo
$(STATIC_TARGET_DEV): $(LIBRARY_OBJECTS_DEV)
rm -f $@
$(AR) rsc $@ $^
$(STATIC_TARGET_SIM): $(LIBRARY_OBJECTS_SIM)
rm -f $@
$(AR) rsc $@ $^
%.dev.o: %.c
$(CC) -c $(CFLAGS_DEV) -o $@ $<
%.dev.o: %.cpp
$(CXX) -c $(CXXFLAGS_DEV) -o $@ $<
%.sim.o: %.c
$(CC) -c $(CFLAGS_SIM) -o $@ $<
%.sim.o: %.cpp
$(CXX) -c $(CXXFLAGS_SIM) -o $@ $<
lib:
$(MKDIR) $@
clean:
rm -f $(LIBRARY_OBJECTS_DEV) $(LIBRARY_OBJECTS_SIM)
distclean: clean
rm -f $(STATIC_TARGET_DEV) $(STATIC_TARGET_SIM)
depend:
touch Makefile.dev_depends Makefile.sim_depends
makedepend -f Makefile.dev_depends -o.dev.o -Y $(LIBRARY_SOURCES)
makedepend -f Makefile.sim_depends -o.sim.o -Y $(LIBRARY_SOURCES)
-include Makefile.dev_depends
-include Makefile.sim_depends