lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

005-respect_LDFLAGS.patch (1523B)


      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
      5 
      6 ---
      7  Makefile | 17 +++++++++--------
      8  1 file changed, 9 insertions(+), 8 deletions(-)
      9 
     10 --- a/Makefile
     11 +++ b/Makefile
     12 @@ -1,6 +1,7 @@
     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
     16 +CFLAGS  ?= -Wall -O2
     17 +CFLAGS  += -fPIC $(OPTS)
     18 +LIBS ?= -lasound -lpthread -lm -lrt
     19  EXECUTABLE ?= squeezelite
     20  
     21  # passing one or more of these in $(OPTS) enables optional feature inclusion
     22 @@ -52,20 +53,20 @@ endif
     23  
     24  # add optional link options
     25  ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
     26 -	LDFLAGS += $(LINKALL)
     27 +	LIBS += $(LINKALL)
     28  ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
     29 -	LDFLAGS += $(LINKALL_FF)
     30 +	LIBS += $(LINKALL_FF)
     31  endif
     32  ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
     33 -	LDFLAGS += $(LINKALL_RESAMPLE)
     34 +	LIBS += $(LINKALL_RESAMPLE)
     35  endif
     36  ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
     37 -	LDFLAGS += $(LINKALL_IR)
     38 +	LIBS += $(LINKALL_IR)
     39  endif
     40  else
     41  # if not LINKALL and linux add LINK_LINUX
     42  ifeq ($(UNAME), Linux)
     43 -	LDFLAGS += $(LINK_LINUX)
     44 +	LIBS += $(LINK_LINUX)
     45  endif
     46  endif
     47  
     48 @@ -74,7 +75,7 @@ OBJECTS = $(SOURCES:.c=.o)
     49  all: $(EXECUTABLE)
     50  
     51  $(EXECUTABLE): $(OBJECTS)
     52 -	$(CC) $(OBJECTS) $(LDFLAGS) -o $@
     53 +	$(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@
     54  
     55  $(OBJECTS): $(DEPS)
     56