From 47bb06f89d486011efbcc50607387608ddfbe8c7 Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Mon, 18 Feb 2019 21:30:55 +0100 Subject: Added pa_ringbuffer as external --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 06328f0..2bf4c85 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,11 @@ PORTAUDIOCFLAGS=$(shell pkg-config --cflags portaudiocpp) PORTAUDIOLIBS=$(shell pkg-config --libs portaudiocpp) CXX=clang++-7 -CXXFLAGS=-stdlib=libc++ -Wall -O2 -std=c++17 -fexceptions +CXXFLAGS=-stdlib=libc++ -Wall -O2 -std=c++17 -fexceptions -Iexternal #-march=native -mtune=native # is not better for llvm +CXXTESTFLAGS=-I/usr/src/googletest/googletest/include -I/usr/src/googletest/googlemock/include +CC=clang +CFLAGS=-Wall -O2 -Iexternal # libstdc++-8 doesn't have transform_reduce #CXX=g++-8 @@ -15,7 +18,7 @@ PREFIX=/usr/local/bin all: tunerdemo testsuite -tunerdemo: audioio.o util.o fft.o autocorrelation.o tuner.o tunerdemo.o +tunerdemo: audioio.o external/pa_ringbuffer.o util.o fft.o autocorrelation.o tuner.o tunerdemo.o $(CXX) $(CXXFLAGS) $(PORTAUDIOLIBS) -o $@ $^ testsuite: util.o fft.o autocorrelation.o tuner.o testsuite.o @@ -36,6 +39,9 @@ util.o: util.cpp util.h audioio.o: audioio.cpp audioio.h $(CXX) $(CXXFLAGS) $(PORTAUDIOCFLAGS) -c -o $@ $< +external/pa_ringbuffer.o: external/pa_ringbuffer.c external/pa_ringbuffer.h + $(CC) $(CFLAGS) -c -o $@ $< + testsuite.o: testsuite.cpp fft.h autocorrelation.h tuner.h $(CXX) $(CXXFLAGS) -c -o $@ $< @@ -49,6 +55,6 @@ install: install tunerdemo $(DESTDIR)/$(PREFIX)/tunerdemo clean: - rm -f tunerdemo *.o + rm -f tunerdemo *.o external/*.o .PHONY: clean install all test -- cgit v1.2.3