# MPMorph - Amiga Morphing program
# Copyright (C) © 1995 Mark John Paddock

# $VER: MPMorph_smakefile 4.8 (16.3.97)

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# mpaddock@cix.compulink.co.uk
# mark@topic.demon.co.uk

# Make file for MPMorph and SAS/C 6.57

# various defines
MPI       = /MPImage75/
MPN       = /MPIndex55/
MPG       = /MPGui55/
OS        = sC/
MS        = sM/
MA        = $(MS)a/
RS        = sR/
RA        = $(RS)a/
DS        = sD/
B         = brush/
BS        = $(MS)br/
C         = cursor/
CS        = $(MS)cu/
GB        = GB/
R         = Rexx/
I         = .info
E         = ENV/MPMorph/
HT        = HTML/
HI        = $(HT)Images/
TU        = Tutorial/
G         = Gui/
D         = docs/
INC       = include/
TS        = st/
UNIX      = $(RS)g/
LIBS      = libs/

# Compilation flags
# Normal compile
NORMFLAGS  = PARM=R CONSTLIB NOSTKCHK STRMER UCHAR STREQ OPT OPTGO\
 CNEST NOMINC STRCONS VERBOSE STRSECT=CODE NOCHKABORT\
 DBG=L WARN=ALL ERR=ALL IGN=104,51,148,190,61,165,120,212,112 IDIR=$(INC)
# Compile math = FFP 000
CCFLAGS000 = $(NORMFLAGS) CPU=ANY MATH=FFP OPTSIZE
# Compile MPImage.library
CCFLAGSL020= $(NORMFLAGS) CPU=68020 MATH=FFP LIBCODE IDIR=$(IS) GST=$(IS)MPImage.gst OPTTIME
# Compile MPImage.library no gst
CCFLAGSLNO020= $(NORMFLAGS) CPU=68020 MATH=FFP LIBCODE IDIR=$(IS) OPTTIME
# Compile MPImage.library 000
CCFLAGSL000 = $(NORMFLAGS) CPU=ANY MATH=FFP LIBCODE IDIR=$(IS) GST=$(IS)MPImage.gst OPTTIME
# Compile MPImage.library no gst 000
CCFLAGSLNO000 = $(NORMFLAGS) CPU=ANY MATH=FFP LIBCODE IDIR=$(IS) OPTTIME
# link MPImage.library
CCFLAGSLL  = MATH=FFP NOCHKABORT
# Compile MPImage.library
CCFLAGSL881= $(NORMFLAGS) CPU=68020 MATH=881 LIBCODE IDIR=$(IS) GST=$(IS)MPImage.gst OPTTIME OPTSCHED
# Compile MPImage.library no gst
CCFLAGSLNO881= $(NORMFLAGS) CPU=68020 MATH=881 LIBCODE IDIR=$(IS) OPTTIME OPTSCHED
# link MPImage.library
CCFLAGSLL881= MATH=881 NOCHKABORT
# Compile MPImage.library
CCFLAGSL040= $(NORMFLAGS) CPU=68040 MATH=881 LIBCODE IDIR=$(IS) GST=$(IS)MPImage.gst OPTTIME OPTSCHED DEFINE=MY040=1
# Compile MPImage.library no gst
CCFLAGSLNO040= $(NORMFLAGS) CPU=68040 MATH=881 LIBCODE IDIR=$(IS) OPTTIME OPTSCHED DEFINE=MY040=1
# link MPImage.library
CCFLAGSLL040= MATH=881 NOCHKABORT
# Compile MPImage.library
CCFLAGSL060= $(NORMFLAGS) CPU=68060 MATH=881 LIBCODE IDIR=$(IS) GST=$(IS)MPImage.gst OPTTIME OPTSCHED
# Compile MPImage.library no gst
CCFLAGSLNO060= $(NORMFLAGS) CPU=68060 MATH=881 LIBCODE IDIR=$(IS) OPTTIME OPTSCHED
# link MPImage.library
CCFLAGSLL060= MATH=881 NOCHKABORT
# Compile MPGui.library
CCFLAGSLG000= $(CCFLAGS000) LIBCODE
# Compile MPMorph with GST
CCFLAGSG000 = $(CCFLAGS000) GST=$(MS)MPMorph.gst
# Compile render for 000
CCFLAGS000R = $(NORMFLAGS) CPU=68000 MATH=FFP OPTTIME
# Compile render for 020
CCFLAGS020 = $(NORMFLAGS) CPU=68020 MATH=FFP OPTTIME
# Compile render for 881
CCFLAGS881 = $(NORMFLAGS) CPU=68020 MATH=68881 OPTSCHED OPTCOMP=5 OPTDEPTH=3 OPTINLOCAL OPTRDEPTH=2 OPTTIME
# Compile render for 040
CCFLAGS040 = $(NORMFLAGS) CPU=68040 MATH=68881 OPTSCHED OPTCOMP=5 OPTDEPTH=3 OPTINLOCAL OPTRDEPTH=2 OPTTIME DEFINE=MY040=1
# Compile render for 040 - change ??? - with cli version
CCFLAGS040C = $(NORMFLAGS) CPU=68040 MATH=68881 OPTSCHED OPTCOMP=5 OPTDEPTH=3 OPTINLOCAL OPTRDEPTH=2 OPTTIME NOOPT DEFINE=__MPCLI=1
# Compile render for 060
CCFLAGS060 = $(NORMFLAGS) CPU=68060 MATH=68881 OPTSCHED OPTCOMP=5 OPTDEPTH=3 OPTINLOCAL OPTRDEPTH=2 OPTTIME
# Compile render for 060 - change ??? - with cli version
CCFLAGS060C = $(NORMFLAGS) CPU=68060 MATH=68881 OPTSCHED OPTCOMP=5 OPTDEPTH=3 OPTINLOCAL OPTRDEPTH=2 OPTTIME NOOPT DEFINE=__MPCLI=1

# default compilation
.c.o:
   sc $(CCFLAGS000) $*.c

