Patch from Chris Jaeger that makes turning on and off options in the makefile
a bit less error prone by calling 'strip' on makefile vars before performing truth tests against them.
This commit is contained in:
parent
af4ac77d9d
commit
76c5e60d54
12
Makefile
12
Makefile
@ -101,18 +101,18 @@ OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&
|
|||||||
|
|
||||||
WARNINGS = -Wall
|
WARNINGS = -Wall
|
||||||
|
|
||||||
ifeq ($(DOLFS),true)
|
ifeq ($(strip $(DOLFS)),true)
|
||||||
# For large file summit support
|
# For large file summit support
|
||||||
CFLAGS+=-D_FILE_OFFSET_BITS=64
|
CFLAGS+=-D_FILE_OFFSET_BITS=64
|
||||||
endif
|
endif
|
||||||
ifeq ($(DODMALLOC),true)
|
ifeq ($(strip $(DODMALLOC)),true)
|
||||||
# For testing mem leaks with dmalloc
|
# For testing mem leaks with dmalloc
|
||||||
CFLAGS+=-DDMALLOC
|
CFLAGS+=-DDMALLOC
|
||||||
LIBRARIES = -ldmalloc
|
LIBRARIES = -ldmalloc
|
||||||
# Force debug=true, since this is useless when not debugging...
|
# Force debug=true, since this is useless when not debugging...
|
||||||
DODEBUG = true
|
DODEBUG = true
|
||||||
endif
|
endif
|
||||||
ifeq ($(DODEBUG),true)
|
ifeq ($(strip $(DODEBUG)),true)
|
||||||
CFLAGS += $(WARNINGS) -g -D_GNU_SOURCE
|
CFLAGS += $(WARNINGS) -g -D_GNU_SOURCE
|
||||||
LDFLAGS += -Wl,-warn-common
|
LDFLAGS += -Wl,-warn-common
|
||||||
STRIP =
|
STRIP =
|
||||||
@ -121,7 +121,7 @@ else
|
|||||||
LDFLAGS += -s -Wl,-warn-common
|
LDFLAGS += -s -Wl,-warn-common
|
||||||
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
|
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
|
||||||
endif
|
endif
|
||||||
ifeq ($(DOSTATIC),true)
|
ifeq ($(strip $(DOSTATIC)),true)
|
||||||
LDFLAGS += --static
|
LDFLAGS += --static
|
||||||
#
|
#
|
||||||
#use '-ffunction-sections -fdata-sections' and '--gc-sections' (if they
|
#use '-ffunction-sections -fdata-sections' and '--gc-sections' (if they
|
||||||
@ -147,7 +147,7 @@ endif
|
|||||||
#
|
#
|
||||||
# Work in progress by <ldoolitt@recycle.lbl.gov>.
|
# Work in progress by <ldoolitt@recycle.lbl.gov>.
|
||||||
# If it gets in your way, set DISABLE_VPATH=yes
|
# If it gets in your way, set DISABLE_VPATH=yes
|
||||||
ifeq ($(DISABLE_VPATH),yes)
|
ifeq ($(strip $(DISABLE_VPATH)),yes)
|
||||||
CONFIG_H = Config.h
|
CONFIG_H = Config.h
|
||||||
else
|
else
|
||||||
VPATH = .:$(BB_SRC_DIR)
|
VPATH = .:$(BB_SRC_DIR)
|
||||||
@ -164,7 +164,7 @@ ifdef BB_INIT_SCRIPT
|
|||||||
CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
|
CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(USE_SYSTEM_PWD_GRP),true)
|
ifneq ($(strip $(USE_SYSTEM_PWD_GRP)),true)
|
||||||
PWD_LIB = pwd_grp/libpwd.a
|
PWD_LIB = pwd_grp/libpwd.a
|
||||||
LIBRARIES += $(PWD_LIB)
|
LIBRARIES += $(PWD_LIB)
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user