SRCCOM = 
SRC17 = snap2d17_steer.f

OPT_SX4  = -Wf"-pvctl nomsg" -dW
OPT_SX  = -Wf"-pvctl nomsg" -dW
OPT_SX90 = -h ary90
OPT_NEC = -Zstatic
OPT_SUN = 
OPT_386 = -save -zero -static -convert big_endian -assume byterecl

LIB_SX8  = -L../../../../lib/ -lnorhsx8  -L/share/norh_local/lib -lsslsx8  -lfitsiosx8 -lasl
LIB_SX5  = -L../../../../lib/ -lnorhsx5  -L/share/norh_local/lib -lsslsx5  -lfitsiosx5 -lasl
LIB_SX4  = -L../../../../lib/ -lnorhsx4  -L/share/norh_local/lib -lsslsx4  -lfitsiosx4 -lasl
LIB_SX  = -L../../../../lib/ -lnorhsx  -L/share/norh_local/lib -lsslsx  -lfitsiosx -L/xmu/lib -lasl
LIB_NEC = -L../../../../lib/ -lnorhnec -L/share/norh_local/lib -lsslnec -lfitsionec 
LIB_SUN = -L../../../../lib/ -lnorhsun -L/share/norh_local/lib -L/usr/local/lib/  -ssl -lfits
LIB_386 = -L../../../../lib -lnorhlinux -L/share/norh_local/lib -lssllinux -lcfitsiolinux


OBJCOM    = $(SRCCOM:.f=.o)
OBJ17     = $(SRC17:.f=.o)

linux : koshix17_Linux
koshix17_Linux : $(SRCCOM) $(SRC17)
	ifort $(OPT_386) -o $@ $(SRC17) $(SRCCOM) $(LIB_386)

sx8 : koshix17_sx8
koshix17_sx8 : $(SRCCOM) $(SRC17)
	f90 $(OPT_SX4) -o $@ $(SRC17) $(SRCCOM) $(LIB_SX8)

sx5 : koshix17_sx5
koshix17_sx5 : $(SRCCOM) $(SRC17)
	f90 $(OPT_SX4) -o $@ $(SRC17) $(SRCCOM) $(LIB_SX5)

sx4 : koshix17_sx4
koshix17_sx4 : $(SRCCOM) $(SRC17)
	f90 $(OPT_SX4) -o $@ $(SRC17) $(SRCCOM) $(LIB_SX4)

sx : koshix17_sx
koshix17_sx : $(SRCCOM) $(SRC17)
	f77 $(OPT_SX) -o $@ $(SRC17) $(SRCCOM) $(LIB_SX)


nec : koshix17_nec 
koshix17_nec : $(SRCCOM) $(SRC17)
	f77 -c $(OPT_NEC) $(SRCCOM) $(SRCCOM_SSL) $(SRC17)
	f77 -o $@ $(OBJ17) $(OBJCOM) $(OBJCOM_SSL) $(LIB_NEC)

sun : koshix17_sun
koshix17_sun : $(SRCCOM) $(SRC17)
	f77 -c $(OPT_SUN) $(SRCCOM) $(SRCCOM_SSL) $(SRC17)
	f77 -o $@ $(OBJ17) $(OBJCOM) $(OBJCOM_SSL) $(LIB_SUN)

clean :
	\rm *.o 