.asm.o:
	asm -d $*.asm

IIDIST    = $(INC)libraries/MPImage.h $(INC)clib/MPImage_protos.h $(INC)pragmas/MPImage_pragmas.h

IGDIST    = $(INC)libraries/MPGui.h $(INC)clib/MPGui_protos.h $(INC)pragmas/MPGui_pragmas.h

DDDIST    = $(D)MPImage.doc $(D)MPGui.doc

IDIST     = $(IIDIST) $(IGDIST) $(DDDIST)

DIST040   = MPMorph EditPrefs ConvertMPImage RunMPGui\
 $(LIBS)MPGui.library EdgePoints RunMPIndex
 
DIST      = $(DIST040) $(LIBS)MPImage.library.000 $(LIBS)MPImage.library.881 MPRender.881 MPRender.000 MPMorph.guide\
 Install Read.Me Tutorial.guide $(TU)cat.pic $(TU)girl.pic COPYING\
 MPMorph-prefs MPRender-prefs MPImage MPImage.guide\
 MPMorph-rexx MPRender-rexx EditPrefs-rexx $(TU)Tutorial.rexx\
 Docs.Index RunMPIndex.guide MPRender.guide EdgePoints.guide\
 Preview.guide EditPrefs.guide MPGui.guide\
 $(LIBS)MPImage.library.020.pch $(LIBS)MPImage.library.040.pch $(LIBS)MPImage.library.060.pch\
 MPRender.020.pch MPRender.040.pch MPRender.060.pch spatch\
 Readme.unix $(G)MPImage.gui 

DISTI     = MPMorph.guide$(I) MPMorph-prefs$(I)\
 Install$(I) Read.Me$(I) Tutorial.guide$(I) MPRender-prefs$(I)\
 $(E)def_points$(I) $(E)def_prefs$(I) $(E)def_pic$(I) \
 ENV ENV/MPMorph brush cursor Tutorial MPImage$(I)\
 MPMorph$(I) RunMPIndex$(I)

DISTINF	= MPRender.881.inf MPRender.040.inf MPRender.060.inf MPRender.020.inf MPRender.000.inf 
DISTINFO	= MPRender.881$(I) MPRender.040$(I) MPRender.060$(I) MPRender.020$(I) MPRender.000$(I) 

HTMLIMG   = $(HI)Up

REXX      = $(R)Prescript.MPM $(R)PostScript.MPM $(R)FadeToBlack.MPM $(R)FadeToWhite.MPM $(R)PixelWarp.MPM $(R)PixelMorph.MPM $(R)PreAll.MPM\
 $(R)ToHam.MPM $(R)LoadScript.MPM $(R)Preview.MPM $(R)PreviewPre.MPM $(R)PostAnim.MPM $(R)EdgePoints.MPM $(R)IndexHelp.MPM $(R)RTPreview.MPM

GTB       = $(GB)MPMorph.gui $(GB)Progress.gui

MPGUI     = $(G)AddGrid.gui $(G)FrameNo.gui $(G)Scale.gui $(G)SetSize.gui $(G)Morph-prefs.gui $(G)Render-prefs.gui\
 $(G)Morph-prefs.def $(G)Render-prefs.def $(G)GetPubScreen.gui $(G)Preview.gui $(G)EdgePoints.gui

BRUSHS    = $(BS)Add.c $(BS)Del.c $(BS)Link.c $(BS)None.c $(BS)One.c $(BS)Rel.c $(BS)Two.c $(BS)Unlink.c $(BS)1st.c $(BS)last.c $(BS)goto.c $(BS)next.c $(BS)prev.c
BRUSHO    = $(BS)add.o $(BS)del.o $(BS)link.o $(BS)none.o $(BS)one.o $(BS)rel.o $(BS)two.o $(BS)unlink.o $(BS)1st.o $(BS)last.o $(BS)goto.o $(BS)next.o $(BS)prev.o
BRUSH     = $(B)Add $(B)Del $(B)Link $(B)None $(B)One $(B)Rel $(B)Two $(B)Unlink $(B)1st $(B)last $(B)goto $(B)next $(B)prev

CURSORS   = $(CS)XAdd.c $(CS)XDel.c $(CS)XL1.c $(CS)XL2.c $(CS)XMov.c $(CS)XOne.c $(CS)XRel.c $(CS)XTwo.c $(CS)XU1.c $(CS)XU2.c
CURSORO   = $(CS)Xadd.o $(CS)Xdel.o $(CS)Xl1.o $(CS)Xl2.o $(CS)Xmov.o $(CS)Xone.o $(CS)Xrel.o $(CS)Xtwo.o $(CS)Xu1.o $(CS)Xu2.o
CURSOR    = $(C)XAdd $(C)XDel $(C)XL1 $(C)XL2 $(C)XMov $(C)XOne $(C)XRel $(C)XTwo $(C)XU1 $(C)XU2

COMMONSRC = $(OS)sprintf.c $(OS)Args.c
TSRC      = $(TS)EdgePoints.c
DOCSRC    = $(DS)MPMorph.texi $(DS)Tutorial.texi $(TU)cat.pic $(TU)girl.pic $(DS)texi2HTML.rexx Install Read.Me COPYING smakefile Source.readme Source.readme$(I)\
 MPImage MPImage$(I) $(TU)Tutorial.rexx $(DS)text2HTML.rexx $(DS)links\
 $(DS)IgnoreWord $(DS)MPRender.texi $(DS)EdgePoints.texi $(DS)Preview.texi makefile $(DS)Readme.unix\
 $(DS)ADoc2html.rexx $(DS)AGDoc2html.rexx MPMorph.html
UNIXSRC   = $(UNIX)Image.c $(UNIX)List.c $(UNIX)output.c $(UNIX)unix.h $(UNIX)params.c
UNIXALL   = makefile $(UNIXSRC) $(RS)MPMorph-render.c $(RS)RenderSub.c $(RS)FindPoint.c $(RS)Render.h
AGSRC     = ag2txt/ag2txt.c
EMPTYSRC   = lha/emptyfile $(D)emptyfile $(INC)clib/emptyfile $(INC)libraries/emptyfile $(INC)pragmas/emptyfile\
 $(LIBS)emptyfile
