1 From 1c53ed7db5b49ebf347efe65dbf9b740f9d54557 Mon Sep 17 00:00:00 2001
2 From: Carlo Landmeter <clandmeter@gmail.com>
3 Date: Tue, 31 Mar 2015 09:52:53 +0000
4 Subject: [PATCH] respect LDFLAGS
7 Makefile | 17 +++++++++--------
8 1 file changed, 9 insertions(+), 8 deletions(-)
13 # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
14 -CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
15 -LDFLAGS ?= -lasound -lpthread -lm -lrt
17 +CFLAGS += -fPIC $(OPTS)
18 +LIBS ?= -lasound -lpthread -lm -lrt
19 EXECUTABLE ?= squeezelite
21 # passing one or more of these in $(OPTS) enables optional feature inclusion
22 @@ -52,20 +53,20 @@ endif
24 # add optional link options
25 ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
26 - LDFLAGS += $(LINKALL)
28 ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
29 - LDFLAGS += $(LINKALL_FF)
30 + LIBS += $(LINKALL_FF)
32 ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
33 - LDFLAGS += $(LINKALL_RESAMPLE)
34 + LIBS += $(LINKALL_RESAMPLE)
36 ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
37 - LDFLAGS += $(LINKALL_IR)
38 + LIBS += $(LINKALL_IR)
41 # if not LINKALL and linux add LINK_LINUX
42 ifeq ($(UNAME), Linux)
43 - LDFLAGS += $(LINK_LINUX)
44 + LIBS += $(LINK_LINUX)
48 @@ -74,7 +75,7 @@ OBJECTS = $(SOURCES:.c=.o)
51 $(EXECUTABLE): $(OBJECTS)
52 - $(CC) $(OBJECTS) $(LDFLAGS) -o $@
53 + $(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@