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")
# 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
# 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
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/' \
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:=
# Put user-supplied flags at the end, where they
# have a chance of winning.
-CFLAGS += $(CFLAGS_EXTRA)
+-include $(top_builddir)/.config.mak
#------------------------------------------------------------
# Installation options