MPMSRC    = $(MS)MPMorph.c $(MS)ControlWindow.c $(MS)Gui.c $(MS)Subroutines.c $(MS)help.c $(MS)LoadBrushes.c $(MS)Frames.c $(MS)HandleSettings.c $(MS)Messages.c\
 $(MS)gui.h $(MS)MPMorph-amiga.h $(MS)MPMorph-headers.c $(MS)MPMorph.h\
 $(MA)MPMorph.arb $(MA)MPMorph_rxif.c $(MA)MPMorph_rxcl.c $(MA)MPMorph.c $(MA)MPMorph.h $(MS)EGSStuff.c $(MS)EGSStuff.h\
 $(MS)MPMorphCat.cd
#$(MS)GenMsg.c $(MS)Messages.h $(MS)MPMorph-Messages 
RENDERSRC = $(RS)Progress.c $(RS)Progress.h $(RS)Render.h $(RS)RenderSub.c $(RS)MPMorph-render.c $(RA)Render.arb $(RA)Render_rxif.c\
 $(RA)Render_rxcl.c $(RA)Render.c $(RA)Render.h $(RS)trap0.asm $(RS)FindPoint.c $(RS)Subs.c
MISCSRC   = MPMorph-prefs MPRender-prefs

MPMOBJ    = $(MS)MPMorph.o $(MS)ControlWindow.o $(MS)Gui.o $(MS)Messages.o $(MS)Subroutines.o $(MS)help.o $(OS)sprintf.o $(OS)Args.o $(MS)LoadBrushes.o $(MS)Frames.o $(MS)HandleSettings.o \
 $(BRUSHO) $(CURSORO) $(MA)MPMorph.o $(MA)MPMorph_rxcl.o $(MA)MPMorph_rxif.o $(MS)EGSStuff.o
#Note - findpoint.o is at the end to remove need for an ALV for memmove for speed
RENDERO000= $(RS)Progress.o $(OS)sprintf.o $(OS)Args.o $(RS)RenderSub000.o $(RS)MPMorph-render000.o $(RA)Render.o $(RA)Render_rxcl.o $(RA)Render_rxif.o $(RS)Subs000.o $(RS)FindPoint000.o $(RS)trap0.o
RENDERO020= $(RS)Progress.o $(OS)sprintf.o $(OS)Args.o $(RS)RenderSub020.o $(RS)MPMorph-render020.o $(RA)Render.o $(RA)Render_rxcl.o $(RA)Render_rxif.o $(RS)Subs020.o $(RS)FindPoint020.o $(RS)trap0.o
RENDER881O= $(RS)Progress.o $(OS)sprintf.o $(OS)Args.o $(RS)RenderSub881.o $(RS)MPMorph-render881.o $(RA)Render.o $(RA)Render_rxcl.o $(RA)Render_rxif.o $(RS)Subs881.o $(RS)FindPoint881.o
RENDER040O= $(RS)Progress.o $(OS)sprintf.o $(OS)Args.o $(RS)RenderSub040.o $(RS)MPMorph-render040.o $(RA)Render.o $(RA)Render_rxcl.o $(RA)Render_rxif.o $(RS)Subs040.o $(RS)FindPoint040.o
RENDER060O= $(RS)Progress.o $(OS)sprintf.o $(OS)Args.o $(RS)RenderSub060.o $(RS)MPMorph-render060.o $(RA)Render.o $(RA)Render_rxcl.o $(RA)Render_rxif.o $(RS)Subs060.o $(RS)FindPoint060.o
GUIOBJ000 = $(GS)MPGui.o $(GS)Hook.o

PARTDIST  = $(DIST) $(DISTI) $(DISTINF) $(REXX) $(CURSOR)\
 $(BRUSH) $(MPGUI) $(DDIST) $(IDIST)\
 View_HTML$(I) MPMorph.html

FULLDIST  = $(PARTDIST) $(HTMLIMG) \
 $(HT)MPMorph/main.html $(HT)Readme.unix.html $(HT)Tutorial/main.html $(HT)MPRender/main.html\
 $(HT)MPMorph/Rexx/Preview.MPM.html $(HT)MPMorph/Rexx/EdgePoints.MPM.html\
 $(HT)MPMorph/Rexx/IndexHelp.MPM.html $(HT)MPMorph/Rexx/RTPreview.MPM.html\
 $(HT)RunMPIndex/main.html $(HT)Preview/main.html $(HT)EdgePoints/main.html\
 $(HT)MPRender/Rexx/Loadscript.MPM.html $(HT)MPRender/Rexx/Prescript.MPM.html\
 $(HT)MPRender/Rexx/Postscript.MPM.html $(HT)MPMorph/Rexx/FadeToBlack.MPM.html\
 $(HT)MPMorph/Rexx/FadeToWhite.MPM.html $(HT)MPMorph/Rexx/PixelMorph.MPM.html\
 $(HT)MPMorph/Rexx/PixelWarp.MPM.html $(HT)MPMorph/Rexx/PreAll.MPM.html\
 $(HT)MPMorph/Rexx/PostAnim.MPM.html $(HT)MPMorph/Rexx/ToHam.MPM.html\
 $(HT)MPGui/main.html $(HT)EditPrefs/main.html $(HT)MPImage/main.html\
 $(HT)MakeMPIndex/main.html $(HT)MMRexx/main.html $(HT)MRRexx/main.html\
 $(HT)MPGuiDoc/main.html $(HT)EPRexx/main.html $(HT)MPImageDoc/main.html

FULLSRC1  = $(DISTI) $(DISTINFO) $(HTMLIMG) $(REXX) $(GTB) $(BRUSHS) $(CURSORS) $(COMMONSRC)\
 $(DOCSRC) $(AGSRC) $(MPMSRC) $(RENDERSRC)\
 View_HTML$(I)\

