1 |
11 |
dgisselq |
##############################################################################//
|
2 |
|
|
##
|
3 |
|
|
## Filename: Makefile
|
4 |
|
|
##
|
5 |
|
|
## Project: CMod S6 System on a Chip, ZipCPU demonstration project
|
6 |
|
|
##
|
7 |
|
|
## Purpose: A speedbump on the way to building the software for the various
|
8 |
|
|
## support directories--simply coordinating that. This makefile
|
9 |
|
|
## allows the prior directory to issue a make in this directory, while
|
10 |
|
|
## not needing to worry about subdirectories--which this file handles.
|
11 |
|
|
##
|
12 |
|
|
## Creator: Dan Gisselquist, Ph.D.
|
13 |
|
|
## Gisselquist Technology, LLC
|
14 |
|
|
##
|
15 |
|
|
##############################################################################//
|
16 |
|
|
##
|
17 |
|
|
## Copyright (C) 2015-2016, Gisselquist Technology, LLC
|
18 |
|
|
##
|
19 |
|
|
## This program is free software (firmware): you can redistribute it and/or
|
20 |
|
|
## modify it under the terms of the GNU General Public License as published
|
21 |
|
|
## by the Free Software Foundation, either version 3 of the License, or (at
|
22 |
|
|
## your option) any later version.
|
23 |
|
|
##
|
24 |
|
|
## This program is distributed in the hope that it will be useful, but WITHOUT
|
25 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
26 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
27 |
|
|
## for more details.
|
28 |
|
|
##
|
29 |
|
|
## You should have received a copy of the GNU General Public License along
|
30 |
|
|
## with this program. (It's in the $(ROOT)/doc directory, run make with no
|
31 |
|
|
## target there if the PDF file isn't present.) If not, see
|
32 |
|
|
## for a copy.
|
33 |
|
|
##
|
34 |
|
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
35 |
|
|
## http://www.gnu.org/licenses/gpl.html
|
36 |
|
|
##
|
37 |
|
|
##
|
38 |
|
|
##############################################################################//
|
39 |
|
|
##
|
40 |
|
|
##
|
41 |
|
|
.PHONY: all
|
42 |
|
|
all: host dev zipos
|
43 |
|
|
|
44 |
|
|
.PHONY: host dev zipos clean depends
|
45 |
|
|
|
46 |
|
|
host:
|
47 |
|
|
@bash -c 'if [ -e host/Makefile ]; then make --no-print-directory -C host; fi'
|
48 |
|
|
dev:
|
49 |
|
|
@bash -c 'if [ -e dev/Makefile ]; then make --no-print-directory -C dev; fi'
|
50 |
|
|
zipos:
|
51 |
|
|
@bash -c 'if [ -e zipos/Makefile ]; then make --no-print-directory -C zipos; fi'
|
52 |
|
|
|
53 |
|
|
clean:
|
54 |
|
|
@bash -c 'if [ -e host/Makefile ]; then make --no-print-directory -C host clean; fi'
|
55 |
|
|
@bash -c 'if [ -e dev/Makefile ]; then make --no-print-directory -C dev clean; fi'
|
56 |
|
|
@bash -c 'if [ -e zipos/Makefile ]; then make --no-print-directory -C zipos clean; fi'
|
57 |
|
|
|
58 |
|
|
depends:
|
59 |
|
|
@bash -c 'if [ -e host/Makefile ]; then make --no-print-directory -C host depends; fi'
|
60 |
|
|
@bash -c 'if [ -e dev/Makefile ]; then make --no-print-directory -C dev depends; fi'
|
61 |
|
|
@bash -c 'if [ -e zipos/Makefile ]; then make --no-print-directory -C zipos depends; fi'
|
62 |
|
|
|
63 |
12 |
dgisselq |
SNDFILE=$(HOME)/sounds/doorbell_x.wav
|
64 |
11 |
dgisselq |
|
65 |
12 |
dgisselq |
.PHONY: doorbell
|
66 |
|
|
doorbell:
|
67 |
|
|
@bash -c "if [ ! -e doorbell.wav ]; then mpg321 $(SNDFILE) -w doorbell.wav; fi"
|
68 |
|
|
sox doorbell.wav -t raw -e signed -b 16 -c 1 -r 8k doorbell.16t
|
69 |
|
|
|
70 |
|
|
doorbell.16t: doorbell
|
71 |
|
|
dev/samples.c: doorbell.16t host/buildsamples
|
72 |
|
|
host/buildsamples doorbell.16t > dev/samples.c
|
73 |
|
|
|
74 |
|
|
play:
|
75 |
|
|
play -q -t raw -e signed -b 16 -c 1 -r 8k doorbell.16t
|
76 |
|
|
|