summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
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