FULLSRC2  = $(CURSOR) $(BRUSH) $(GUISRC) $(TSRC) $(UNIXSRC) $(MISCSRC) $(MPGUI)

#stuff to delete
DELETE1   = \#?/\#?.o \#?/\#?/\#?.o \#?/\#?.ld MPMorph.guide MPMorph MPRender.020 MPRender.000 MPRender.040\
 MPRender.881 MPRender.060 EditPrefs ag2txt/ag2txt $(MS)GenMsg $(MS)MPMorph.gst\
 Tutorial.guide\
 ConvertMPImage $(LIBS)MPImage.library.020 $(LIBS)MPImage.library.881 $(LIBS)MPImage.library.040 $(LIBS)MPImage.library.060\
 $(MS)Messages.h $(MS)MessagesS.h
#$(DS)MPMorph.texi.temp $(MS)tMessages.h  $(MS)sMessages.h

DELETE2	= RunMPGui $(LIBS)MPGui.library\
 MPImage.guide $(G)MPImage.gui\
 $(HT)RunMPIndex/\#? $(HT)MPMorph/Rexx/\#? $(HT)MPRender/Rexx/\#?\
 $(HT)MPMorph/\#? $(HT)Tutorial/\#? $(HT)MPRender/\#? $(HT)RunMPIndex/\#?\
 $(HT)Preview/\#? $(HT)EdgePoints/\#? $(HT)MPGui/\#? $(HT)/EditPrefs\#?

DELETE3  = $(IDIST) EdgePoints MakeMPIndex RunMPIndex

DELETE4  = $(LIBS)MPImage.library.000 MPMorph-rexx MPRender-rexx EditPrefs-rexx\
 MPRender.guide RunMPIndex.guide MakeMPIndex.guide EdgePoints.guide Preview.guide EditPrefs.guide

DELETE5	= $(HT)MPImage/\#? $(HT)MakeMPIndex/\#? $(HT)MMRexx/\#? $(HT)MRRexx/\#?\
 $(HT)MPGuiDoc/\#? $(HT)EPRexx/\#? $(HT)MPImageDoc/\#?.html $(HT)\#?

# Default is to generate Source and Object lha
Everything: lha/MPMorph48s.lha lha/MPMorph48.lha MPRender.unix

MPRender.unix: $(UNIXALL)
	smake -f makefile

lha/MPMorphUnix48Src.lha: $(UNIXALL)
	-delete $@
	lha -F u -x $@ <@<
	$(UNIXALL)
	<

# Generate 040 part dist
Dist040: $(DIST040) MPRender.040 $(LIBS)MPImage.library.040

# Generate everything but don't lha
Dist: $(FULLDIST)

# Delete all the built files to force a recompile
Delete:
   -delete $(DELETE1)
   -delete $(DELETE2)
   -delete $(DELETE3)
   -delete $(DELETE4)
   -delete $(DELETE5)

# Object distribution
lha/MPMorph48.lha: $(FULLDIST)
   -delete $@
   lha -F u -x $@ <@<
   $(PARTDIST)
	<
   lha -r -a -F u -x $@ HTML/\#?

# uncompressed archive saves about 12% space when recompressed
# Source distribution - compressed lha archive
lha/MPMorph48s.lha: $(FULLSRC1) $(FULLSRC2) $(EMPTYSRC)
   -delete t:MPM48s.lha
   lha -a -F u -x -z t:MPM48s.lha <@<
	$(FULLSRC1)
	$(FULLSRC2)
	$(EMPTYSRC)
	<
   -delete $@
   lha -a u -Z $@ t:MPM48s.lha
   -delete t:MPM48s.lha

#Patches
$(LIBS)MPImage.library.020.pch: $(LIBS)MPImage.library.000 $(LIBS)MPImage.library.020
	scompare -n8 -o$@ $?

$(LIBS)MPImage.library.040.pch: $(LIBS)MPImage.library.881 $(LIBS)MPImage.library.040
	scompare -n8 -o$@ $?

$(LIBS)MPImage.library.060.pch: $(LIBS)MPImage.library.881 $(LIBS)MPImage.library.060
	scompare -n8 -o$@ $?

MPRender.020.pch: MPRender.000 MPRender.020
	scompare -n8 -o$@ $?

MPRender.040.pch: MPRender.881 MPRender.040
	scompare -n8 -o$@ $?

MPRender.060.pch: MPRender.881 MPRender.060
	scompare -n8 -o$@ $?

spatch: sc:c/spatch
	copy $? $@

#Icons
MPRender.000.inf: MPRender.000.info
	copy $? $@

MPRender.020.inf: MPRender.020.info
	copy $? $@

MPRender.881.inf: MPRender.881.info
	copy $? $@

MPRender.040.inf: MPRender.040.info
	copy $? $@

MPRender.060.inf: MPRender.060.info
	copy $? $@

#Docs
$(D)MPImage.doc: $(MPI)Docs/MPImage.doc
	copy $? $@

$(D)MPGui.doc: $(MPG)Docs/MPGui.doc
	copy $? $@

#Includes
$(INC)libraries/MPImage.h: $(MPI)include/libraries/MPImage.h
	copy $? $@

$(INC)clib/MPImage_protos.h: $(MPI)include/clib/MPImage_protos.h
	copy $? $@

$(INC)pragmas/MPImage_pragmas.h: $(MPI)include/pragmas/MPImage_pragmas.h
	copy $? $@

$(INC)libraries/MPGui.h: $(MPG)include/libraries/MPGui.h
	copy $? $@

$(INC)clib/MPGui_protos.h: $(MPG)include/clib/MPGui_protos.h
	copy $? $@

$(INC)pragmas/MPGui_pragmas.h: $(MPG)include/pragmas/MPGui_pragmas.h
	copy $? $@

