# makedefs variant for Zortech C++ V3.1 make
#
# RCS $Revision: 1.7 $
# Checkin $Date: 93/11/26 16:37:57 $
# Revising $Author: irickard $
#
# Set PCSZ to 32 or 26, as appropriate
# Set ENDIAN to b or l as required.
# Set FPIS (FP Instruction Set) to 2 or 3 as appropriate
# Set LDMLIMIT to the maximum number of registers to be allowed in a LDM or STM
PCSZ=
ENDIAN=
FPIS=3
LDMLIMIT=16

# set ARMTOOLS if the ARM tools are not available on your PATH
# NB: Leave a trailing directory separator at the end
ARMTOOLS=

# additional '+' below indicates that command should be executed by a shell
# in order to allow output redirection (needed for make depend)
CC=+$(ARMTOOLS)armcc
LD=+$(ARMTOOLS)armlink
AS=+$(ARMTOOLS)armasm
ARMLIB=+$(ARMTOOLS)armlib

MKTMP=mktmp
RM=del
RENAME=rename
APPEND=type
MAKEMAKE=..\util\makemake
DEPLIST=deplist
BAKFILE=MakeFBak
CP=copy

# via files are needed because of DOS command-line length restrictions
CFLAGS=-via cv
DCFLAGS=$(CFLAGS) -M
AFLAGS=-via av 
DAFLAGS=$(AFLAGS) -D $(MKTMP)

FPE=fpe_$(PCSZ)$(ENDIAN)

via:
        @echo -$(ENDIAN)i -ffah -apcs 3/$(PCSZ)bit/fpe$(FPIS) -zr$(LDMLIMIT) > cv
        @echo -c -J..\..\include -I..,..\semi -DHOSTSEX_$(ENDIAN) $(CFL) >> cv
        @echo -$(ENDIAN)i -apcs 3/$(PCSZ)bit -PD "FPIS SETA $(FPIS)" > av
        @echo -PD "LDM_MAX SETA $(LDMLIMIT)" -I..,..\semi >> av
        @echo ARM C-library build is a 3-stage process on the PC
        @echo -via files have been created for armasm & armcc
        @echo now type:
        @echo   make depend          -- optional; adds dependencies to makefile
        @echo   make armlib.o        -- to make the library
