SCFLAGS = optimize opttime nodebug parm=reg nostackcheck math=ieee \
          stringmerge smallcode smalldata gst=t:includes.gst

#SCFLAGS = nooptimize debug=full parm=reg math=ieee \
#          stringmerge smallcode smalldata

flick: flick.c t:includes.gst median.o c2p320x200.o c2p640x480.o
	sc link $(SCFLAGS) flick.c median.o c2p320x200.o c2p640x480.o

median.o: median.c t:includes.gst
	sc $(SCFLAGS) median.c

c2p320x200.o: adaptive.s smakefile
	macro68 -D "width=320,height=200" adaptive.s -o c2p320x200.o

c2p640x480.o: adaptive.s smakefile
	macro68 -D "width=640,height=480" adaptive.s -o c2p640x480.o

t:includes.gst: includes.h smakefile
	sc $(SCFLAGS) makegst=t:includes.gst includes.h