# Rexx docs
MPMorph-rexx: $(MA)MPMorph_rxif.c
	makedoc $? noicon toc amigaguide noformfeed autodoc $@

MPRender-rexx: $(RA)Render_rxif.c
	makedoc $? noicon toc amigaguide noformfeed autodoc $@

EditPrefs-rexx: $(MPG)EditPrefs-rexx
	copy $? $@

MPMorph.guide: $(DS)MPMorph.texi
   Makeinfo --amiga-39 -o $@ $?

MPRender.guide: $(DS)MPRender.texi
   Makeinfo --amiga-39 -o $@ $?

RunMPIndex.guide: $(MPN)RunMPIndex.guide
	copy $? $@

EdgePoints.guide: $(DS)EdgePoints.texi
   Makeinfo --amiga-39 -o $@ $?

Preview.guide: $(DS)Preview.texi
   Makeinfo --amiga-39 -o $@ $?

EditPrefs.guide: $(MPG)EditPrefs.guide
	copy $? $@

MPGui.guide: $(MPG)MPGui.guide
	copy $? $@

MPGui.guide.info: $(MPG)MPGui.guide.info
	copy $? $@

Readme.unix: $(DS)Readme.unix
	copy $? $@

# Tutorial file using MakeInfo
Tutorial.guide: $(DS)Tutorial.texi
   Makeinfo --amiga-39 -o $@ $?

# HTML files (note ;s because of 0a0d)
$(HT)MPMorph/main.html: $(DS)MPMorph.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)MPMorph/\#? quiet
	-delete $(HT)MPMorph quiet
	-makedir $(HT)MPMorph
	execute < <
		cd $(HT)MPMorph;
		rx //$(DS)texi2html //$(DS)MPMorph.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)Readme.unix.html: Readme.unix $(DS)text2html.rexx
	execute < <
		cd $(HT);
		rx /$(DS)text2html /$(DS)Readme.unix Readme.unix.html;
		cd /
	<

$(HT)Tutorial/main.html: Tutorial.guide $(DS)text2html.rexx
	-delete $(HT)Tutorial/\#? quiet
	-delete $(HT)Tutorial quiet
	-makedir $(HT)Tutorial
	execute < <
		cd $(HT)Tutorial;
		rx //$(DS)text2html //Tutorial.guide main.html
		cd //;
	<

$(HT)MPRender/main.html: $(DS)MPRender.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)MPRender/\#? quiet
	-delete $(HT)MPRender quiet
	-makedir $(HT)MPRender
	execute < <
		cd $(HT)MPRender;
		rx //$(DS)texi2html //$(DS)MPRender.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)MPMorph/Rexx/Preview.MPM.html: $(R)Preview.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)Preview.MPM Preview.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/EdgePoints.MPM.html: $(R)EdgePoints.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)EdgePoints.MPM EdgePoints.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/IndexHelp.MPM.html: $(R)IndexHelp.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)IndexHelp.MPM IndexHelp.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/RTPreview.MPM.html: $(R)RTPreview.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)RTPreview.MPM RTPreview.MPM.html;
		cd ///;
	<

$(HT)RunMPIndex/main.html: $(MPN)sd/RunMPIndex.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)RunMPIndex/\#? quiet
	-delete $(HT)RunMPIndex quiet
	-makedir $(HT)RunMPIndex
	execute < <
		cd $(HT)RunMPIndex;
		rx //$(DS)texi2html //$(MPN)sd/RunMPIndex.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)Preview/main.html: $(DS)Preview.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)Preview/\#? quiet
	-delete $(HT)Preview quiet
	-makedir $(HT)Preview
	execute < <
		cd $(HT)Preview;
		rx //$(DS)texi2html //$(DS)Preview.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)EdgePoints/main.html: $(DS)EdgePoints.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)EdgePoints/\#? quiet
	-delete $(HT)EdgePoints quiet
	-makedir $(HT)EdgePoints
	execute < <
		cd $(HT)EdgePoints;
		rx //$(DS)texi2html //$(DS)EdgePoints.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)MPRender/Rexx/Loadscript.MPM.html: $(R)Loadscript.MPM $(DS)text2html.rexx
	-makedir $(HT)MPRender
	-makedir $(HT)MPRender/Rexx
	execute < <
		cd $(HT)MPRender/Rexx;
		rx ///$(DS)text2html ///$(R)Loadscript.MPM Loadscript.MPM.html;
		cd ///;
	<

$(HT)MPRender/Rexx/Prescript.MPM.html: $(R)Prescript.MPM $(DS)text2html.rexx
	-makedir $(HT)MPRender
	-makedir $(HT)MPRender/Rexx
	execute < <
		cd $(HT)MPRender/Rexx;
		rx ///$(DS)text2html ///$(R)Prescript.MPM Prescript.MPM.html;
		cd ///;
	<

$(HT)MPRender/Rexx/Postscript.MPM.html: $(R)Postscript.MPM $(DS)text2html.rexx
	-makedir $(HT)MPRender
	-makedir $(HT)MPRender/Rexx
	execute < <
		cd $(HT)MPRender/Rexx;
		rx ///$(DS)text2html ///$(R)Postscript.MPM Postscript.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/FadeToBlack.MPM.html: $(R)FadeToBlack.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)FadeToBlack.MPM FadeToBlack.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/FadeToWhite.MPM.html: $(R)FadeToWhite.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)FadeToWhite.MPM FadeToWhite.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/PixelMorph.MPM.html: $(R)PixelMorph.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)PixelMorph.MPM PixelMorph.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/PixelWarp.MPM.html: $(R)PixelWarp.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)PixelWarp.MPM PixelWarp.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/PreAll.MPM.html: $(R)PreAll.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)PreAll.MPM PreAll.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/PostAnim.MPM.html: $(R)PostAnim.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)PostAnim.MPM PostAnim.MPM.html;
		cd ///;
	<

