2014-12-09 09:22:19 +00:00
|
|
|
|
2022-06-14 15:31:21 +01:00
|
|
|
CXX := clang++ -stdlib=libc++ -std=c++11
|
2014-12-09 09:22:19 +00:00
|
|
|
CC := clang
|
2021-02-24 09:29:07 +00:00
|
|
|
|
2022-06-14 15:31:21 +01:00
|
|
|
OPTFLAGS := -DNDEBUG -ffast-math -O3 -ftree-vectorize
|
2014-12-09 09:22:19 +00:00
|
|
|
|
2014-12-09 09:33:44 +00:00
|
|
|
# For the device
|
2022-06-14 15:31:21 +01:00
|
|
|
ARCHFLAGS_DEV := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=6 -arch armv7 -arch arm64 -fembed-bitcode
|
2014-12-09 09:33:44 +00:00
|
|
|
|
|
|
|
|
# Or for the simulator
|
2022-06-14 15:31:21 +01:00
|
|
|
ARCHFLAGS_SIM := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -miphoneos-version-min=6 -arch x86_64 -fembed-bitcode
|
2014-12-09 09:33:44 +00:00
|
|
|
|
2022-06-14 15:31:21 +01:00
|
|
|
CXXFLAGS_ANY := $(OPTFLAGS) -I. -Isrc -Irubberband -DUSE_BQRESAMPLER -DHAVE_VDSP -DNO_THREAD_CHECKS -DUSE_PTHREADS -DNO_TIMING -DMALLOC_IS_ALIGNED -DNDEBUG
|
2014-12-09 09:22:19 +00:00
|
|
|
|
2015-01-24 12:34:06 +00:00
|
|
|
CXXFLAGS_DEV := $(ARCHFLAGS_DEV) $(CXXFLAGS_ANY)
|
|
|
|
|
CXXFLAGS_SIM := $(ARCHFLAGS_SIM) $(CXXFLAGS_ANY)
|
|
|
|
|
|
|
|
|
|
CFLAGS_DEV := $(ARCHFLAGS_DEV) $(OPTFLAGS)
|
|
|
|
|
CFLAGS_SIM := $(ARCHFLAGS_SIM) $(OPTFLAGS)
|
2014-12-09 09:22:19 +00:00
|
|
|
|
|
|
|
|
AR := ar
|
2015-01-24 12:34:06 +00:00
|
|
|
LIPO := lipo
|
2021-02-26 11:09:47 +00:00
|
|
|
MKDIR := mkdir -p
|
2014-12-09 09:22:19 +00:00
|
|
|
|
|
|
|
|
LIBNAME := librubberband
|
|
|
|
|
|
|
|
|
|
STATIC_TARGET := lib/$(LIBNAME).a
|
2015-01-24 12:34:06 +00:00
|
|
|
STATIC_TARGET_DEV := lib/$(LIBNAME).dev.a
|
|
|
|
|
STATIC_TARGET_SIM := lib/$(LIBNAME).sim.a
|
2014-12-09 09:22:19 +00:00
|
|
|
|
2015-01-24 12:34:06 +00:00
|
|
|
default: lib $(STATIC_TARGET)
|
|
|
|
|
all: lib $(STATIC_TARGET)
|
2021-01-08 12:12:34 +00:00
|
|
|
static: lib $(STATIC_TARGET)
|
2014-12-09 09:22:19 +00:00
|
|
|
|
|
|
|
|
PUBLIC_INCLUDES := \
|
|
|
|
|
rubberband/rubberband-c.h \
|
|
|
|
|
rubberband/RubberBandStretcher.h
|
|
|
|
|
|
|
|
|
|
LIBRARY_SOURCES := \
|
|
|
|
|
src/rubberband-c.cpp \
|
|
|
|
|
src/RubberBandStretcher.cpp \
|
2022-06-14 15:31:21 +01:00
|
|
|
src/faster/AudioCurveCalculator.cpp \
|
|
|
|
|
src/faster/CompoundAudioCurve.cpp \
|
|
|
|
|
src/faster/HighFrequencyAudioCurve.cpp \
|
|
|
|
|
src/faster/SilentAudioCurve.cpp \
|
|
|
|
|
src/faster/PercussiveAudioCurve.cpp \
|
|
|
|
|
src/faster/StretcherChannelData.cpp \
|
|
|
|
|
src/faster/StretcherImpl.cpp \
|
|
|
|
|
src/faster/StretcherProcess.cpp \
|
|
|
|
|
src/common/Profiler.cpp \
|
|
|
|
|
src/common/Resampler.cpp \
|
|
|
|
|
src/common/FFT.cpp \
|
|
|
|
|
src/common/Allocators.cpp \
|
|
|
|
|
src/common/StretchCalculator.cpp \
|
|
|
|
|
src/common/sysutils.cpp \
|
|
|
|
|
src/common/Thread.cpp \
|
|
|
|
|
src/finer/R3StretcherImpl.cpp
|
2014-12-09 09:22:19 +00:00
|
|
|
|
2015-01-24 12:34:06 +00:00
|
|
|
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)
|
2014-12-09 09:22:19 +00:00
|
|
|
|
2015-01-24 12:34:06 +00:00
|
|
|
$(STATIC_TARGET): $(STATIC_TARGET_DEV) $(STATIC_TARGET_SIM)
|
2014-12-09 09:22:19 +00:00
|
|
|
rm -f $@
|
2015-01-24 12:34:06 +00:00
|
|
|
$(LIPO) -create -output $@ $^
|
2014-12-09 09:22:19 +00:00
|
|
|
@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
|
|
|
|
|
|
2015-01-24 12:34:06 +00:00
|
|
|
$(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 $@ $<
|
|
|
|
|
|
2014-12-09 09:22:19 +00:00
|
|
|
lib:
|
|
|
|
|
$(MKDIR) $@
|
|
|
|
|
|
|
|
|
|
clean:
|
2015-01-24 12:34:06 +00:00
|
|
|
rm -f $(LIBRARY_OBJECTS_DEV) $(LIBRARY_OBJECTS_SIM)
|
2014-12-09 09:22:19 +00:00
|
|
|
|
|
|
|
|
distclean: clean
|
2015-01-24 12:34:06 +00:00
|
|
|
rm -f $(STATIC_TARGET_DEV) $(STATIC_TARGET_SIM)
|
2014-12-09 09:22:19 +00:00
|
|
|
|
|
|
|
|
depend:
|
2021-02-24 09:29:07 +00:00
|
|
|
touch otherbuilds/Makefile.dev_depends otherbuilds/Makefile.sim_depends
|
|
|
|
|
makedepend -f otherbuilds/Makefile.dev_depends -o.dev.o -Y $(LIBRARY_SOURCES)
|
|
|
|
|
makedepend -f otherbuilds/Makefile.sim_depends -o.sim.o -Y $(LIBRARY_SOURCES)
|
2015-01-24 12:34:06 +00:00
|
|
|
|
2021-02-24 09:29:07 +00:00
|
|
|
-include otherbuilds/Makefile.dev_depends
|
|
|
|
|
-include otherbuilds/Makefile.sim_depends
|