No Description

005-respect_LDFLAGS.patch 1.5KB

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