$(HT)MPMorph/Rexx/ToHam.MPM.html: $(R)ToHam.MPM $(DS)text2html.rexx
	-makedir $(HT)MPMorph
	-makedir $(HT)MPMorph/Rexx
	execute < <
		cd $(HT)MPMorph/Rexx;
		rx ///$(DS)text2html ///$(R)ToHam.MPM ToHam.MPM.html;
		cd ///;
	<

$(HT)MPGui/main.html: $(MPG)sd/MPGui.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)MPGui/\#? quiet
	-delete $(HT)MPGui quiet
	-makedir $(HT)MPGui
	execute < <
		cd $(HT)MPGui;
		rx //$(DS)texi2html //$(MPG)sd/MPGui.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)EditPrefs/main.html: $(MPG)sd/EditPrefs.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)EditPrefs/\#? quiet
	-delete $(HT)EditPrefs quiet
	-makedir $(HT)EditPrefs
	execute < <
		cd $(HT)EditPrefs;
		rx //$(DS)texi2html //$(MPG)sd/EditPrefs.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)MPImage/main.html: $(MPI)sd/MPImage.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)MPImage/\#? quiet
	-delete $(HT)MPImage quiet
	-makedir $(HT)MPImage
	execute < <
		cd $(HT)MPImage;
		rx //$(DS)texi2html //$(MPI)sd/MPImage.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)MakeMPIndex/main.html: $(MPN)sd/MakeMPIndex.texi $(DS)texi2html.rexx $(DS)links
	-delete $(HT)MakeMPIndex/\#? quiet
	-delete $(HT)MakeMPIndex quiet
	-makedir $(HT)MakeMPIndex
	execute < <
		cd $(HT)MakeMPIndex;
		rx //$(DS)texi2html //$(MPN)sd/MakeMPIndex.texi main.html //$(DS)links ../images/Up;
		cd //;
	<

$(HT)MMRexx/main.html: MPMorph-rexx $(DS)AGDoc2html.rexx
	-delete $(HT)MMRexx/\#? quiet
	-delete $(HT)MMRexx
	-makedir $(HT)MMRexx
	execute < <
		cd $(HT)MMRexx;
		rx //$(DS)AGDoc2html //MPMorph-rexx;
		cd //;
	<

$(HT)MRRexx/main.html: MPRender-rexx $(DS)AGDoc2html.rexx
	-delete $(HT)MRRexx/\#? quiet
	-delete $(HT)MRRexx
	-makedir $(HT)MRRexx
	execute < <
		cd $(HT)MRRexx;
		rx //$(DS)AGDoc2html //MPRender-rexx;
		cd //;
	<

$(HT)MPGuiDoc/main.html: $(D)MPGui.doc $(DS)ADoc2html.rexx
	-delete $(HT)MPGuiDoc/\#? quiet
	-delete $(HT)MPGuiDoc
	-makedir $(HT)MPGuiDoc
	execute < <
		cd $(HT)MPGuiDoc;
		rx //$(DS)ADoc2html //$(D)MPGui.doc;
		cd //;
	<

$(HT)EPRexx/main.html: EditPrefs-rexx $(DS)AGDoc2html.rexx
	-delete $(HT)EPRexx/\#? quiet
	-delete $(HT)EPRexx
	-makedir $(HT)EPRexx
	execute < <
		cd $(HT)EPRexx;
		rx //$(DS)AGDoc2html //EditPrefs-rexx;
		cd //;
	<

$(HT)MPImageDoc/main.html: $(D)MPImage.doc $(DS)ADoc2html.rexx
	-delete $(HT)MPImageDoc/\#? quiet
	-delete $(HT)MPImageDoc
	-makedir $(HT)MPImageDoc
	execute < <
		cd $(HT)MPImageDoc;
		rx //$(DS)ADoc2html //$(D)MPImage.doc;
		cd //;
	<

# Common stuff
$(OS)sprintf.o: $(OS)sprintf.c

$(OS)Args.o: $(OS)Args.c

# MPGui stuff
RunMPGui: $(MPG)RunMPGui
	copy $? $@

$(LIBS)MPGui.library: $(MPG)$(LIBS)MPGui.library
	copy $? $@

# Guide index stuff

MakeMPIndex: $(MPN)MakeMPIndex
	copy $? $@

RunMPIndex: $(MPN)RunMPIndex
	copy $? $@

INDEX1 = MPMorph.guide MPImage.guide Tutorial.guide MPRender.guide RunMPIndex.guide EdgePoints.guide Preview.guide EditPrefs.guide MPGui.guide
INDEX2 = EditPrefs-rexx MPMorph-rexx MPRender-rexx

Docs.Index: MakeMPIndex $(INDEX1) $(INDEX2) $(DS)IgnoreWord
	MakeMPIndex $@ IGNORE=$(DS)IgnoreWord $(INDEX1) $(INDEX2)

# EdgeDetection stuff

