| 227 |
dpurdie |
1 |
# -*- mode: mak; -*-
|
|
|
2 |
###############################################################################
|
| 6177 |
dpurdie |
3 |
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
|
| 227 |
dpurdie |
4 |
#
|
|
|
5 |
# File: TOOLSET/mos_mri_68k.def
|
|
|
6 |
# Contents: MRI 68k rules as used for the MOS
|
|
|
7 |
#
|
|
|
8 |
# Description:
|
|
|
9 |
# MRI 68k toolset for MOS
|
|
|
10 |
# This file provides Toolset definitions for the target makefiles
|
|
|
11 |
# The file is dropped into the top of the generated platform specfic makefile
|
|
|
12 |
#
|
|
|
13 |
# This file is included to provide 68k support to the basic MOS_MRI toolset
|
|
|
14 |
#
|
|
|
15 |
# Revision History:
|
|
|
16 |
# 12-Feb-04 DDP Started Work
|
|
|
17 |
###############################################################################
|
|
|
18 |
|
|
|
19 |
toolset = mos_mri68k
|
|
|
20 |
|
|
|
21 |
o = obj
|
|
|
22 |
s = asm
|
|
|
23 |
a = lib
|
|
|
24 |
exe =
|
|
|
25 |
|
|
|
26 |
.SUFFIXES: .asm
|
|
|
27 |
.PHONY: mri mri2
|
|
|
28 |
|
|
|
29 |
#
|
|
|
30 |
# Version 5.1
|
|
|
31 |
#
|
|
|
32 |
ifeq "$(mri_ver)" "51" # Need version 5.1
|
|
|
33 |
mri:
|
| 6177 |
dpurdie |
34 |
@if [ -z "$$MRI_68K51" ]; then echo 'MRI_68K51 env var not set'; exit 2; fi; \
|
| 227 |
dpurdie |
35 |
echo -n "[Toolset mri68k - Microtec Research C 5.1, C++ 3.1, ASM 7.4 "; \
|
| 6177 |
dpurdie |
36 |
if [ -z "`$(grep) 5.1 $$MRI_68K51/version`" ]; then echo 'Not MRI_68K 5.1'; exit 2; fi;
|
| 227 |
dpurdie |
37 |
|
|
|
38 |
mri = $(subst \,/,$(strip $(MRI_68K51)))
|
|
|
39 |
|
|
|
40 |
COMPILER_HOME = $(mri)/tools
|
|
|
41 |
MRI_BIN = $(COMPILER_HOME)/bin
|
|
|
42 |
MRI_INC = $(COMPILER_HOME)/include/mcc68k
|
|
|
43 |
MRI_LIB = $(COMPILER_HOME)/lib
|
|
|
44 |
|
|
|
45 |
endif
|
|
|
46 |
|
|
|
47 |
#
|
|
|
48 |
# Version 4.5 (Rome)
|
|
|
49 |
#
|
|
|
50 |
ifeq "$(mri_ver)" "45" # Need version 4.5
|
|
|
51 |
mri:
|
|
|
52 |
@if [ -z "$$MRI_68K45" ]; then echo "[MOS_68K.DEF] (E) MRI_68K45 env var not set"; exit 2; fi; \
|
|
|
53 |
if [ -z "`$(grep) 7.1J $$MRI_68K45/version`" ]; then echo "[MOS_68K.DEF] (E) Not MRI_68K 4.5"; exit 2; fi; \
|
|
|
54 |
echo -n "[Toolset mri68k - Microtec Research C 4.5R, ASM 7.1J ";
|
|
|
55 |
|
|
|
56 |
mri = $(subst \,/,$(strip $(MRI_68K45)))
|
|
|
57 |
|
|
|
58 |
COMPILER_HOME = $(mri)
|
|
|
59 |
MRI_BIN = $(COMPILER_HOME)
|
|
|
60 |
MRI_INC = $(COMPILER_HOME)
|
|
|
61 |
MRI_LIB = $(COMPILER_HOME)/68000
|
|
|
62 |
mri_linker_lib = $(MRI_LIB)/mcc68ka5
|
|
|
63 |
|
|
|
64 |
endif
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
#
|
|
|
68 |
# Default Version
|
|
|
69 |
#
|
|
|
70 |
ifeq "$(mri_ver)" "0"
|
|
|
71 |
mri:
|
| 6177 |
dpurdie |
72 |
@if [ -z "$$MRI_68K" ]; then echo 'MRI_68K env var not set'; exit 2; fi; \
|
|
|
73 |
echo -n "[Toolset mri68k - Microtec Research C X.X]";
|
| 227 |
dpurdie |
74 |
|
|
|
75 |
mri = $(subst \,/,$(strip $(MRI_68K)))
|
|
|
76 |
|
|
|
77 |
COMPILER_HOME = $(mri)/tools
|
|
|
78 |
MRI_BIN = $(COMPILER_HOME)/bin
|
|
|
79 |
MRI_INC = $(COMPILER_HOME)/include/mcc68k
|
|
|
80 |
MRI_LIB = $(COMPILER_HOME)/lib
|
|
|
81 |
|
|
|
82 |
endif
|
|
|
83 |
|
|
|
84 |
#
|
|
|
85 |
# Unknown Version
|
|
|
86 |
#
|
|
|
87 |
ifndef mri
|
|
|
88 |
$(error ERROR: Specfied MRI_68K compiler version ($(mri_ver)) not known to toolset.)
|
|
|
89 |
endif
|
|
|
90 |
|
|
|
91 |
#
|
|
|
92 |
# Define the compiler specfic names and paths for the various tools
|
|
|
93 |
# These can be overriden by version specific init
|
|
|
94 |
#
|
|
|
95 |
#COMPILER_HOME = $(mri)/tools
|
|
|
96 |
#MRI_BIN = $(COMPILER_HOME)/bin
|
|
|
97 |
#MRI_INC = $(COMPILER_HOME)/include/mcc68k
|
|
|
98 |
#MRI_LIB = $(COMPILER_HOME)/lib
|
|
|
99 |
MRI_TMP ?= $(INTERFACEDIR)/mcc68k
|
|
|
100 |
|
|
|
101 |
mri_assembler ?= $(MRI_BIN)/asm68k
|
|
|
102 |
mri_compiler ?= $(MRI_BIN)/mcc68k
|
|
|
103 |
mri_cpp_compiler ?= $(MRI_BIN)/ccc68k
|
|
|
104 |
mri_linker ?= $(MRI_BIN)/lnk68k
|
|
|
105 |
mri_librarian ?= $(MRI_BIN)/lib68k
|
|
|
106 |
|
|
|
107 |
mri_compiler_define ?= _MCC68K
|
|
|
108 |
mri_linker_lib ?= $(MRI_LIB)/nze/mcc68ka5
|
|
|
109 |
mri_cpu_type ?= CPU32
|
|
|
110 |
mri_cpu_code ?= 68340
|
|
|
111 |
|
|
|
112 |
#
|
|
|
113 |
# Setup the compiler specfic environment variables based on the required version
|
|
|
114 |
# The compiler does not need to be in the users path as it will be fully pathed
|
|
|
115 |
#
|
|
|
116 |
# The 68k compiler has a bug. It creates temp files and does not
|
|
|
117 |
# delete the file before reusing an old one. The result is chaos.
|
|
|
118 |
# Create temp files in the 'interface' directory.
|
|
|
119 |
#
|
|
|
120 |
#
|
|
|
121 |
MRI_68K_BIN=$(MRI_BIN)
|
|
|
122 |
MRI_68K_INC=$(MRI_INC)
|
|
|
123 |
MRI_68K_LIB=$(MRI_LIB)
|
|
|
124 |
MRI_68K_TMP=$(MRI_TMP)
|
|
|
125 |
export COMPILER_HOME MRI_68K_BIN MRI_68K_LIB MRI_68K_TMP
|
|
|
126 |
|
|
|
127 |
mri2:
|
|
|
128 |
@if [ -n "$$VISIONCLICK" ]; then \
|
|
|
129 |
echo "and VisionCLICK]"; \
|
|
|
130 |
else echo "]"; fi
|
|
|
131 |
|
|
|
132 |
ifdef VISIONCLICK
|
|
|
133 |
est32 = $(subst \,/,$(strip $(VISIONCLICK)))
|
|
|
134 |
else
|
|
|
135 |
est32 = --dummy--
|
|
|
136 |
endif
|
|
|
137 |
|
| 263 |
dpurdie |
138 |
RPCGEN_CPP := $(GBE_BIN)/rpccpp.exe
|
|
|
139 |
RPCGEN_CFLAGS := -e -c
|
| 227 |
dpurdie |
140 |
export RPCGEN_CPP RPCGEN_CFLAGS
|
|
|
141 |
|
|
|
142 |
|