#
# makefile to create DESK2.PRG
#
CFLAGS = -A -NOVSTRICT

OBJ = 	startup.o handlers.o windows.o redraw.o resource.o\
	bindings.o stuffptr.o convert.o menu.o draw.o dbase.o\
	scanrect.o text.o file.o butor.o icons.o\
	bookd.o bookm.o metamake.o haftone.o dotext.o errors.o comp.o bend.o\
        ifout.o buffer.o calc.o dshy.o hycod.o ftmgr.o asm.o\
        cmd.o hj.o setup.o keycurs.o twdraw.o twcmd.o tagmenu.o\
	bgmed.o malloc.o rotate.o fastrot.o cache.a ifont.a

desk2mod.prg:	$(OBJ)
		$(CC) -s -o desk2mod.prg $(OBJ) -lm -laes -lvdi

startup.o:	startup.c     define.h gemdefs.h osbind.h alert.h

handlers.o:     handlers.c    define.h gemdefs.h deskset2.h obdefs.h osbind.h\
			      alert.h comp.h dbase.h

windows.o:	windows.c     define.h gemdefs.h obdefs.h deskset2.h alert.h

redraw.o:       redraw.c      define.h gemdefs.h obdefs.h osbind.h deskset2.h\
                              defs.h dbase.h alert.h

resource.o:     resource.c    define.h deskset2.h gemdefs.h obdefs.h alert.h\
                              osbind.h comp.h dbase.h

bindings.o:	bindings.c    portab.h

stuffptr.o:     stuffptr.s
		as68 -l -u stuffptr.s
		drtomw stuffptr.o

scanrect.o:     scanrect.s
		as68 -l -u scanrect.s
		drtomw scanrect.o

butor.o:	butor.s
		as68 -l -u butor.s
		drtomw butor.o

convert.o: 	convert.c     define.h deskset2.h obdefs.h gemdefs.h

menu.o:	        menu.c        define.h deskset2.h obdefs.h gemdefs.h osbind.h\
                              alert.h comp.h dbase.h

draw.o:		draw.c        define.h deskset2.h obdefs.h gemdefs.h comp.h\
                              dbase.h

dbase.o:	dbase.c	      comp.h dbase.h alert.h osbind.h deskset2.h

text.o:		text.c	     osbind.h

file.o:		file.c	     osbind.h alert.h gemdefs.h dbase.h deskset2.h\
                             obdefs.h

icons.o:	icons.c      osbind.h deskset2.h alert.h gemdefs.h 

bookd.o:	bookd.c

bookm.o:	bookm.c

metamake.o:	metamake.c   osbind.h gemdefs.h alert.h

haftone.o:      haftone.s
		mac -fmu haftone.s

asm.o:		asm.c		defs.h

buffer.o:	buffer.c	defs.h define.h stdio.h osbind.h 

calc.o:		calc.c		defs.h comp.h table.h cnvrt.h

comp.o:		comp.c		defs.h comp.h

dshy.o:		dshy.c		dshy.h comp.h

ftmgr.o:	ftmgr.c		deskset2.h defs.h comp.h stdio.h define.h\
                                gemdefs.h obdefs.h osbind.h 

hycod.o:	hycod.c

ifout.o:	ifout.c		comp.h cache.h bitmap.h gemdefs.h obdefs.h

bend.o:		bend.c		defs.h comp.h cmd.h

cmd.o:		cmd.c		comp.h

dotext.o:	dotext.c	comp.h gemdefs.h obdefs.h

hj.o:		hj.c		obdefs.h gemdefs.h osbind.h deskset2.h comp.h

errors:		errors.c	alert.h

setup.o:	setup.c		deskset2.h comp.h obdefs.h gemdefs.h osbind.h

twdraw.o:       twdraw.c        defs.h gemdefs.h obdefs.h

twcmd.o:	twcmd.c		deskset2.h defs.h keys.h gemdefs.h obdefs.h\
				dbase.h

keycurs.o:	keycurs.c	gemdefs.h obdefs.h osbind.h

tagmenu.o:	tagmenu.c	deskset2.h tags.h gemdefs.h obdefs.h comp.h

bgmed.o:	bgmed.c

malloc.o:	malloc.c	osbind.h

rotate.o:	rotate.s	
		mac -fmu rotate.s

fastrot.o:	fastrot.s
		mac -fmu fastrot.s
