diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-03-10 19:54:47 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-03-10 19:54:47 +0000 |
commit | 772d4ae26849ed25e903107a56a8dd07da036048 (patch) | |
tree | cb68755a167c55ed5ad7eefe0d2dc42ccd47b4dc | |
parent | c1e2cc01ee779e3c47c83fc575083e72d1f42d22 (diff) | |
download | OSELAS.Toolchain-772d4ae26849ed25e903107a56a8dd07da036048.tar.gz OSELAS.Toolchain-772d4ae26849ed25e903107a56a8dd07da036048.tar.xz |
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@2157 f8d472c7-5700-0410-ac5a-87979cec3adf
-rw-r--r-- | rules/newlib.in | 12 | ||||
-rw-r--r-- | rules/newlib.make | 133 |
2 files changed, 145 insertions, 0 deletions
diff --git a/rules/newlib.in b/rules/newlib.in new file mode 100644 index 0000000..981d85f --- /dev/null +++ b/rules/newlib.in @@ -0,0 +1,12 @@ +menuconfig NEWLIB + bool + select CROSS_GCC_FIRST + prompt "newlib " + +config NEWLIB_VERSION + depends on NEWLIB + string + prompt "newlib version" + default "1.15.0" + help + Specify the newlib version here. diff --git a/rules/newlib.make b/rules/newlib.make new file mode 100644 index 0000000..85d39bf --- /dev/null +++ b/rules/newlib.make @@ -0,0 +1,133 @@ +# -*-makefile-*- +# $Id$ +# +# Copyright (C) 2007 by Sascha Hauer +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_NEWLIB) += newlib + +# +# Paths and names +# +NEWLIB_VERSION := $(call remove_quotes,$(PTXCONF_NEWLIB_VERSION)) +NEWLIB := newlib-$(NEWLIB_VERSION) +NEWLIB_SUFFIX := tar.gz +NEWLIB_URL := ftp://sources.redhat.com/pub/newlib/$(NEWLIB).$(NEWLIB_SUFFIX) +NEWLIB_SOURCE := $(SRCDIR)/$(NEWLIB).$(NEWLIB_SUFFIX) +NEWLIB_DIR := $(BUILDDIR_DEBUG)/$(NEWLIB) +NEWLIB_BUILDDIR := $(BUILDDIR)/$(NEWLIB)-build + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +newlib_get: $(STATEDIR)/newlib.get + +$(STATEDIR)/newlib.get: $(newlib_get_deps_default) + @$(call targetinfo, $@) + @$(call touch, $@) + +$(NEWLIB_SOURCE): + @$(call targetinfo, $@) + @$(call get, NEWLIB) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +newlib_extract: $(STATEDIR)/newlib.extract + +$(STATEDIR)/newlib.extract: $(newlib_extract_deps_default) + @$(call targetinfo, $@) + @$(call clean, $(NEWLIB_DIR)) + @$(call clean, $(NEWLIB_BUILDDIR)) + @$(call extract, NEWLIB, $(BUILDDIR_DEBUG)) + @$(call patchin, NEWLIB, $(NEWLIB_DIR)) + mkdir -p $(NEWLIB_BUILDDIR) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +newlib_prepare: $(STATEDIR)/newlib.prepare + +NEWLIB_PATH := PATH=$(CROSS_PATH) +NEWLIB_ENV := \ + CC_FOR_BUILD=$(HOSTCC) \ + $(PTXCONF_NEWLIB_EXTRA_ENV) + +# +# autoconf +# + +NEWLIB_AUTOCONF := \ + --prefix=$(SYSROOT) \ + --build=$(GNU_BUILD) \ + --target=$(PTXCONF_GNU_TARGET) \ + --disable-shared \ + --disable-newlib-supplied-syscalls \ + --with-newlib + +# --host=$(PTXCONF_GNU_TARGET) \ + +$(STATEDIR)/newlib.prepare: $(newlib_prepare_deps_default) + @$(call targetinfo, $@) + cd $(NEWLIB_BUILDDIR) && eval \ + $(NEWLIB_ENV) $(NEWLIB_PATH) \ + $(NEWLIB_DIR)/configure $(NEWLIB_AUTOCONF) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +newlib_compile: $(STATEDIR)/newlib.compile + +$(STATEDIR)/newlib.compile: $(newlib_compile_deps_default) + @$(call targetinfo, $@) + cd $(NEWLIB_BUILDDIR) && $(NEWLIB_PATH) \ + $(MAKE) $(PARALLELMFLAGS) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +newlib_install: $(STATEDIR)/newlib.install + +$(STATEDIR)/newlib.install: $(newlib_install_deps_default) + @$(call targetinfo, $@) + cd $(NEWLIB_BUILDDIR) && \ + $(NEWLIB_PATH) $(MAKE) install + rm -rf $(SYSROOT)/usr + mv $(SYSROOT)/$(PTXCONF_GNU_TARGET) $(SYSROOT)/usr + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +newlib_targetinstall: $(STATEDIR)/newlib.targetinstall + +$(STATEDIR)/newlib.targetinstall: $(newlib_targetinstall_deps_default) + @$(call targetinfo, $@) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +newlib_clean: + rm -rf $(STATEDIR)/newlib.* + rm -rf $(NEWLIB_DIR) + +# vim: syntax=make |