X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=Rules.mak;h=6df828c7c658a03fb75114b2a2eab871ee62081f;hb=5d8843e451c01d8abfe6b5be772637310e9e581e;hp=2f34bfbd202ff17874aac44185a41bf397ed9910;hpb=7900b7b9b9956661d536223226c462c7f48fa40a;p=oweals%2Fbusybox.git diff --git a/Rules.mak b/Rules.mak index 2f34bfbd2..6df828c7c 100644 --- a/Rules.mak +++ b/Rules.mak @@ -15,7 +15,7 @@ PROG := busybox MAJOR_VERSION :=1 MINOR_VERSION :=2 SUBLEVEL_VERSION:=0 -EXTRAVERSION :=-pre0 +EXTRAVERSION := VERSION :=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL_VERSION)$(EXTRAVERSION) BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z") @@ -24,22 +24,20 @@ BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z") # With a modern GNU make(1) (highly recommended, that's what all the # developers use), all of the following configuration values can be # overridden at the command line. For example: -# make CROSS=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app +# make CROSS_COMPILE=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app #-------------------------------------------------------- -# If you are running a cross compiler, you will want to set 'CROSS' +# If you are running a cross compiler, you will want to set CROSS_COMPILE # to something more interesting... Target architecture is determined # by asking the CC compiler what arch it compiles things for, so unless # your compiler is broken, you should not need to specify TARGET_ARCH -CROSS =$(strip $(subst ",, $(strip $(CROSS_COMPILER_PREFIX)))) -# be gentle to vi coloring.. ")) -CC = $(CROSS)gcc -AR = $(CROSS)ar -AS = $(CROSS)as -LD = $(CROSS)ld -NM = $(CROSS)nm -STRIP = $(CROSS)strip -ELF2FLT = $(CROSS)elf2flt +CC = $(CROSS_COMPILE)gcc +AR = $(CROSS_COMPILE)ar +AS = $(CROSS_COMPILE)as +LD = $(CROSS_COMPILE)ld +NM = $(CROSS_COMPILE)nm +STRIP = $(CROSS_COMPILE)strip +ELF2FLT = $(CROSS_COMPILE)elf2flt CPP = $(CC) -E SED ?= sed BZIP2 ?= bzip2 @@ -52,26 +50,6 @@ TARGET_OS=linux # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc. LC_ALL:= C -# If you want to add some simple compiler switches (like -march=i686), -# especially from the command line, use this instead of CFLAGS directly. -# For optimization overrides, it's better still to set OPTIMIZATION. -CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS))) -# be gentle to vi coloring.. ") - -# To compile vs some other alternative libc, you may need to use/adjust -# the following lines to meet your needs... -# -# If you are using Red Hat 6.x with the compatible RPMs (for developing under -# Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read about -# using the compatible RPMs (compat-*) at http://www.redhat.com ! -#LIBCDIR:=/usr/i386-glibc20-linux -# -# For other libraries, you are on your own. But these may (or may not) help... -#LDFLAGS+=-nostdlib -#LIBRARIES:=$(LIBCDIR)/lib/libc.a -lgcc -#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR) -funsigned-char -#GCCINCDIR:=$(shell gcc -print-search-dirs | $(SED) -ne "s/install: \(.*\)/\1include/gp") - # This must bind late because srcdir is reset for every source subdirectory. INCS:=-I$(top_builddir)/include -I$(top_srcdir)/include CFLAGS=$(INCS) -I$(srcdir) -D_GNU_SOURCE @@ -84,7 +62,7 @@ CC_MAJOR:=$(shell printf "%02d" $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1)) #-------------------------------------------------------- -export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP +export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS_COMPILE CC AR AS LD NM STRIP CPP ifeq ($(strip $(TARGET_ARCH)),) TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \ -e 's/i.86/i386/' \ @@ -196,6 +174,7 @@ CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wshadow,) CHECKED_CFLAGS+=$(call check_cc,$(CC),-funsigned-char,) CHECKED_CFLAGS+=$(call check_cc,$(CC),-mmax-stack-frame=256,) CHECKED_CFLAGS+=$(call check_cc,$(CC),-fno-builtin-strlen) +CHECKED_CFLAGS+=$(call check_cc,$(CC),-finline-limit=0) # Preemptively pin this too. PROG_CFLAGS:= @@ -343,7 +322,7 @@ endif # Put user-supplied flags at the end, where they # have a chance of winning. -CFLAGS += $(CFLAGS_EXTRA) +-include $(top_builddir)/.config.mak #------------------------------------------------------------ # Installation options