# Project:   Ispell

#  Makefile for Ispell on RISC OS machines.



# ---------------- Edit this part of the file. -----------------

# A make utility (probably the one that takes this file as input!)
MAKE = amu

# Your favourite C compiler
CC = cc

# Your favourite object file linker
LD = link

# Your favourite last step
STRIP = squeeze

# Definitions for the C compiler.
# NOTE: All definitions (should) appear in 'local.h'.
DEFS =

# Some means of changing your current directory.
CD = Prefix <Prefix$Dir>.

# Some flavour of yacc.
YACC = bison

# Troff to TeX convertor
TR2TEX = tr2latex

# LaTeX 2.09
LATEX209 = latex209

# Where the installed binaries go.
BINDIR = Ispell:Library

# Define this to be whatever you use for installation.  If you don't have
# an install binary, use an Obey file that invokes Copy and Accesses the
# files appropriately.
INSTALL = <Prefix$Dir>.install

# ---------------------- Edits end here. ------------------------



# Toolflags:
CCflags = -Ospace -W -IC: -ff -c -depend !Depend -throwback $(DEFS)
Yaccflags =
Linkflags = -o $@
Squeezeflags = -o $@

ISPELLOBJ = o.version o.ispell o.correct o.defmt o.dump o.good o.lookup \
            o.hash o.makedent o.roterm o.tgood o.tree o.xgets o.local \
            o.xmalloc 

BUILDHASHOBJ = o.version o.buildhash o.hash o.makedent o.parse o.local \
               o.alloca o.xmalloc

BINARIES = Ispell BuildHash Sq Unsq
 
LIBS = C:o.Stubs


# Final targets:
all:       $(BINARIES) Documents
        $(CD)Languages
        $(MAKE) all
        $(CD)English
        $(MAKE) all

Ispell:    $(ISPELLOBJ)
        $(LD)  $(linkflags) $(ISPELLOBJ) $(LIBS)
        $(STRIP) $(Squeezeflags) $@ 

BuildHash: $(BUILDHASHOBJ)
        $(LD) $(linkflags) $(BUILDHASHOBJ) $(LIBS)
        $(STRIP) $(Squeezeflags) $@ 

Sq:        o.sq
        $(LD) $(linkflags) $? $(LIBS)
        $(STRIP) $(Squeezeflags) $@ 

Unsq:      o.unsq
        $(LD) $(linkflags) $? $(LIBS)
        $(STRIP) $(Squeezeflags) $@ 

install:   $(BINARIES) Documents
        $(INSTALL) LR ff8 BuildHash $(BINDIR) BuildHash
        $(INSTALL) LR ff8 Ispell $(BINDIR) Ispell
        $(INSTALL) LR ff8 Sq $(BINDIR) Sq
        $(INSTALL) LR ff8 Unsq $(BINDIR) Unsq
        $(CD)Languages
        $(MAKE) install
        $(CD)English
        $(MAKE) install

Documents: Documents.Fields.dvi
        -
        
Documents.Fields.tex: Documents.Fields.3
        -$(TR2TEX) $? > $@
        -SetType $@ 2a8   

Documents.Fields.dvi: Documents.Fields.tex
        -$(LATEX209) $? < Documents.Fields.Batch 

clean:
        -Wipe o.* ~CF~R~V
        -Copy  o. ~A~C~DFN~S~T~V
        -Wipe Documents.Fields.aux ~CF~R~V
        -Wipe Documents.Fields.log ~CF~R~V
        -Wipe Documents.Fields.tex ~CF~R~V
        $(CD)Languages
        $(MAKE) clean
        $(CD)English
        $(MAKE) clean

veryclean:
        -Wipe o.* ~CF~R~V
        -Copy  o. ~A~C~DFN~S~T~V
        -Wipe Documents.Fields.aux ~CF~R~V
        -Wipe Documents.Fields.log ~CF~R~V
        -Wipe Documents.Fields.tex ~CF~R~V
        -Wipe BuildHash ~CF~R~V
        -Wipe Ispell ~CF~R~V
        -Wipe Sq ~CF~R~V
        -Wipe Unsq ~CF~R~V
        -Wipe c.parse ~CF~R~V
        -Wipe Documents.Fields.dvi ~CF~R~V
        $(CD)Languages
        $(MAKE) veryclean
        $(CD)English
        $(MAKE) veryclean


# Static dependencies:
c.parse:   y.parse
        $(YACC) -o parse.c $(YFLAGS) parse.y

o.parse: c.parse
        $(CC) -o $@ -c $(CCflags) parse.c

.SUFFIXES: .o .c
.c.o:;  $(CC) -o $@ -c $(CCflags) $<


# Dynamic dependencies:
o.ispell:	c.ispell
o.ispell:	h.config
o.ispell:	h.local
o.ispell:	h.ispell
o.ispell:	h.proto
o.ispell:	h.msgs
o.ispell:	h.version
o.ispell:	C:h.kernel
o.correct:	c.correct
o.correct:	h.config
o.correct:	h.local
o.correct:	h.ispell
o.correct:	h.proto
o.correct:	h.msgs
o.correct:	h.version
o.defmt:	c.defmt
o.defmt:	h.config
o.defmt:	h.local
o.defmt:	h.ispell
o.defmt:	h.proto
o.defmt:	h.msgs
o.dump:	c.dump
o.dump:	h.config
o.dump:	h.local
o.dump:	h.ispell
o.dump:	h.proto
o.good:	c.good
o.good:	h.config
o.good:	h.local
o.good:	h.ispell
o.good:	h.proto
o.lookup:	c.lookup
o.lookup:	h.config
o.lookup:	h.local
o.lookup:	h.ispell
o.lookup:	h.proto
o.lookup:	h.msgs
o.roterm:	c.roterm
o.roterm:	C:h.kernel
o.roterm:	C:h.swis
o.roterm:	h.config
o.roterm:	h.local
o.roterm:	h.ispell
o.roterm:	h.proto
o.roterm:	h.msgs
o.tgood:	c.tgood
o.tgood:	h.config
o.tgood:	h.local
o.tgood:	h.ispell
o.tgood:	h.proto
o.tree:	c.tree
o.tree:	h.config
o.tree:	h.local
o.tree:	h.ispell
o.tree:	h.proto
o.tree:	h.msgs
o.xgets:	c.xgets
o.xgets:	h.config
o.xgets:	h.local
o.xgets:	h.ispell
o.xgets:	h.proto
o.version:	c.version
o.buildhash:	c.buildhash
o.buildhash:	h.config
o.buildhash:	h.local
o.buildhash:	h.ispell
o.buildhash:	h.proto
o.buildhash:	h.msgs
o.buildhash:	h.version
o.hash:	c.hash
o.hash:	h.config
o.hash:	h.local
o.hash:	h.ispell
o.hash:	h.proto
o.makedent:	c.makedent
o.makedent:	h.config
o.makedent:	h.local
o.makedent:	h.ispell
o.makedent:	h.proto
o.makedent:	h.msgs
o.parse:	c.parse
o.parse:	h.config
o.parse:	h.local
o.parse:	h.ispell
o.parse:	h.proto
o.parse:	h.msgs
o.local:	c.local
o.local:	C:h.swis
o.local:	C:h.kernel
o.local:	h.local
o.alloca:	c.alloca
o.xmalloc:	c.xmalloc
o.sq:	c.sq
o.unsq:	c.unsq
o.unsq:	h.msgs
