# Copyright 2008 Castle Technology Ltd
#
# Licensed 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
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
#
# Makefile fragment for defining the various tools and their options

INCLUDED_STDTOOLS = YES

#
# $Id$
#
#
# These are the tool definitions for RISC OS hosted builds.
#
#
STDMAKEKFILE=$Id$

#
# Core toolset.
#
AOFASM          = objasm
AR              = libfile
AS              = objasm
BINAOF          = binaof
CAT             = print
CC              = cc
C++             = c++
CMHG            = cmhg
CPREPRO         = cc -C++ -E
DATA2AOF        = datatoaof
DEFMOD          = defmod
DO              = do
ECHO            = echo
ERASECVS        = EraseCVS
FAPPEND         = FAppend
FILTERCOMP      = ${PERL} Build:FilterComp
FILTERCOMP2     = ${PERL} Build:FilterComp2
GETVERSION      = ${PERL} Build:GetVersion
HDR2H           = ${PERL} Build:Hdr2H
INSTRES         = <Perl$Dir>.perl Build:InstRes
INSTVIARG       = <Perl$Dir>.perl Build:InstViaRG
INSERTVERSION   = ${AWK} -f Build:AwkVers
ifeq (C++,${LINK_TYPE})
LD              = link -c++
else
LD              = link
endif
LDBIN           = link -bin -o
MAKE            = amu
MODGEN          = modgen
MODSQZ          = modsqz
NOP             = |
NUMBER          = ${DO} RUN Build:Number
PERL            = ${DO} <Perl$Dir>.perl
RESGEN          = resgen
RM              = remove
SETTYPE         = settype
SQUASH          = squash
SQUISH          = squish
SQZ             = squeeze
STRIPDEPEND     = stripdepnd
TOGPA           = ToGPA
TOKENCHECK      = tokencheck
TOKENISE        = tokenise
TOUCH           = Touch
TRANSLATE       = translate
UNMODSQZ        = unmodsqz

#
#  UNIX "ports"
#
AWK             = GNU.gawk
CD              = dir
CHMOD           = Unix.chmod
DF              = Unix.df
DIFF            = GNU.diff
EGREP           = Unix.egrep
FIND            = GNU.find
GAWK            = GNU.gawk
IDENT           = GNU.ident
LEX             = GNU.flex
LS              = Unix.ls
MKDIR           = ${DO} mkdir -p
PWD             = Unix.pwd
RPCGEN          = rpcgen
SED             = sed
WC              = Unix.wc
YACC            = GNU.bison
ZIP             = ${DO} zip -9qr
UNZIP           = unzip

#
# Standard options.  These can be added to or overridden in the
# including makefile.
#
STDTOOLOPTIONS = -depend !Depend ${THROWBACK}

ARFLAGS += -c -o
ASFLAGS += ${STDTOOLOPTIONS} ${ASMDEFINES} ${ASMINCLUDES}
ASFLAGS += -ihdr -i<Hdr$Dir>.Global -i<Hdr$Dir>.Interface -i<Hdr$Dir>.Interface2
ASFLAGS += -pd "APCS SETS \"${APCS}\"" -pd "Machine SETS \"${MACHINE}\"" -pd "UserIF SETS \"${USERIF}\""
CFLAGS  += -c ${STDTOOLOPTIONS} ${CDEFINES} ${CINCLUDES} ${C_NO_FNAMES} ${C_WARNINGS}
C++INCLUDES += -ICPP:
C++FLAGS += -c ${STDTOOLOPTIONS} ${C++DEFINES} ${C++INCLUDES}
CMHGFLAGS +=  -p ${STDTOOLOPTIONS} ${CMHGDEFINES} ${CMHGINCLUDES}
SQUISHFLAGS += -nolist

C_WARNINGS  := -fah
C_OPTSIZE   := -Ospace
C_OPTSPEED  := -Otime
C_NO_ZI     := -zz100000
C_NO_STKCHK := -zps1
C_STKCHK    := -zps0
C_NO_FNAMES := -ff
C_FNAMES    := -fn
C_MODULE    := -zM
C_NOWARN_ASSIGNMENT_AS_CONDITION := -Wa
C_NOWARN_NON_ANSI_INCLUDES := -Wp

#
# Recursive forced copying options.
#
#  CPFLAGS go after the arguments
#  CPPREFLAGS go before the arguments
#
CPFLAGS    = FR~C~V~N
CPVFLAGS   = FR~CV~N
CPPREFLAGS =

CP         = copy ${CPPREFLAGS}

#
# Recursive forced deletion with no errors (except file not found!).
#
#  WFLAGS go after the arguments
#  WPREFLAGS go before the arguments
#
WFLAGS    = FR~C~V
WPREFLAGS =

# A version of wipe that suppresses all errors
XWIPE     = x wipe ${WPREFLAGS}

# Required for legacy components
WIPE      = ${XWIPE}

# Directory separator character
SEP       = .

# Filename extension separator character
EXT       = /

# Parent directory
PARENT    = ^


# EOF