-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (63 loc) · 1.39 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
export GODEBUG = cgocheck=2
TARGET = picogo
# PICO_SRCS is taken from picopi/pico/lib/Makefile:SRCS
PICO_SRCS := picoacph.c \
picoapi.c \
picobase.c \
picocep.c \
picoctrl.c \
picodata.c \
picodbg.c \
picoextapi.c \
picofftsg.c \
picokdbg.c \
picokdt.c \
picokfst.c \
picoklex.c \
picoknow.c \
picokpdf.c \
picokpr.c \
picoktab.c \
picoos.c \
picopal.c \
picopam.c \
picopr.c \
picorsrc.c \
picosa.c \
picosig.c \
picosig2.c \
picospho.c \
picotok.c \
picotrns.c \
picowa.c
build:
cd cmd && CGO_ENABLED=1 go build -o ../${TARGET}
_c:
@for s in $(PICO_SRCS) ; do \
echo "#include <$$s>" > cgo_$$s ; \
done
install: LANG_SRC=picopi/pico/lang
install: ${LANG_SRC}
install: LANG_DST=/usr/share/pico/lang
install: ${TARGET}
cp -f ${TARGET} /usr/local/bin
mkdir -p ${LANG_DST}
cp -f ${LANG_SRC}/*.bin ${LANG_DST}/
test: LANG=en-GB
test: VOLUME=100
test: PITCH=100
test: RATE=100
test: LANG_DIR=./picopi/pico/lang
test: TEST=echo "this is a test message for picogo"
test: TARGET=picogo
test: build
@ $(TEST) | \
./picogo -i -d ${LANG_DIR} -R ${RATE} -V ${VOLUME} -P ${PITCH} -l ${LANG}| \
aplay --rate=16000 --channels=1 --format=S16_LE
raspi-build: CC_RASPI=/opt/cross-pi-gcc/bin/arm-linux-gnueabihf-gcc
raspi-build: ${CC_RASPI}
raspi-build: export CC=${CC_RASPI}
raspi-build: export GOOS=linux
raspi-build: export GOARCH=arm
raspi-build: TARGET=raspi-picogo
raspi-build: build