3 | 3 |
used when building C source.
|
4 | 4 |
Author: Chris Boot <debian@bootc.net>
|
5 | 5 |
Forwarded: not-needed
|
6 | |
Last-Update: 2013-12-08
|
|
6 |
Last-Update: 2013-12-28
|
7 | 7 |
|
8 | |
--- a/Makefile
|
9 | |
+++ b/Makefile
|
|
8 |
--- squeezelite-1.4.orig/Makefile
|
|
9 |
+++ squeezelite-1.4/Makefile
|
10 | 10 |
@@ -1,6 +1,6 @@
|
11 | 11 |
# Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
|
12 | 12 |
-CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
|
13 | 13 |
-LDFLAGS ?= -lasound -lpthread -lm -lrt
|
14 | |
+CFLAGS += -Wall $(OPTS)
|
15 | |
+LDFLAGS += -lasound -lpthread -lm -lrt
|
|
14 |
+CFLAGS ?= -Wall -fPIC -O2
|
|
15 |
+LDADD ?= -lasound -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 | |
@@ -33,7 +33,7 @@
|
|
18 |
# passing one or more of these in $(OPTS) enables optional feature inclusion
|
|
19 |
@@ -31,32 +31,32 @@ DEPS = squeezelite.h slimpro
|
|
20 |
UNAME = $(shell uname -s)
|
|
21 |
|
|
22 |
# add optional sources
|
|
23 |
-ifneq (,$(findstring $(OPT_DSD), $(CFLAGS)))
|
|
24 |
+ifneq (,$(findstring $(OPT_DSD), $(OPTS)))
|
|
25 |
SOURCES += $(SOURCES_DSD)
|
|
26 |
endif
|
|
27 |
-ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
|
|
28 |
+ifneq (,$(findstring $(OPT_FF), $(OPTS)))
|
|
29 |
SOURCES += $(SOURCES_FF)
|
|
30 |
endif
|
|
31 |
-ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
|
|
32 |
+ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS)))
|
|
33 |
SOURCES += $(SOURCES_RESAMPLE)
|
|
34 |
endif
|
|
35 |
-ifneq (,$(findstring $(OPT_VIS), $(CFLAGS)))
|
|
36 |
+ifneq (,$(findstring $(OPT_VIS), $(OPTS)))
|
|
37 |
SOURCES += $(SOURCES_VIS)
|
|
38 |
endif
|
|
39 |
|
|
40 |
# add optional link options
|
|
41 |
-ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
|
|
42 |
- LDFLAGS += $(LINKALL)
|
|
43 |
-ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
|
|
44 |
- LDFLAGS += $(LINKALL_FF)
|
|
45 |
+ifneq (,$(findstring $(OPT_LINKALL), $(OPTS)))
|
|
46 |
+ LDADD += $(LINKALL)
|
|
47 |
+ifneq (,$(findstring $(OPT_FF), $(OPTS)))
|
|
48 |
+ LDADD += $(LINKALL_FF)
|
|
49 |
endif
|
|
50 |
-ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
|
|
51 |
- LDFLAGS += $(LINKALL_RESAMPLE)
|
|
52 |
+ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS)))
|
|
53 |
+ LDADD += $(LINKALL_RESAMPLE)
|
|
54 |
endif
|
|
55 |
else
|
|
56 |
# if not LINKALL and linux add LINK_LINUX
|
|
57 |
ifeq ($(UNAME), Linux)
|
|
58 |
- LDFLAGS += $(LINK_LINUX)
|
|
59 |
+ LDADD += $(LINK_LINUX)
|
|
60 |
endif
|
|
61 |
endif
|
|
62 |
|
|
63 |
@@ -65,12 +65,12 @@ OBJECTS = $(SOURCES:.c=.o)
|
|
64 |
all: $(EXECUTABLE)
|
|
65 |
|
|
66 |
$(EXECUTABLE): $(OBJECTS)
|
|
67 |
- $(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
|
68 |
+ $(CC) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $@
|
|
69 |
|
20 | 70 |
$(OBJECTS): $(DEPS)
|
21 | 71 |
|
22 | 72 |
.c.o:
|
23 | |
- $(CC) $(CFLAGS) $< -c -o $@
|
24 | |
+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
|
|
73 |
- $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
|
|
74 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTS) $< -c -o $@
|
25 | 75 |
|
26 | 76 |
clean:
|
27 | 77 |
rm -f $(OBJECTS) $(EXECUTABLE)
|