Commit 2a47450d authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

Makefile.lite: Pick up `CFLAGS` from the environment

This allows extra CFLAGS to be set on the command line. Eg

     CFLAGS=Werror make -f Makefile.lite
parent 912bff44
......@@ -47,12 +47,10 @@ PROGRAM = $(BINPATH)/$(PROGRAM_NAME)
DEBUG_PROGRAM = $(DEBUG_BINPATH)/$(PROGRAM_NAME)
RELEASE_PROGRAM = $(RELEASE_BINPATH)/$(PROGRAM_NAME)
debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -W -Wall -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
debug : CFLAGS := -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -Wall -Wextra $(CFLAGS) -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS := -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -Wall -Wextra $(CFLAGS)-DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS := -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -Wextra $(CFLAGS) -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
CFLAGS = $(CFLAGS) -Wmissing-prototypes -Wstrict-prototypes
CXXFLAGS = $(CFLAGS)
LFLAGS = -L$(LIBPATH)
......
......@@ -66,12 +66,9 @@ else
LINKD = $(CC) -shared
endif
debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -W -Wall -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -W -Wall -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
CFLAGS = $(CFLAGS) -Wmissing-prototypes -Wstrict-prototypes
CXXFLAGS = $(CFLAGS)
debug : CFLAGS := -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -Wall -Wextra $(CFLAGS) -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS := -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -Wall -Wextra $(CFLAGS) -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS := -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -Wextra $(CFLAGS) -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
LFLAGS = -L$(LIBPATH)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment