| 227 |
dpurdie |
1 |
# -*- mode: mak; -*-
|
|
|
2 |
###############################################################################
|
|
|
3 |
# File: TOOLSET/gnupro_h8.def
|
|
|
4 |
# Contents: GnuPro H8 defines
|
|
|
5 |
###############################################################################
|
|
|
6 |
|
|
|
7 |
toolset = gnupro_h8
|
|
|
8 |
s = asm
|
|
|
9 |
o = o
|
|
|
10 |
a = a
|
|
|
11 |
exe =
|
|
|
12 |
|
|
|
13 |
.SUFFIXES: .asm
|
|
|
14 |
|
|
|
15 |
#
|
|
|
16 |
# Toolset global variables
|
|
|
17 |
# GNUPROH8 - Root of the GnuPro Toolkit (From Environment)
|
|
|
18 |
# GnuProDir - Root of the GnuPro Toolkit (Make format)
|
|
|
19 |
# H8Dir - Root of the H8 compiler
|
|
|
20 |
#
|
|
|
21 |
GnuProDir := $(subst \,/,$(strip $(GNUPROH8)))
|
|
|
22 |
H8Dir := $(GnuProDir)/Tools/Cygnus
|
|
|
23 |
|
|
|
24 |
#
|
|
|
25 |
# Ensure that the tools are available
|
|
|
26 |
#
|
|
|
27 |
.PHONY: gnupro_h8
|
|
|
28 |
gnupro_h8:
|
|
|
29 |
@$(echo) [Toolset GnuPro H8::$(GnuProDir)]; \
|
|
|
30 |
[ -z "$$GNUPROH8" ] && echo GNUPROH8 env var not set && exit 2; \
|
|
|
31 |
if [ ! -d "$(GnuProDir)" ] ; then echo GnuPro Directory not found: $(GnuProDir); exit 2; fi; \
|
|
|
32 |
if [ ! -d "$(H8Dir)" ] ; then echo H8 Compiler directory not found: $(H8Dir); exit 2; fi; \
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
#
|
|
|
36 |
# Add the compiler toolkit to the PATH
|
|
|
37 |
#
|
|
|
38 |
ifeq "$(findstring $(PATH),$(GNUPROH8))" ""
|
|
|
39 |
PATH := $(H8Dir)/Bin;$(H8Dir)/Utils;$(PATH)
|
|
|
40 |
export PATH
|
|
|
41 |
endif
|
|
|
42 |
|
|
|
43 |
#
|