2008-01-10 19:13:27 +01:00
|
|
|
############################################################################
|
2008-01-10 20:16:50 +01:00
|
|
|
# configs/z16f2800100zcog/ostest/Make.defs
|
2008-01-10 19:13:27 +01:00
|
|
|
#
|
2010-10-01 03:07:04 +02:00
|
|
|
# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
|
2008-01-10 19:13:27 +01:00
|
|
|
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
|
|
|
# are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in
|
|
|
|
# the documentation and/or other materials provided with the
|
|
|
|
# distribution.
|
|
|
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
# used to endorse or promote products derived from this software
|
|
|
|
# without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
include ${TOPDIR}/.config
|
|
|
|
|
|
|
|
# These are the directories where the ZNeo-II toolchain is installed
|
|
|
|
|
2010-10-01 03:07:04 +02:00
|
|
|
ZDSINSTALLDIR := C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.1
|
2008-01-10 19:13:27 +01:00
|
|
|
ZDSBINDIR := $(ZDSINSTALLDIR)/bin
|
|
|
|
ZDSSTDINCDIR := $(ZDSINSTALLDIR)/include/std
|
|
|
|
ZDSZILOGINCDIR := $(ZDSINSTALLDIR)/include/zilog
|
2008-02-03 14:54:33 +01:00
|
|
|
ZDSSTDLIBDIR := $(ZDSINSTALLDIR)/lib/std
|
|
|
|
ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog
|
|
|
|
|
2008-01-10 19:13:27 +01:00
|
|
|
|
|
|
|
# These are the same directories but with the directory separator
|
|
|
|
# character swapped as needed by the ZNeo-II compiler
|
|
|
|
|
|
|
|
WTOPDIR := ${shell cygpath -w $(TOPDIR)}
|
|
|
|
WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)}
|
|
|
|
WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)}
|
2008-02-03 14:54:33 +01:00
|
|
|
WZDSSTDLIBDIR := ${shell cygpath -w $(ZDSSTDLIBDIR)}
|
|
|
|
WZDSZILOGLIBDIR := ${shell cygpath -w $(ZDSZILOGLIBDIR)}
|
2008-01-10 19:13:27 +01:00
|
|
|
|
|
|
|
# Escaped versions
|
|
|
|
|
|
|
|
ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
|
|
|
|
EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
|
|
|
|
EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
|
|
|
|
|
|
|
|
# Assembler definitions
|
|
|
|
|
2009-09-15 16:18:15 +02:00
|
|
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
2008-01-10 19:13:27 +01:00
|
|
|
ARCHASMOPTIMIZATION = -debug
|
|
|
|
else
|
|
|
|
ARCHASMOPTIMIZATION = -nodebug
|
|
|
|
endif
|
|
|
|
|
|
|
|
ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase
|
|
|
|
ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
|
|
|
|
ARCHASMWARNINGS = -warn
|
|
|
|
ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 \ -define:__ASSEMBLY__
|
|
|
|
ARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
|
|
|
|
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
|
|
|
|
$(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
|
|
|
|
|
|
|
|
# Compiler definitions
|
|
|
|
|
2009-09-15 16:18:15 +02:00
|
|
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
2008-01-10 19:13:27 +01:00
|
|
|
ARCHOPTIMIZATION = -debug -NOregvar -reduceopt
|
|
|
|
else
|
|
|
|
ARCHOPTIMIZATION = -nodebug -regvar
|
|
|
|
endif
|
|
|
|
|
2008-01-28 20:09:02 +01:00
|
|
|
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
|
2008-01-10 19:13:27 +01:00
|
|
|
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
|
2008-01-28 20:09:02 +01:00
|
|
|
ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
|
2008-01-10 19:13:27 +01:00
|
|
|
ARCHPICFLAGS =
|
|
|
|
ARCHWARNINGS = -warn
|
|
|
|
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES \
|
|
|
|
-define:_Z16F_SERIES
|
|
|
|
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
|
|
|
ARCHUSRINCLUDES = -usrinc:'.'
|
|
|
|
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
|
2008-01-28 20:09:02 +01:00
|
|
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) \
|
2008-01-10 19:13:27 +01:00
|
|
|
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES)
|
|
|
|
|
2008-01-10 22:10:30 +01:00
|
|
|
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
|
|
|
|
CPPINCLUDES = -I$(TOPDIR)/include
|
|
|
|
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
|
|
|
|
|
2008-01-10 19:13:27 +01:00
|
|
|
# Librarian definitions
|
|
|
|
|
|
|
|
ARFLAGS = -quiet -warn
|
|
|
|
|
|
|
|
# Linker definitions
|
|
|
|
|
|
|
|
LINKCMDTEMPLATE = $(TOPDIR)/configs/z16f2800100zcog/ostest/ostest.linkcmd
|
|
|
|
|
|
|
|
# Tool names/pathes
|
|
|
|
|
|
|
|
CROSSDEV =
|
|
|
|
CC = $(ZDSBINDIR)/zneocc.exe
|
2008-01-10 22:10:30 +01:00
|
|
|
CPP = gcc -E
|
2008-01-10 19:13:27 +01:00
|
|
|
LD = $(ZDSBINDIR)/zneolink.exe
|
|
|
|
AS = $(ZDSBINDIR)/zneoasm.exe
|
|
|
|
AR = $(ZDSBINDIR)/zneolib.exe
|
|
|
|
|
|
|
|
# File extensions
|
|
|
|
|
|
|
|
ASMEXT = .asm
|
|
|
|
OBJEXT = .obj
|
|
|
|
LIBEXT = .lib
|
|
|
|
EXEEXT = .hex
|
|
|
|
|
|
|
|
# These are the macros that will be used in the NuttX make system
|
|
|
|
# to compile and assembly source files and to insert the resulting
|
|
|
|
# object files into an archive
|
|
|
|
|
2008-11-26 19:59:14 +01:00
|
|
|
define PREPROCESS
|
|
|
|
@echo "CPP: $1->$2"
|
|
|
|
@$(CPP) $(CPPFLAGS) $1 -o $2
|
|
|
|
endef
|
|
|
|
|
2008-01-10 19:13:27 +01:00
|
|
|
define COMPILE
|
2008-01-13 16:31:26 +01:00
|
|
|
@#echo "CC: $1"
|
2008-12-08 22:21:46 +01:00
|
|
|
@(wfile=`cygpath -w $1`; $(CC) $(CFLAGS) $$wfile)
|
2008-01-10 19:13:27 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define ASSEMBLE
|
2008-01-13 16:31:26 +01:00
|
|
|
@#echo "AS: $1"
|
2008-12-08 22:21:46 +01:00
|
|
|
@(wfile=`cygpath -w $1`; $(AS) $(AFLAGS) $$wfile)
|
2008-01-10 19:13:27 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define ARCHIVE
|
|
|
|
echo "AR: $2"; \
|
|
|
|
$(AR) $(ARFLAGS) $1=-+$2 || { echo "$(AR) $1=-+$2 FAILED!" ; exit 1 ; }
|
|
|
|
endef
|
|
|
|
|
|
|
|
define CLEAN
|
2008-01-10 22:10:30 +01:00
|
|
|
@rm -f *.obj *.src *.lib *.hex *.lst
|
2008-01-10 19:13:27 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
# This is the tool to use for dependencies (i.e., none)
|
|
|
|
|
|
|
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
|
|
|
|
|
|
|
# ZNeo-II cannot follow Cygwin soft links, so we will have to use directory copies
|
|
|
|
|
|
|
|
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
|
|
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
|
|
|
|
|
|
|
# Linux/Cygwin host tool definitions
|
|
|
|
|
|
|
|
HOSTCC = gcc
|
|
|
|
HOSTINCLUDES = -I.
|
|
|
|
HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
|
|
|
|
HOSTLDFLAGS =
|