Merge branch 'mm/makefile-developer-can-be-in-config-mak'
"make DEVELOPER=1" worked as expected; setting DEVELOPER=1 in config.mak didn't. * mm/makefile-developer-can-be-in-config-mak: Makefile: add $(DEVELOPER_CFLAGS) variable Makefile: move 'ifdef DEVELOPER' after config.mak* inclusion
This commit is contained in:
17
Makefile
17
Makefile
@ -375,13 +375,7 @@ GIT-VERSION-FILE: FORCE
|
|||||||
# CFLAGS and LDFLAGS are for the users to override from the command line.
|
# CFLAGS and LDFLAGS are for the users to override from the command line.
|
||||||
|
|
||||||
CFLAGS = -g -O2 -Wall
|
CFLAGS = -g -O2 -Wall
|
||||||
LDFLAGS =
|
DEVELOPER_CFLAGS = -Werror \
|
||||||
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
|
|
||||||
ALL_LDFLAGS = $(LDFLAGS)
|
|
||||||
STRIP ?= strip
|
|
||||||
|
|
||||||
ifdef DEVELOPER
|
|
||||||
CFLAGS += -Werror \
|
|
||||||
-Wdeclaration-after-statement \
|
-Wdeclaration-after-statement \
|
||||||
-Wno-format-zero-length \
|
-Wno-format-zero-length \
|
||||||
-Wold-style-definition \
|
-Wold-style-definition \
|
||||||
@ -390,7 +384,10 @@ CFLAGS += -Werror \
|
|||||||
-Wstrict-prototypes \
|
-Wstrict-prototypes \
|
||||||
-Wunused \
|
-Wunused \
|
||||||
-Wvla
|
-Wvla
|
||||||
endif
|
LDFLAGS =
|
||||||
|
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
|
||||||
|
ALL_LDFLAGS = $(LDFLAGS)
|
||||||
|
STRIP ?= strip
|
||||||
|
|
||||||
# Create as necessary, replace existing, make ranlib unneeded.
|
# Create as necessary, replace existing, make ranlib unneeded.
|
||||||
ARFLAGS = rcs
|
ARFLAGS = rcs
|
||||||
@ -951,6 +948,10 @@ include config.mak.uname
|
|||||||
-include config.mak.autogen
|
-include config.mak.autogen
|
||||||
-include config.mak
|
-include config.mak
|
||||||
|
|
||||||
|
ifdef DEVELOPER
|
||||||
|
CFLAGS += $(DEVELOPER_CFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef sysconfdir
|
ifndef sysconfdir
|
||||||
ifeq ($(prefix),/usr)
|
ifeq ($(prefix),/usr)
|
||||||
sysconfdir = /etc
|
sysconfdir = /etc
|
||||||
|
Reference in New Issue
Block a user