-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (25 loc) · 895 Bytes
/
Makefile
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
CPP_FILES := $(filter-out src/wavReader.cpp , $(wildcard src/*.cpp))
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
LD_FLAGS = -g -lrt -lm -lasound -ljack -pthread
LD_TEST_FLAGS = -g -lrt -lm -ljack -pthread -lsndfile
LIB_FLAGS = lib/libportaudio.a
CPP_TEST_FILES := $(filter-out src/ttuner.cpp src/recordaudio.cpp, $(wildcard */*.cpp))
OBJ_TEST_FILES := $(addprefix obj/,$(notdir $(CPP_TEST_FILES:.cpp=.o)))
CPP_DSP_FILES := $(wildcard src/DSPFilters/*.cpp)
OBJ_DSP_FILES := $(addprefix obj/,$(notdir $(CPP_DSP_FILES:.cpp=.o)))
all : ttuner
testProject: test runTest
DSPFilters: $(OBJ_DSP_FILES)
g++ -o $@ $^
ttuner: $(OBJ_FILES)
g++ $(LD_FLAGS) -o $@ $^ $(LIB_FLAGS)
test: $(OBJ_TEST_FILES)
g++ $(LD_TEST_FLAGS) -o $@ $^
obj/%.o: src/%.cpp
g++ $(CC_FLAGS) -c -o $@ $<
obj/%.o: tests/%.cpp
g++ $(CC_FLAGS) -c -o $@ $<
run :
./ttuner
runTest :
./test -s