Subversion Repositories avr32-toolchain

Compare Revisions

Ignore whitespace Rev 20 → Rev 21

/branches/try_gdb/ReleaseNotes
1,3 → 1,9
try_gdb_0_6_0 (jjessich on Mon Apr 09 23:45:23 CEST 2012):
+ Added more description.
+ Support a release build with default to /opt/avr/avr32-tools.
+ Support building the tools fully static linked.
+ Added additional environment variables for configure and build step.
 
try_gdb_0_5_0 (jjessich on Mon Apr 09 00:42:21 CEST 2012):
+ Added description.
+ Simplify maintainer mode and regenerating.
/branches/try_gdb/Makefile
23,16 → 23,36
# This Makefile is based on the one from here:
# https://github.com/jsnyder/avr32-toolchain/blob/master/Makefile
# Copyright (C) 2011 by James Snyder <jbsnyder@fanplastic.org>
#
 
 
 
###############################################################################
#
# This makefile uses macros to generate the different rules for the different
# tools. This saves a lot of work, when a new tool is added. Moreover, bugfixes
# have to be done only one place.
# The origial version couldn't handle delta building of parts, which is
# required during patch development. I didn't want to fix all the different
# make steps seperately. So I decided to use an new approach, which I never
# tried before. I used make macros to generate the different rules for the
# different tools.
# This saved me a lot of work, when a new tool is added. Moreover, bugfixes
# have to be done only one place. Enhancments of the targets need to be done
# on only one place.
# The drawback of this approach is a little mor complexity when writing shell
# scripts within the make macro. You need a lot of '$' for escaping.
#
# I have tested most of the targets with a lot of compinations, but there might
# one which is not working. Please send me a bug report, if you find such a
# combination.
#
# The development SVN repository can be found at
# http://web.anw.at/websvn/listing.php?repname=avr32-toolchain
#
# NOTE: Currently ONLY binutils is finished!
#
###############################################################################
 
 
 
#### PRIMARY TOOLCHAIN VERSIONS #####
 
GCC_VERSION = 4.4.3
55,6 → 75,8
GIT_REV = $(shell git rev-parse --verify HEAD --short 2> /dev/null)
SVN_REV = $(shell head -1 ReleaseNotes 2> /dev/null | cut -f 1 -d " ")
 
PREFIX_RELEASE ?= /opt/avr/avr32-tools
 
ifeq ($(strip $(GIT_REV)),)
ifeq ($(strip $(SVN_REV)),)
PREFIX ?= $(HOME)/avr32-tools-$(TODAY)
77,6 → 99,19
PROCS ?= 2
endif
 
 
RELEASE_VERSION ?= no
PREFIX_RELEASE ?= /opt/avr/avr32-tools
 
ifneq ($(RELEASE_VERSION),no)
FULL_STATIC = y
PREFIX = $(PREFIX_RELEASE)-$(RELEASE_VERSION)
endif
 
 
# enable complete static linking
FULL_STATIC ?= no
 
# enable maintainer-mode with yes
M_MODE ?= no
 
128,7 → 163,7
 
NEWPATCHESBINUTILS_ARCHIVE = binutils-2.22-avr32-full.patch
NEWPATCHESBINUTILS_URL=http://avr.anw.at/avr32/patches/binutils/2_22/$(NEWPATCHESBINUTILS_ARCHIVE)
NEWPATCHESBINUTILS_MD5 = aca9dd1aaeda63fa1a0cc4c68b94fa6f
NEWPATCHESBINUTILS_MD5 = 09c091b9acb369fd39fb21d0334bb9a6
install_dir_newpatchesbinutils := source/avr32/binutils
 
AVR32HEADERS_ARCHIVE = avr32-headers-$(AVR_HEADER_REV).zip
216,7 → 251,7
endef
 
## delete all empty directories
## need to do this several times. to remove empty sub directories
## need to do this several times to remove all empty sub directories
define del_all_empty-directories
$(call del_empty-directories)
$(call del_empty-directories)
357,18 → 392,19
 
