#----------------------------------------------------------------------
# Makefile for ICoons.
#
# For a NTSC version:
#	Use GadToolsBox on Windows_NTSC.g to generate windows.c & windows.h
#	and compile with -DNTSC option
#
# For a PAL version:
#	Use GadToolsBox on Windows_PAL.g to generate windows.c & windows.h
#	and compile WITHOUT -DNTSC option
#
#----------------------------------------------------------------------
#
# Rules:
#
CC	= 	gcc
#
.DEFAULT:

#
# Debug flags:
#
DEBUG	= 

#
# Machine dependent flags:
#

MFLAGS	= 	-m68881 -m68020
#MFLAGS	=
#
# NTSC Flag:
#
#NTSC	= -DNTSC
NTSC	= 

#
CFLAGS 	= 	$(DEBUG) $(MFLAGS) $(NTSC)

LFLAGS 	= 	$(CFLAGS) 

LIBS	= 	gcc:lib/libsipp.a -lamiga -lm

#
# What this makefile produces:
#

TARGET	= 	ICoons

OBJS  	= 	globals.o intui.o timer.o spl_math.o spl_util.o spl_gfx.o \
		file.o ttddd.o tesselate.o commands.o knotinfo.o windows.o \
		render.o normal.o add.o rotate_p.o pan.o center.o group.o move.o \
		scale_g.o rotate_g.o origin.o config.o

all:		$(TARGET)

ICoons:		ICoons.o $(OBJS)
		$(CC) $(LFLAGS) -o ICoons ICoons.o $(OBJS) $(LIBS)

clean:
		delete #?.o
    		delete ICoons

#----------------------------------------------------------------------
# Dependencies (probably not up to date):
#----------------------------------------------------------------------

ICoons.o:	ICoons.c general.h globals.h intui.h file.h normal.h

globals.o:	globals.c general.h globals.h

intui.o:	intui.c general.h globals.h intui.h timer.h windows.h \
		commands.h knotinfo.h rotate_p.h pan.h center.h group.h \
		scale_g.h rotate_g.h move.h origin.h spl_gfx.h

timer.o:	timer.c general.h globals.h intui.h timer.h

spl_math.o:	spl_math.c general.h globals.h spl_math.h

spl_util.o:	spl_util.c general.h globals.h spl_math.h spl_util.h \
		spl_gfx.h intui.h

spl_gfx.o:	spl_gfx.c general.h globals.h intui.h spl_math.h \
		spl_util.h spl_gfx.h

file.o:		file.c general.h globals.h intui.h spl_util.h file.h

render.o:	render.c render.h general.h globals.h tesselate.h

ttddd.o:	ttddd.c ttddd.h general.h globals.h tesselate.h

tesselate.o:	tesselate.c tesselate.h general.h globals.h intui.h \
		spl_math.h

commands.o:	commands.c general.h globals.h intui.h spl_math.h \
		spl_util.h spl_gfx.h \
		file.h ttddd.h add.h move.h scale_g.h rotate_g.h \
		knotinfo.h commands.h

knotinfo.o:	knotinfo.c general.h globals.h intui.h spl_math.h \
		spl_util.h knotinfo.h

normal.o:	normal.c general.h globals.h intui.h spl_math.h \
		spl_util.h spl_gfx.h pan.h add.h move.h normal.h

move.o:		move.c general.h globals.h intui.h spl_math.h \
		spl_util.h spl_gfx.h move.h


scale_g.o:	scale_g.c general.h globals.h intui.h timer.h \
		spl_math.h spl_util.h spl_gfx.h scale_g.h

rotate_g.o:	rotate_g.c general.h globals.h intui.h timer.h \
		spl_math.h spl_util.h spl_gfx.h rotate_g.h

origin.o:	origin.c general.h globals.h intui.h normal.h \
		spl_math.h spl_util.h spl_gfx.h origin.h

add.o:		add.c general.h globals.h intui.h spl_math.h \
		spl_util.h spl_gfx.h add.h move.h

rotate_p.o:	rotate_p.c general.h globals.h intui.h timer.h \
		spl_math.h spl_util.h spl_gfx.h rotate_p.h

pan.o:		pan.c general.h globals.h intui.h timer.h \
		spl_math.h spl_util.h spl_gfx.h pan.h

center.o:	center.c general.h globals.h intui.h normal.h \
		spl_math.h spl_util.h spl_gfx.h center.h

group.o:	group.c general.h globals.h intui.h normal.h \
		spl_math.h spl_util.h spl_gfx.h group.h

config.o:	config.c general.h globals.h intui.h config.h
