Debian Codegraph @

Makefile

raw
1 # Select your audio output device. Current choices are:
2 #
3 # X11: The X11 window system.
4 # Linux: IBM PC Console running Linux.
5 # OSS: Open Sound System /dev/dsp device.
6 # PA: PulseAudio using the pulse-simple client API.
7 # ALSA: Advanced Linux Sound Architecture
8 #
9 # Running on Linux:
10 # Many Linux laptops seem to have console speakers that are unreliable
11 # for various hardware and software reasons. You may be better off
12 # using morseALSA or morseOSS than morseLinux.
13 #
14 # Running on Mac OS X:
15 # (1) Use X11. The user must, as with any X11 client, set the DISPLAY
16 # variable, and have the X server running. Finally, the X11 output
17 # preferences dialog should have "Use system alert effect" unchecked;
18 # otherwise, the system alert (settable, but unlikely to be useful to
19 # copy code in any event) will be used instead of the X beep.
20 #
21 # Adding a new device is as simple as creating a new implementation of the
22 # beep.h interface. See beep*.c for examples. Please send any additions
23 # to the authors!
24 #
25 # SPDX-FileCopyrightText: (C) Eric S. Raymond <[email protected]>
26 # SPDX-License-Identifier: BSD-2-Clause
27 #
28 #DEVICE = X11
29 #DEVICE = Linux
30 #DEVICE = OSS
31 DEVICE = ALSA
32 #DEVICE = PA
33
34 VERSION=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)
35
36 MANPAGES = morse.1 QSO.1
37 DOCS = README NEWS COPYING TODO morse.xml $(MANPAGES)
38 ALL= $(DOCS) Makefile $(SOURCES) test_input \
39 morse.d/*.[ch] morse.d/Makefile \
40 qso.d/*.[ch] qso.d/Makefile
41
42 default: all
43
44 all: morse QSO morse.1 QSO.1
45
46 morse:
47 cd morse.d && make DEVICE=${DEVICE}
48 ln morse.d/morse ./morse
49
50 QSO:
51 cd qso.d && make
52 ln qso.d/QSO ./QSO
53
54 #
55 # "Jocks find quartz glyph, vex BMW." is my attempt to win Stephen J. Gould's
56 # prize (a copy of all his books) for the first person who can come up with a
57 # "perfect pangram": a meaningful sentence consisting entirely of common
58 # English words, with no abbreviations or proper names, that contains each
59 # letter exactly once. He rejected it because it contains "BMW", alas, but
60 # he did say it's the closest he's seen so far. - Joe Dellinger
61 #
62 testmorse: morse QSO
63 (cat test_input; qso.d/QSO) | ./morse -w 24 -l -e
64
65 testqso: morse QSO
66 qso.d/QSO | ./morse -w 20 -l -e
67
68 check: testmorse testqso
69
70 clean:
71 rm -f morse QSO *.1 *.html
72 cd morse.d; make clean
73 cd qso.d; make clean
74
75 pristine: clean
76 rm -f $(MANPAGES) morse.html
77
78 reflow:
79 @clang-format --style="{IndentWidth: 8, UseTab: ForIndentation}" -i $$(find . -name "*.[ch]")
80
81 morse.1 QSO.1: morse.xml
82 xmlto man morse.xml
83
84 morse.html: morse.xml
85 xmlto xhtml-nochunks morse.xml
86
87 morse-$(VERSION).tar.gz: $(ALL)
88 @ls $(ALL) | sed s:^:morse-$(VERSION)/: >MANIFEST
89 @(cd ..; ln -s morse-classic morse-$(VERSION))
90 (cd ..; tar -czf morse-classic/morse-$(VERSION).tar.gz `cat morse-classic/MANIFEST`)
91 @(cd ..; rm morse-$(VERSION))
92
93 dist: morse-$(VERSION).tar.gz
94
95 cppcheck:
96 cppcheck --quiet --template gcc --enable=all --suppress=missingIncludeSystem qso.d/*.[ch]
97 cppcheck --quiet --template gcc --enable=all --suppress=missingIncludeSystem morse.d/*.[ch]
98
99 release: morse-$(VERSION).tar.gz morse.html
100 shipper version=$(VERSION) | sh -e -x
101
102 refresh: morse.html
103 shipper -N -w version=$(VERSION) | sh -e -x