Codebase list squeezelite / 866adb8
Refresh Makefile-tweaks.patch for rewritten Makefile Chris Boot 10 years ago
2 changed file(s) with 60 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
00 squeezelite (1.4-1) UNRELEASED; urgency=low
11
22 * New upstream release.
3 * Refresh Makefile-tweaks.patch for rewritten Makefile.
34 * Enable full hardening build flags:
45 - Add DEB_BUILD_MAINT_OPTIONS := hardening=+all
5 - Strip -fPIC from Makefile
66 * Add squeezelite-pa compiled with PortAudio instead of ALSA
77 - Add new squeezelite-pa binary package
88 - Add Build-Depends on portaudio19-dev
33 used when building C source.
44 Author: Chris Boot <debian@bootc.net>
55 Forwarded: not-needed
6 Last-Update: 2013-12-08
6 Last-Update: 2013-12-28
77
8 --- a/Makefile
9 +++ b/Makefile
8 --- squeezelite-1.4.orig/Makefile
9 +++ squeezelite-1.4/Makefile
1010 @@ -1,6 +1,6 @@
1111 # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
1212 -CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
1313 -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
1616 EXECUTABLE ?= squeezelite
1717
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
2070 $(OBJECTS): $(DEPS)
2171
2272 .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 $@
2575
2676 clean:
2777 rm -f $(OBJECTS) $(EXECUTABLE)