Decouple DODEBUG and DOSTATIC

This commit is contained in:
Eric Andersen 2000-09-21 22:26:02 +00:00
parent c873d61008
commit 2c1faecba7

View File

@ -93,21 +93,20 @@ else
CFLAGS += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE CFLAGS += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
LDFLAGS += -s LDFLAGS += -s
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG) STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
#Only staticly link when _not_ debugging endif
ifeq ($(DOSTATIC),true) ifeq ($(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
# work) to try and strip out any unused junk. Doesn't do much for me, # work) to try and strip out any unused junk. Doesn't do much for me,
# but you may want to give it a shot... # but you may want to give it a shot...
# #
#ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \ #ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \
# -o /dev/null -xc /dev/null 2>/dev/null && $(LD) \ # -o /dev/null -xc /dev/null 2>/dev/null && $(LD) \
# --gc-sections -v >/dev/null && echo 1),1) # --gc-sections -v >/dev/null && echo 1),1)
# CFLAGS += -ffunction-sections -fdata-sections # CFLAGS += -ffunction-sections -fdata-sections
# LDFLAGS += --gc-sections # LDFLAGS += --gc-sections
#endif #endif
endif
endif endif
ifndef $(PREFIX) ifndef $(PREFIX)