-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
57 lines (45 loc) · 1.1 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
BUILD_SAMPLE_NC := 0
BUILD_SAMPLE_AL := 0
BUILD_SAMPLE_PYTHON := 0
BUILD_SAMPLE_NODEJS := 0
ifneq ($(filter nc,$(MAKECMDGOALS)),)
BUILD_SAMPLE_NC := 1
endif
ifneq ($(filter al,$(MAKECMDGOALS)),)
BUILD_SAMPLE_AL := 1
endif
ifneq ($(filter python,$(MAKECMDGOALS)),)
BUILD_SAMPLE_PYTHON := 1
endif
ifneq ($(filter node,$(MAKECMDGOALS)),)
BUILD_SAMPLE_NODEJS := 1
endif
.PHONY: nc al python build run clean node
nc: build
al: build
python: build
node: build
build:
mkdir -p build
cmake -B build -S cmake \
-D KRISP_SDK_PATH=${KRISP_SDK_PATH} \
-D LIBSNDFILE_INC=${LIBSNDFILE_INC} \
-D LIBSNDFILE_LIB=${LIBSNDFILE_LIB} \
-D NODE_INC=${NODE_INC} \
-D BUILD_SAMPLE_NC=$(BUILD_SAMPLE_NC) \
-D BUILD_SAMPLE_AL=$(BUILD_SAMPLE_AL) \
-D BUILD_SAMPLE_PYTHON=$(BUILD_SAMPLE_PYTHON) \
-D BUILD_SAMPLE_NODEJS=$(BUILD_SAMPLE_NODEJS)
${MAKE} -C build VERBOSE=1
@if [ "$(BUILD_SAMPLE_PYTHON)" -eq "1" ]; then \
cp ./src/sample-python/process_wav.py bin/; \
fi
run:
cd test && ./nc-sample-test-driver.sh
clean:
if [ -d "./build" ]; then \
rm -rf build; \
fi
if [ -d "./bin" ]; then \
rm -rf bin; \
fi