$(TS)EdgePoints.ld: $(TS)EdgePoints.c $(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(INC)libraries/MPImage.h
	sc $(CCFLAGS000R) link $*.c to $@

EdgePoints: $(TS)EdgePoints.ld
	slink from $? to $@ stripdebug noicons

# MPImage stuff

ConvertMPImage: $(MPI)ConvertMPImage
	copy $? $@

MPImage.info: $(MPI)MPImage.info
	copy $? $@

MPImage: $(MPI)MPImage
	copy $? $@

$(G)MPImage.gui: $(MPI)gui/MPImage.gui
	copy $? $@

# guide file using MakeInfo
MPImage.guide: $(MPI)MPimage.guide
   copy $? $@

$(LIBS)MPImage.library.000: $(MPI)$(LIBS)MPImage.library.000
	copy $? $@

$(LIBS)MPImage.library.020: $(MPI)$(LIBS)MPImage.library.020
	copy $? $@

$(LIBS)MPImage.library.881: $(MPI)$(LIBS)MPImage.library.881
	copy $? $@

$(LIBS)MPImage.library.040: $(MPI)$(LIBS)MPImage.library.040
	copy $? $@

$(LIBS)MPImage.library.060: $(MPI)$(LIBS)MPImage.library.060
	copy $? $@

# MPMorph debug object
$(MS)MPMorph.ld: $(MPMOBJ)
   slink <WITH <
   FROM lib:c.o $(MPMOBJ)
   LIBRARY lib:scmffp.lib lib:sc.lib LIB:amiga.lib
   TO $@ SC SD BATCH
   VERBOSE
   MAXHUNK 32000
   ADDSYM
   DEFINE @__chkabort=@__dummy
   <

# non debug object
MPMorph: $(MS)MPMorph.ld
   slink $? to $@ STRIPDEBUG

# C object dependencies

# ARexxBoxStuff
$(MA)MPMorph_rxcl.c: $(MA)MPMorph.arb
   echo "Use ARexxBox to regenerate MPMorph ARexx source"
   Fault 10

# ARexxBox does not regenerate the .c file so setdate it if the header has changed
$(MA)MPMorph.c: $(MA)MPMorph.h
   setdate $@

$(MA)MPMorph.h: $(MA)MPMorph.arb
   echo "Use ARexxBox to regenerate MPMorph ARexx source"
   Fault 10

$(MA)MPMorph.o: $(MA)MPMorph.c $(MA)MPMorph.h
   sc $(CCFLAGS000) IGN=178 $*.c

$(MA)MPMorph_rxcl.o: $(MA)MPMorph_rxcl.c $(MA)MPMorph.h

$(MA)MPMorph_rxif.o: $(MA)MPMorph_rxif.c $(MA)MPMorph.h $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h $(MS)MPMorph.gst
   sc $(CCFLAGSG000) $*.c

# Stuff for the strings

$(MS)Messages.o: $(MS)Messages.c $(MS)Messages.h $(MS)MessagesS.h $(MS)MPMorph.h $(MS)MPMorph.gst
   sc $(CCFLAGSG000) $*.c

$(MS)Messages.h: $(MS)MPMorphCat.cd
	CatComp $? CFILE=$@ NOOPTIM NOSTRINGS NOARRAY NOBLOCK NOCODE

$(MS)MessagesS.h: $(MS)MPMorphCat.cd
	CatComp $? CFILE=$@ NOOPTIM NOARRAY NOCODE

# precompiled headers
$(MS)MPMorph.gst: $(MS)MPMorph-headers.c $(MS)MPMorph-amiga.h $(INC)libraries/MPImage.h\
 $(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h\
 $(INC)pragmas/MPGui_pragmas.h $(INC)libraries/MPGui.h\
 $(INC)clib/MPGui_protos.h
   sc $(CCFLAGS000) NOOBJNAME MAKEGST=$@ $*.c

$(MS)Subroutines.o: $(MS)Subroutines.c $(MS)MPMorph.gst $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h
   sc $(CCFLAGSG000) $*.c

# compile with OPTTIME
$(MS)LoadBrushes.o: $(MS)LoadBrushes.c $(MS)MPMorph.gst $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h
   sc $(CCFLAGS000R) GST=$(MS)MPMorph.gst $*.c

$(MS)Frames.o: $(MS)Frames.c $(MS)MPMorph.gst $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h
   sc $(CCFLAGSG000) $*.c

$(MS)ControlWindow.o: $(MS)ControlWindow.c $(MS)MPMorph.gst $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h
   sc $(CCFLAGSG000) $*.c

$(MS)Gui.o: $(MS)Gui.c $(MS)MPMorph.gst $(MS)Gui.h $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h
   sc $(CCFLAGSG000) $*.c

$(MS)MPMorph.o: $(MS)MPMorph.c $(MS)MPMorph.gst $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h $(MA)MPMorph.h
   sc $(CCFLAGSG000) $*.c

$(MS)HandleSettings.o: $(MS)HandleSettings.c $(MS)MPMorph.gst $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h
   sc $(CCFLAGSG000) $*.c

$(MS)EGSStuff.o: $(MS)EGSStuff.c $(MS)MPMorph.gst $(MS)MPMorph.h $(MS)EGSStuff.h $(MS)messages.h $(MS)Gui.h
   sc $(CCFLAGSG000) $*.c

$(MS)help.o: $(MS)help.c $(MS)Messages.h
   sc $(CCFLAGSG000) $*.c

# brushes
$(CS)Xu2.o: $(CS)Xu2.c

$(CS)Xu1.o: $(CS)Xu1.c

$(CS)Xtwo.o: $(CS)Xtwo.c

$(CS)Xrel.o: $(CS)Xrel.c

$(CS)Xone.o: $(CS)Xone.c

$(CS)Xmov.o: $(CS)Xmov.c

$(CS)Xl2.o: $(CS)Xl2.c

$(CS)Xl1.o: $(CS)Xl1.c

$(CS)Xdel.o: $(CS)Xdel.c 

$(CS)Xadd.o: $(CS)Xadd.c

# pointer
$(BS)add.o: $(BS)add.c

$(BS)del.o: $(BS)del.c

$(BS)link.o: $(BS)link.c

$(BS)none.o: $(BS)none.c

$(BS)one.o: $(BS)one.c

$(BS)rel.o: $(BS)rel.c

$(BS)two.o: $(BS)two.c

$(BS)unlink.o: $(BS)unlink.c

$(BS)1st.o: $(BS)1st.c

$(BS)last.o: $(BS)last.c

$(BS)goto.o: $(BS)goto.c

$(BS)prev.o: $(BS)prev.c

$(BS)next.o: $(BS)next.c

# MPRender.000 debug object
$(RS)MPRender.000.ld: $(RENDERO000)
   slink <WITH <
   FROM lib:c.o $(RENDERO000)
   LIBRARY lib:scmffp.lib lib:sc.lib LIB:amiga.lib
   TO $@ SC SD BATCH
   VERBOSE
	ADDSYM
   DEFINE @__chkabort=@__dummy
   <

# non debug object
MPRender.000: $(RS)MPRender.000.ld
   slink $? to $@ STRIPDEBUG

# MPRender.020 debug object
$(RS)MPRender.020.ld: $(RENDERO020)
   slink <WITH <
   FROM lib:c.o $(RENDERO020)
   LIBRARY lib:scmffp.lib lib:sc.lib LIB:amiga.lib
   TO $@ SC SD BATCH
   VERBOSE
	ADDSYM
   DEFINE @__chkabort=@__dummy
   <

# non debug object
MPRender.020: $(RS)MPRender.020.ld
   slink $? to $@ STRIPDEBUG

# MPRender.881 debug object
$(RS)MPRender.881.ld: $(RENDER881O)
   slink <WITH <
   FROM lib:c.o $(RENDER881O)
   LIBRARY lib:scm881.lib lib:sc.lib LIB:amiga.lib
   TO $@ SC SD BATCH
   VERBOSE
	ADDSYM
   DEFINE @__chkabort=@__dummy
   <

# non debug object
MPRender.881: $(RS)MPRender.881.ld
   slink $? to $@ STRIPDEBUG

# MPRender.040 debug object
$(RS)MPRender.040.ld: $(RENDER040O)
   slink <WITH <
   FROM lib:c.o $(RENDER040O)
   LIBRARY lib:scm881.lib lib:sc.lib LIB:amiga.lib
   TO $@ SC SD BATCH
   VERBOSE
	ADDSYM
   DEFINE @__chkabort=@__dummy
   <

# non debug object
MPRender.040: $(RS)MPRender.040.ld
   slink $? to $@ STRIPDEBUG

# MPRender.060 debug object
$(RS)MPRender.060.ld: $(RENDER060O)
   slink <WITH <
   FROM lib:c.o $(RENDER060O)
   LIBRARY lib:scm881.lib lib:sc.lib LIB:amiga.lib
   TO $@ SC SD BATCH
   VERBOSE
	ADDSYM
   DEFINE @__chkabort=@__dummy
   <

# non debug object
MPRender.060: $(RS)MPRender.060.ld
   slink $? to $@ STRIPDEBUG

# C object dependencies

# Generate .881 object
$(RS)MPMorph-render881.o: $(RS)MPMorph-render.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

$(RS)Subs881.o: $(RS)Subs.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

$(RS)RenderSub881.o: $(RS)RenderSub.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

$(RS)FindPoint881.o: $(RS)FindPoint.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

# Generate .000 object
$(RS)MPMorph-render000.o: $(RS)MPMorph-render.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS000R) ObjectName=$@ $*.c

$(RS)Subs000.o: $(RS)Subs.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

$(RS)RenderSub000.o: $(RS)RenderSub.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS000R) ObjectName=$@ $*.c

