diff options
Diffstat (limited to 'busybox/Rules.mak')
-rw-r--r-- | busybox/Rules.mak | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/busybox/Rules.mak b/busybox/Rules.mak index 1d917c2..c46855a 100644 --- a/busybox/Rules.mak +++ b/busybox/Rules.mak @@ -81,12 +81,12 @@ BB_SRC_DIR= WARNINGS=-Wall -Wstrict-prototypes -Wshadow CFLAGS=-I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) -ARFLAGS=-r +ARFLAGS=cru #-------------------------------------------------------- export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP ifeq ($(strip $(TARGET_ARCH)),) -TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \ +TARGET_ARCH:=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \ -e 's/i.86/i386/' \ -e 's/sparc.*/sparc/' \ -e 's/arm.*/arm/g' \ @@ -109,14 +109,22 @@ endif check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \ then echo "$(1)"; else echo "$(2)"; fi) +# Setup some shortcuts so that silent mode is silent like it should be +ifeq ($(subst s,,$(MAKEFLAGS)),$(MAKEFLAGS)) +export MAKE_IS_SILENT=n +SECHO=@echo +else +export MAKE_IS_SILENT=y +SECHO=-@false +endif + #-------------------------------------------------------- # Arch specific compiler optimization stuff should go here. # Unless you want to override the defaults, do not set anything # for OPTIMIZATION... # use '-Os' optimization if available, else use -O2 -OPTIMIZATION= -OPTIMIZATION=${call check_gcc,-Os,-O2} +OPTIMIZATION:=${call check_gcc,-Os,-O2} # Some nice architecture specific optimizations ifeq ($(strip $(TARGET_ARCH)),arm) @@ -158,8 +166,8 @@ ifeq ($(strip $(CONFIG_DEBUG)),y) STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging else CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG - LDFLAGS += -s -Wl,-warn-common - STRIPCMD:=$(STRIP) --remove-section=.note --remove-section=.comment + LDFLAGS += -Wl,-warn-common + STRIPCMD:=$(STRIP) -s --remove-section=.note --remove-section=.comment endif ifeq ($(strip $(CONFIG_STATIC)),y) LDFLAGS += --static @@ -190,7 +198,3 @@ endif CFLAGS += $(CFLAGS_EXTRA) .PHONY: dummy - - -.EXPORT_ALL_VARIABLES: - |