File: Makefile

package info (click to toggle)
morse 2.1-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 412 kB
  • ctags: 428
  • sloc: ansic: 3,750; xml: 376; makefile: 116
file content (95 lines) | stat: -rw-r--r-- 2,841 bytes parent folder | download | duplicates (2)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Select your audio output device.  Current choices are:
#
#   X11:    The X11 window system.
#   Linux:  IBM PC Console running Linux.
#   OSS:    Open Sound System /dev/dsp device.
#
# Two notes about OSS:
# (1) You can use this even on a recent Linux kernel with ALSA, which
#     implements enough of the OSS interface for it to work.
# (2) Many Linux laptops seem to have console speakers that are unreliable 
#     for various hardware and software reasons.  You may be better off using 
#     morseOSS than morseLinux.
#
# Running on Mac OS X:
# (1) Use X11.  The user must, as with any X11 client, set the DISPLAY 
#   variable, and have the X server running. Finally, the X11 output 
#   preferences dialog should have "Use system alert effect" unchecked; 
#   otherwise, the system alert (settable, but unlikely to be useful to 
#   copy code in any event) will be used instead of the X beep.
#
# Adding a new device is as simple as creating a new implementation of the
# beep.h interface.  See beep*.c for examples.  Please send any additions
# to the authors!
#
#DEVICE = X11
DEVICE = Linux
#DEVICE = OSS

VERS=$(shell sed <morse.spec -n -e '/Version: \(.*\)/s//\1/p')

MANPAGES = morse.1 QSO.1 
DOCS = README HISTORY morse.xml morse.spec $(MANPAGES)
ALL=  $(DOCS) Makefile $(SOURCES) test_input \
	morse.d/*.[ch] morse.d/Makefile \
	qso.d/*.[ch] qso.d/Makefile

default:
	make testmorse

all: morse QSO morse.1 QSO.1

install: all
	install morse.d/morseLinux $(DESTDIR)/usr/bin/morse
	install morse.d/morseX11 $(DESTDIR)/usr/bin
	install qso.d/QSO $(DESTDIR)/usr/bin

morse:
#	cd morse.d && make DEVICE=${DEVICE}
#	ln morse.d/morse ./morse

QSO:
	cd qso.d && make
#	ln qso.d/QSO ./QSO

#
# "Jocks find quartz glyph, vex BMW." is my attempt to win Stephen J. Gould's
# prize (a copy of all his books) for the first person who can come up with a
# "perfect pangram": a meaningful sentence consisting entirely of common
# English words, with no abbreviations or proper names, that contains each
# letter exactly once. He rejected it because it contains "BMW", alas, but
# he did say it's the closest he's seen so far. - Joe Dellinger
#
testmorse:	morse QSO
#	(cat test_input; qso.d/QSO) | morse -w 24 -l -e

testqso:	morse QSO
#	qso.d/QSO | ./morse -w 20 -l -e

all:	morse QSO

clean:
	rm -f morse QSO
	cd morse.d; make clean
	cd qso.d; make clean

pristine: clean
	rm -f $(MANPAGES)

morse.1: morse.xml
	xmlto man morse.xml

morse.html: morse.xml
	xmlto xhtml-nochunks morse.xml

morse-$(VERS).tar.gz: $(ALL)
	@ls $(ALL) | sed s:^:morse-$(VERS)/: >MANIFEST
	@(cd ..; ln -s trunk morse-$(VERS))
	(cd ..; tar -czvf trunk/morse-$(VERS).tar.gz `cat trunk/MANIFEST`)
	@(cd ..; rm morse-$(VERS))

dist: morse-$(VERS).tar.gz

release: morse-$(VERS).tar.gz morse.html
	shipper -f; rm -f CHANGES ANNOUNCE* *.1 *.html *.rpm *.lsm MANIFEST