Debian Codegraph @

morse.d/Makefile

raw ◀ ▶
Source reconstructed at patch state 1 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 DEVICE=PA
2
3 BEEPERS = beepLinux.c beepOSS.c beepX11.c beepALSA.c
4 SOURCES = alarm.c morse.c alarm.h beep.h $(BEEPERS)
5
6 # The flags necessary to link with the X11 libraries.
7 X11LIBS = -L/usr/X11R6/lib -lX11
8
9 # The flags necessary to link with PulseAudio and support pthread
10 PA_CFLAGS = -pthread $(shell pkg-config --cflags libpulse-simple)
11 PA_LIBS = $(shell pkg-config --libs libpulse-simple) -pthread
12
13 # The flags necessary to link with ALSA
14 ALSA_CFLAGS = $(shell pkg-config --cflags alsa)
15 ALSA_LIBS = $(shell pkg-config --libs alsa)
16
17 # Any additional flags your favorite C compiler requires to work.
18 CFLAGS = -O3 -I/usr/X11R6/include $($(device)_EXTRA_CFLAGS)
19
20 morse: morse${DEVICE}
21 rm -f $@
22 ln morse${DEVICE} $@
23
24 morseX11: morse.o beepX11.o alarm.o
25 $(CC) $(X11LIBS) $(LDFLAGS) -o $@ morse.o beepX11.o alarm.o
26
27 morseLinux: morse.o beepLinux.o alarm.o
28 $(CC) $(LDFLAGS) -o $@ morse.o beepLinux.o alarm.o -lm
29
30 morseOSS: morse.o beepOSS.o
31 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ morse.o beepOSS.o -lm
32
33 morsePA: morse.o beepPA.o
34 $(CC) $(CFLAGS) $(LDFLAGS) $(PA_CFLAGS) -o $@ morse.o beepPA.o -lm $(PA_LIBS)
35
36 morseALSA: morse.o beepALSA.o
37 $(CC) $(CFLAGS) $(LDFLAGS) $(ALSA_CFLAGS) -o $@ morse.o beepALSA.o -lm $(ALSA_LIBS)
38
39 morse.o: beep.h Makefile
40 beepX11.o: beep.h alarm.h
41 beepLinux.o: beep.h alarm.h
42 beepOSS.o: beep.h
43 beepALSA.o: beep.h
44 alarm.o: alarm.h
45
46 clean:
47 rm -f *.o morse QSO morseX11 morseLinux morseOSS morsePA morseALSA