$(RS)FindPoint000.o: $(RS)FindPoint.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS000R) ObjectName=$@ $*.c

# Generate .020 object
$(RS)MPMorph-render020.o: $(RS)MPMorph-render.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS020) ObjectName=$@ $*.c

$(RS)Subs020.o: $(RS)Subs.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

$(RS)RenderSub020.o: $(RS)RenderSub.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS020) ObjectName=$@ $*.c

$(RS)FindPoint020.o: $(RS)FindPoint.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS020) ObjectName=$@ $*.c

# Generate .040 object
$(RS)MPMorph-render040.o: $(RS)MPMorph-render.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS040) ObjectName=$@ $*.c

$(RS)Subs040.o: $(RS)Subs.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

$(RS)RenderSub040.o: $(RS)RenderSub.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS040) ObjectName=$@ $*.c

$(RS)FindPoint040.o: $(RS)FindPoint.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS040) ObjectName=$@ $*.c

# Generate .060 object
$(RS)MPMorph-render060.o: $(RS)MPMorph-render.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS060) ObjectName=$@ $*.c

$(RS)Subs060.o: $(RS)Subs.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS881) ObjectName=$@ $*.c

$(RS)RenderSub060.o: $(RS)RenderSub.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS060) ObjectName=$@ $*.c

$(RS)FindPoint060.o: $(RS)FindPoint.c $(RS)progress.h $(RS)Render.h $(INC)libraries/MPImage.h \
				$(INC)pragmas/MPImage_pragmas.h $(INC)clib/MPImage_protos.h $(RA)Render.h
   sc $(CCFLAGS060) ObjectName=$@ $*.c

$(RS)Progress.o: $(RS)Progress.c $(RS)Progress.h

# ARexxBoxStuff
$(RA)Render_rxcl.c: $(RA)Render.arb
   echo "Use ARexxBox to regenerate MPRender ARexx source"
   Fault 10

# ARexxBox does not regenerate the .c file so setdate it if the header has changed
$(RA)Render.c: $(RA)Render.h
   setdate $@

$(RA)Render.h: $(RA)Render.arb
   echo "Use ARexxBox to regenerate MPRender ARexx source"
   Fault 10

$(RA)Render.o: $(RA)Render.c $(RA)Render.h
	sc $(CCFLAGS000) IGN=178 $*.c

$(RA)Render_rxcl.o: $(RA)Render_rxcl.c $(RA)Render.h

$(RA)Render_rxif.o: $(RA)Render_rxif.c $(RA)Render.h $(RS)Render.h

$(RS)trap0.o: $(RS)trap0.asm
	asm -d $*.asm

# EditPrefs
EditPrefs: $(MPG)EditPrefs
	copy $? $@

# ag2txt debug object
#ag2txt/ag2txt.ld: ag2txt/ag2txt.o
#   slink <WITH <
#   FROM lib:c.o ag2txt/ag2txt.o
#   LIBRARY lib:sc.lib LIB:amiga.lib
#   TO $@ SC SD BATCH
#   VERBOSE
#	ADDSYM
#   DEFINE @__chkabort=@__dummy
#   <

# non debug object
#ag2txt/ag2txt: ag2txt/ag2txt.ld
#   slink $? to $@ STRIPDEBUG

# Hack .guide to .doc
#ag2txt/ag2txt.o: ag2txt/ag2txt.c

