CXX=clang++-7 CXXFLAGS=-stdlib=libc++ -Wall -O2 -std=c++17 #-march=native -mtune=native # is not better for llvm # libstdc++-8 doesn't have transform_reduce #CXX=g++-8 #CXXFLAGS=-Wall -O2 -std=c++17 -nostdinc++ -I/usr/lib/llvm-7/include/c++/v1 -nodefaultlibs -lc++ -lc++abi -lm -lc -lgcc_s -lgcc # -march=native -mtune=native # doesn't help for gcc DESTDIR=/ PREFIX=/usr/local/bin all: tunerdemo testsuite tunerdemo: util.o fft.o autocorrelation.o tuner.o tunerdemo.o $(CXX) $(CXXFLAGS) -o $@ $^ testsuite: util.o fft.o autocorrelation.o tuner.o testsuite.o $(CXX) $(CXXFLAGS) -o $@ $^ fft.o: fft.cpp fft.h $(CXX) $(CXXFLAGS) -c -o $@ $< autocorrelation.o: autocorrelation.cpp autocorrelation.h $(CXX) $(CXXFLAGS) -c -o $@ $< tuner.o: tuner.cpp tuner.h $(CXX) $(CXXFLAGS) -c -o $@ $< util.o: util.cpp util.h $(CXX) $(CXXFLAGS) -c -o $@ $< testsuite.o: testsuite.cpp fft.h autocorrelation.h tuner.h $(CXX) $(CXXFLAGS) -c -o $@ $< tunerdemo.o: tunerdemo.cpp fft.h autocorrelation.h tuner.h $(CXX) $(CXXFLAGS) -c -o $@ $< test: testsuite ./testsuite install: install tunerdemo $(DESTDIR)/$(PREFIX)/tunerdemo clean: rm -f tunerdemo *.o .PHONY: clean install all test