Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4950 dpurdie 1
###############################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
3
#
4
# File:         TOOLSET/AVR32_GNU.rul[e]
5
# Contents:     Rules as used for the AVR32_GNU
6
#               Make definitions for the AVR32_GNU tools.
7
#
8
# Description:
9
#       This file provides Toolset definitions for the target makefiles
10
#       The file is dropped into the top of the generated platform specfic makefile
11
#
12
###############################################################################
13
 
14
toolset = avr32_gnu
15
 
16
o       = obj
17
s       = asm
18
a       = lib
19
exe     = bin
20
 
21
.SUFFIXES:  .asm
22
.PHONY:     avr32
23
 
24
#
25
#   Ensure that the compiler can be found
26
#   Use the environment varibales
27
#       GBE_AVR32_GNU - Root of the compiler
28
#
29
ifndef GBE_AVR32_GNU
30
    GBE_AVR32_GNU := /opt/avr32-gnu-toolchain-linux_x86
31
    export GBE_AVR32_GNU
32
endif
33
 
34
#
35
#   Toolset Init Rule
36
#   Ensure that the toolchain is present and correct version
37
#
38
avr32:
39
	@$(echo) [Toolset AVR32 - GNU]
40
	$(AA_PRE)if [ -z "$$GBE_AVR32_GNU" ]; then \
41
        $(echo) "$(GBE_MACHTYPE)] (E) GBE_AVR32_GNU env var not set";\
42
        exit 2;\
43
    fi
44
	$(AA_PRE)if [ ! -d "$$GBE_AVR32_GNU" ]; then \
45
        $(echo) "$(GBE_MACHTYPE)] (E) GBE_AVR32_GNU directory not found ($$GBE_AVR32_GNU). Compiler not available";\
46
        exit 2;\
47
    fi
48
	$(AA_PRE)if [ "$(GCC_EVERSION)" != "$(GCC_VERSION)" ] ; then \
49
	    $(echo) "[$(GBE_MACHTYPE)] (E) GCC version is not correct."; \
50
	    $(echo) "[$(GBE_MACHTYPE)] (E) Expecting:\"$(GCC_EVERSION)\". Got:\"$(GCC_VERSION)\"."; \
51
	    exit 1; \
52
	fi
53
	$(AA_PRE)if [ "$(GCC_EMACHINE)" != "$(GCC_MACHINE)" ] ; then \
54
	    $(echo) "[$(GBE_MACHTYPE)] (E) GCC machine type is not correct.";\
55
	    $(echo) "[$(GBE_MACHTYPE)] (E) Expecting:\"$(GCC_EMACHINE)\". Got:\"$(GCC_MACHINE)\".";\
56
	    exit 1; \
57
	fi
58
 
59