# Make DITHER 
#
# Author: I.Busko, 29-MAY-96
#
#   Special keywords recognized by IRAF mkpkg files:
#
#	mkpkg relink		update object library and link
#	mkpkg linkonly		skip object library updates and just link
#	mkpkg install		move executable to lib$
#	mkpkg update		update object library, link, and move to lib$

$call	relink
$exit

update:
	$call 	update@drizzle
	$call	relink
	$call	install
	;

debug:
	$set	XFLAGS = "-fgq -/pg $(XFLAGS)"
	$set	LFLAGS = "     -/pg $(LFLAGS)"
	$call	relink
	;

relink:
	$call 	relink@drizzle
	$update	olddither.a
	$call	dither
	;

install:
	$call	install@drizzle
	$move	xx_olddither.e stsdasbin$x_olddither.e
	;

dither:
linkonly:
        $set    LIBS1 = "-lsynphot -liraf77 -lapplib -lgflib -lgilib -lxtools"
        $set    LIBS2 = "-luttables -ltbtables -liminterp"
	$omake	x_dither.x
	$link	x_dither.o olddither.a $(LIBS1) $(LIBS2) -o  xx_olddither.e
	;

olddither.a:
	imextreme.x	<imhdr.h>
	@gsky
	;
