Refresh Makefile-portaudio.patch for new Makefile
Chris Boot
10 years ago
4 | 4 | |
5 | 5 | Author: Chris Boot <debian@bootc.net> |
6 | 6 | Forwarded: no |
7 | Last-Update: 2013-12-08 | |
7 | Last-Update: 2013-12-28 | |
8 | 8 | |
9 | 9 | --- a/Makefile |
10 | 10 | +++ b/Makefile |
11 | @@ -1,6 +1,6 @@ | |
11 | @@ -1,12 +1,13 @@ | |
12 | 12 | # 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 | |
16 | 16 | EXECUTABLE ?= squeezelite |
17 | 17 | |
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 @@ | |
20 | 36 | endif |
21 | 37 | endif |
22 | 38 | |
23 | +ifneq (,$(findstring -DPORTAUDIO, $(CFLAGS))) | |
24 | + LDFLAGS += -lportaudio | |
39 | +ifneq (,$(findstring $(OPT_PORTAUDIO), $(OPTS))) | |
40 | + LDADD += $(LINK_PORTAUDIO) | |
25 | 41 | +else |
26 | + LDFLAGS += -lasound | |
42 | + LDADD += $(LINK_ALSA) | |
27 | 43 | +endif |
28 | 44 | + |
29 | 45 | OBJECTS = $(SOURCES:.c=.o) |