## create the configure rule and force configure rule
define CONF_template
conf-$(1)_TEXT := "Configuring $(1) $$($(1)_VERSION)"
conf-$(1): $(call name_stamp,conf-$(1))
 
# we need configure parameters!
ifeq ($$(strip $$($(1)_conf_opts)),)
$$(error "Configure options '$(1)_conf_opts' not defined")
endif
 
conf-$(1)_TEXT := "Configuring $(1) $$($(1)_VERSION)"
conf-$(1): $(call name_stamp,conf-$(1))
 
conf-$(1)-f $(call name_stamp,conf-$(1)): $(call name_stamp,$(2)-$(1)) $$($(1)_conf_deps)
@(rm -rf $(BUILD_DIR)/$(1) ; mkdir -p $(BUILD_DIR)/$(1))
$(call quiet_text,$$(conf-$(1)_TEXT))
cd $(BUILD_DIR)/$(1) && \
$$($(1)_conf_env) \
../../$(1)-$$($(1)_VERSION)/configure $$($(1)_conf_opts)
$(call make_stamp,conf-$(1))
 
395,6 → 431,7
$(call name_stamp,build-$(1)): $(call name_stamp,conf-$(1))
$(call quiet_text,$$(build-$(1)_TEXT))
cd $(BUILD_DIR)/$(1) && \
$$($(1)_build_env) \
$$($(1)_build_cmds)
$(call make_stamp,build-$(1))
 
577,7 → 614,7
 
$(eval $(call DOWNLOAD_template,binutils))
$(eval $(call EXTRACT_template,binutils,EXT_BZ2))
binutils_patch_level := -p1
#binutils_patch_level := -p1
$(eval $(call PATCH_template,binutils))
binutils_regen_dirs := bfd opcodes binutils gas ld
$(eval $(call REGEN_template,binutils,patch))
586,6 → 623,7
binutils_maintainer_mode := --enable-maintainer-mode
endif
 
# do not add a ' ' between after ":="
ifneq ($(BINUTILS_REGEN),no)
binutils_conf_depend :=regen
else
600,10 → 638,14
--with-pkgversion=$(PKG_VERSION) \
--with-sysroot="$(PREFIX)/$(TARGET)"
# --with-bugurl=$(BUG_URL)
$(eval $(call CONF_template,binutils,$(binutils_conf_depend)))
 
$(eval $(call CONF_template,binutils,$(binutils_conf_depend)))
ifneq ($(FULL_STATIC),no)
binutils_fulls_static := AM_LDFLAGS=-all-static
endif
#binutils_build_cmds := ???
#binutils_build_clean_cmds := ???
binutils_build_env := $(binutils_fulls_static)
$(eval $(call BUILD_template,binutils))
$(eval $(call INSTALL_template,binutils))
$(eval $(call CLEAN_template,binutils))
614,15 → 656,11
 
 
 
.PHONY: tst tst2 tst3
.PHONY: tst
tst:
@echo "PREFIX=$(PREFIX)"
@echo "PKG_VERSION=$(PKG_VERSION)"
@echo "BUG_URL=$(BUG_URL)"
tst2:
$(call make_stamp,JES)
tst3:
$(call rm_stamp,JES)
 
.PHONY: help
help:
661,11 → 699,17
@echo "And the package version with"
@echo " PKG_VERSION=\"AVR 32 bit GNU Toolchain-XXX\""
@echo ""
@echo "Build a full static release with"
@echo " RELEASE_VERSION=0.1.0"
@echo "The prefix for the release can changed with"
@echo " PREFIX_RELEASE=/usr/local/avr/avr32-tools"
@echo ""
@echo "Maintainers may use"
@echo " M_MODE=y or BINUTILS_REGEN=y"
@echo " M_MODE=y, BINUTILS_REGEN=y, FULL_STATIC=y"
@echo "Please have a look to the Makefile for details"
@echo ""
 
# do not remove the empty line, will add the required \n
define print_target
@echo "$(1)"