linux: bump default version to 4.10.5
[buildroot-gz.git] / package / squeezelite / 0001-Makefile-allow-passing-CFLAGS-and-LDFLAGS.patch
blob2f002a80bc5d3f28a16994c1ca14af0418465562
1 From a0f2e79d1373967dac9f3df4c500a71cd1b96b2b Mon Sep 17 00:00:00 2001
2 From: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
3 Date: Sun, 7 Feb 2016 18:04:53 +0100
4 Subject: [PATCH] Makefile: allow passing CFLAGS and LDFLAGS
6 This patch is applied to squeezelite Makefile to add override
7 directive for CFLAGS and LDFLAGS assignment.
8 This enables adding flags to CFLAGS and LDFLAGS in Makefile.
10 Signed-off-by: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
11 ---
12 Makefile | 12 +++++++-----
13 1 file changed, 7 insertions(+), 5 deletions(-)
15 diff --git a/Makefile b/Makefile
16 index dca2abd..286c725 100644
17 --- a/Makefile
18 +++ b/Makefile
19 @@ -1,4 +1,6 @@
20 # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
21 +override CFLAGS += $(OPTS)
22 +override LDFLAGS += -lasound -lpthread -lm -lrt
23 CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
24 LDFLAGS ?= -lasound -lpthread -lm -lrt
25 EXECUTABLE ?= squeezelite
26 @@ -52,20 +54,20 @@ endif
28 # add optional link options
29 ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
30 - LDFLAGS += $(LINKALL)
31 + override LDFLAGS += $(LINKALL)
32 ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
33 - LDFLAGS += $(LINKALL_FF)
34 + override LDFLAGS += $(LINKALL_FF)
35 endif
36 ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
37 - LDFLAGS += $(LINKALL_RESAMPLE)
38 + override LDFLAGS += $(LINKALL_RESAMPLE)
39 endif
40 ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
41 - LDFLAGS += $(LINKALL_IR)
42 + override LDFLAGS += $(LINKALL_IR)
43 endif
44 else
45 # if not LINKALL and linux add LINK_LINUX
46 ifeq ($(UNAME), Linux)
47 - LDFLAGS += $(LINK_LINUX)
48 + override LDFLAGS += $(LINK_LINUX)
49 endif
50 endif
52 --
53 2.6.4