Package list squeezelite / ea2648a
Refresh Makefile-portaudio.patch for new Makefile Chris Boot 7 years ago
1 changed file(s) with 26 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
44
55 Author: Chris Boot <debian@bootc.net>
66 Forwarded: no
7 Last-Update: 2013-12-08
7 Last-Update: 2013-12-28
88
99 --- a/Makefile
1010 +++ b/Makefile
11 @@ -1,6 +1,6 @@
11 @@ -1,12 +1,13 @@
1212 # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
13 CFLAGS += -Wall $(OPTS)
14 -LDFLAGS += -lasound -lpthread -lm -lrt
15 +LDFLAGS += -lpthread -lm -lrt
13 CFLAGS ?= -Wall -fPIC -O2
14 -LDADD ?= -lasound -lpthread -lm -lrt
15 +LDADD ?= -lpthread -lm -lrt
1616 EXECUTABLE ?= squeezelite
1717
18 SOURCES = main.c slimproto.c utils.c output.c buffer.c stream.c decode.c process.c resample.c flac.c pcm.c mad.c vorbis.c faad.c mpg.c ffmpeg.c
19 @@ -23,6 +23,12 @@
18 # passing one or more of these in $(OPTS) enables optional feature inclusion
19 OPT_DSD = -DDSD
20 OPT_FF = -DFFMPEG
21 OPT_LINKALL = -DLINKALL
22 +OPT_PORTAUDIO = -DPORTAUDIO
23 OPT_RESAMPLE= -DRESAMPLE
24 OPT_VIS = -DVISEXPORT
25
26 @@ -21,6 +22,8 @@
27 SOURCES_VIS = output_vis.c
28
29 LINK_LINUX = -ldl
30 +LINK_ALSA = -lasound
31 +LINK_PORTAUDIO = -lportaudio
32
33 LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123
34 LINKALL_FF = -lavcodec -lavformat -lavutil
35 @@ -60,6 +63,12 @@
2036 endif
2137 endif
2238
23 +ifneq (,$(findstring -DPORTAUDIO, $(CFLAGS)))
24 + LDFLAGS += -lportaudio
39 +ifneq (,$(findstring $(OPT_PORTAUDIO), $(OPTS)))
40 + LDADD += $(LINK_PORTAUDIO)
2541 +else
26 + LDFLAGS += -lasound
42 + LDADD += $(LINK_ALSA)
2743 +endif
2844 +
2945 OBJECTS = $(SOURCES:.c=.o)