# acssum
# <c_iraf.h> is included in 'acssum.h' in order to define IRAFPointer 

$call update
$exit

devdebug:
	$set XFLAGS = "-Inolibc  -g -q $(XFLAGS)"
	$set LFLAGS = "-H -z -x -p tables -p stsdas"
	$call updatedir
	$call installdev
	$exit
	;		
	
dev:
	$set XFLAGS = "-Inolibc $(XFLAGS)"
# Next line contains flag for creating code that contains profile info
#	$set XFLAGS = "-Inolibc -/p $(XFLAGS)"
	$set LFLAGS = "-H -z -p tables -p stsdas $(LFLAGS)"
	$call updatedir
	$call installdev
	;

debug:
	$set XFLAGS = "-Inolibc  -g -q $(XFLAGS)"
	$set LFLAGS = "-H -z -x -p tables -p stsdas"
	$call updatedir
	$call install
	$exit
	;		
	
update:
	$set XFLAGS = "-Inolibc $(XFLAGS)"
	$set LFLAGS = "-H -z -p tables -p stsdas $(LFLAGS)"
	$call updatedir
	$call install
	;

updatedir:
	$checkout calwf3.a ../
	$update calwf3.a
	$checkin calwf3.a ../

	$call relink
	;

linkonly:
	$set XFLAGS = "-Inolibc $(XFLAGS)"
# Next line contains flag for creating code that contains profile info
#	$set XFLAGS = "-Inolibc -/p $(XFLAGS)"
	$set LFLAGS = "-H -z -p tables -p stsdas $(LFLAGS)"

relink:

	$omake mainsum.c <c_iraf.h> ../wf3.h wf3sum.h ../wf3err.h <hstio.h>

	$link mainsum.o ../calwf3.a -lhstio -lcvos\
		-o wf3sum.e
	;
#		-/p\

installdev:
	$move wf3sum.e   /user/sosey/wfc3/pipeline/bin/
    ;
    
install:
	$move wf3sum.e stsdasbin$
	;

calwf3.a:
	wf3sum.c	../wf3.h ../wf3err.h wf3sum.h <hstio.h>
	;
