Description: Makefile tweaks for hardening build options
This patch changes the Makefile to add options to CFLAGS and LDFLAGS instead of
overriding the values from the environment, and ensures that CPPFLAGS is also
used when building C source.
Author: Chris Boot <debian@bootc.net>
Forwarded: not-needed
Last-Update: 2013-12-08
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
-CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
-LDFLAGS ?= -lasound -lpthread -lm -lrt
+CFLAGS += -Wall $(OPTS)
+LDFLAGS += -lasound -lpthread -lm -lrt
EXECUTABLE ?= squeezelite
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
@@ -33,7 +33,7 @@
$(OBJECTS): $(DEPS)
.c.o:
- $(CC) $(CFLAGS) $< -c -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
clean:
rm -f $(OBJECTS) $(EXECUTABLE)