-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 1.09 KB
/
Makefile
File metadata and controls
47 lines (35 loc) · 1.09 KB
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
# Name of the executable
EXEC = cppaudiocapture
# Include PortAudio and FFTW headers and library archives
CLIB = -I./lib/portaudio/include ./lib/portaudio/lib/.libs/libportaudio.a \
-lrt -lasound -ljack -pthread -I./lib/fftw-3.3.10/api -lfftw3
$(EXEC): main.cpp
g++ -o $@ $^ $(CLIB)
install-deps: install-portaudio install-fftw
.PHONY: install-deps
uninstall-deps: uninstall-portaudio uninstall-fftw
.PHONY: uninstall-deps
install-portaudio:
mkdir -p lib
curl https://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz | tar -zx -C lib
cd lib/portaudio && ./configure && $(MAKE) -j
.PHONY: install-portaudio
uninstall-portaudio:
cd lib/portaudio && $(MAKE) uninstall
rm -rf lib/portaudio
.PHONY: uninstall-portaudio
install-fftw:
mkdir -p lib
curl http://www.fftw.org/fftw-3.3.10.tar.gz | tar -zx -C lib
cd lib/fftw-3.3.10 && ./configure && $(MAKE) -j && sudo $(MAKE) install
.PHONY: install-fftw
uninstall-fftw:
cd lib/fftw-3.3.10 && $(MAKE) uninstall
rm -rf lib/fftw-3.3.10
.PHONY: uninstall-fftw
clean:
rm -f $(EXEC)
.PHONY: clean
clean-all: clean
rm -rf lib
.PHONY: clean-all