2012-12-03 15:13:23 +01:00
|
|
|
############################################################################
|
|
|
|
# arch/z80/src/ez80/Toolchain.defs
|
|
|
|
#
|
2020-03-10 19:14:43 +01:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2012-12-03 15:13:23 +01:00
|
|
|
#
|
2020-03-10 19:14:43 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2012-12-03 15:13:23 +01:00
|
|
|
#
|
2020-03-10 19:14:43 +01:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2012-12-03 15:13:23 +01:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-02-21 03:17:35 +01:00
|
|
|
# These are the default directories where the ZDS-II toolchain is installed.
|
|
|
|
# NOTE that short 8.3 path names are used in order to avoid spaces. On my
|
|
|
|
# machine I have:
|
|
|
|
#
|
|
|
|
# Versions 5.1.1 and 5.2.1
|
|
|
|
# C:\PROGRA~1\ = C:\Program Files\
|
|
|
|
# C:\PROGRA~2\ = C:\Program Files (x86)\
|
|
|
|
#
|
|
|
|
# Your PC may be configured differently.
|
|
|
|
#
|
|
|
|
# Version 5.3.0 and 5.3.3, the default install location is C:\ZiLOG
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_EZ80_ZDSII_V511),y)
|
|
|
|
INSTALLROOT = C:/PROGRA~2/ZiLOG
|
|
|
|
ZDSVERSION := 5.1.1
|
|
|
|
else ifeq ($(CONFIG_EZ80_ZDSII_V521),y)
|
|
|
|
INSTALLROOT = C:/PROGRA~2/ZiLOG
|
|
|
|
ZDSVERSION := 5.2.1
|
|
|
|
else ifeq ($(CONFIG_EZ80_ZDSII_V530),y)
|
|
|
|
INSTALLROOT = C:/ZiLOG
|
|
|
|
ZDSVERSION := 5.3.0
|
|
|
|
else ifeq ($(CONFIG_EZ80_ZDSII_V533),y)
|
|
|
|
INSTALLROOT = C:/ZiLOG
|
|
|
|
ZDSVERSION := 5.3.3
|
|
|
|
endif
|
|
|
|
|
|
|
|
ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION)
|
|
|
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
|
|
|
INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"}
|
|
|
|
ZDSBINDIR := $(INSTALLDIR)\bin
|
|
|
|
ZDSSTDINCDIR := $(INSTALLDIR)\include\std
|
|
|
|
ZDSZILOGINCDIR := $(INSTALLDIR)\include\zilog
|
|
|
|
ZDSSTDLIBDIR := $(INSTALLDIR)\lib\std
|
|
|
|
ZDSZILOGLIBDIR := $(INSTALLDIR)\lib\zilog
|
|
|
|
else
|
|
|
|
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
|
|
|
|
ZDSBINDIR := $(INSTALLDIR)/bin
|
|
|
|
ZDSSTDINCDIR := $(INSTALLDIR)/include/std
|
|
|
|
ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
|
|
|
|
ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
|
|
|
|
ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
|
|
|
|
|
|
|
|
# These are the same directories but with the directory separator
|
|
|
|
# character swapped as needed by the ZDS-II compiler
|
|
|
|
|
|
|
|
WTOPDIR := ${shell cygpath -w "$(TOPDIR)"}
|
|
|
|
WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"}
|
|
|
|
WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
|
|
|
|
WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
|
|
|
|
WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
|
|
|
|
|
|
|
|
# Escaped versions
|
|
|
|
|
2020-06-02 17:17:40 +02:00
|
|
|
ETOPDIR := ${shell echo $(WTOPDIR) | sed -e "s/ /%20/g"}
|
2020-02-21 03:17:35 +01:00
|
|
|
EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
|
|
|
|
EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
|
|
|
|
endif
|
2020-02-21 16:33:34 +01:00
|
|
|
|
|
|
|
# CPU Identification
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
|
2020-02-29 16:16:50 +01:00
|
|
|
ARCHCPU = eZ80F91
|
2020-02-21 16:33:34 +01:00
|
|
|
ARCHCPUDEF = _EZ80F91
|
|
|
|
ARCHFAMILY = _EZ80ACCLAIM!
|
|
|
|
else ifeq ($(CONFIG_ARCH_CHIP_EZ80F92),y)
|
2020-02-29 16:16:50 +01:00
|
|
|
ARCHCPU = eZ80F92
|
|
|
|
ARCHCPUDEF = _EZ80F92
|
2020-02-21 16:33:34 +01:00
|
|
|
ARCHFAMILY = _EZ80ACCLAIM!
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Optimization level
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
2020-02-27 15:34:39 +01:00
|
|
|
ARCHASMOPTIMIZATION = -debug
|
2020-02-21 16:33:34 +01:00
|
|
|
ARCHOPTIMIZATION = -debug
|
|
|
|
else
|
2020-02-27 15:34:39 +01:00
|
|
|
ARCHASMOPTIMIZATION = -NOdebug
|
2020-02-25 21:38:24 +01:00
|
|
|
ARCHOPTIMIZATION = -NOdebug
|
2020-02-21 16:33:34 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_DEBUG_NOOPT),y)
|
2020-02-29 16:16:50 +01:00
|
|
|
ARCHOPTIMIZATION += -NOpromote -reduceopt -NOsdiopt
|
2020-02-27 15:34:39 +01:00
|
|
|
else
|
2020-02-29 16:16:50 +01:00
|
|
|
ARCHOPTIMIZATION += -promote -NOreduceopt -sdiopt -optsize
|
2020-02-21 16:33:34 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Tool names/paths.
|
|
|
|
|
|
|
|
CROSSDEV =
|
|
|
|
CC = $(ZDSBINDIR)$(DELIM)ez80cc.exe
|
2020-07-01 12:08:10 +02:00
|
|
|
CPP = gcc -E -P -x c
|
2020-02-21 16:33:34 +01:00
|
|
|
LD = $(ZDSBINDIR)$(DELIM)ez80link.exe
|
|
|
|
AS = $(ZDSBINDIR)$(DELIM)ez80asm.exe
|
|
|
|
AR = $(ZDSBINDIR)$(DELIM)ez80lib.exe
|
|
|
|
|
|
|
|
# File extensions
|
|
|
|
|
|
|
|
ASMEXT = .asm
|
|
|
|
OBJEXT = .obj
|
|
|
|
LIBEXT = .lib
|
|
|
|
EXEEXT = .lod
|