# Edit the following variables as needed
HDF_INSTALL =  
FC        = f77
FFLAGS    = 
LIB       = -lm
 
LIBSHDF   = $(HDF_INSTALL)/lib/libmfhdf.a $(HDF_INSTALL)/lib/libdf.a \
$(HDF_INSTALL)/lib/libjpeg.a $(HDF_INSTALL)/lib/libz.a

VD:  create_vdatas \
	create_onefield_vdatas \
	write_to_vdata \
	write_mixed_vdata \
	read_from_vdata \
	read_mixed_vdata \
	locate_vdata \
	set_get_vdata_attr \
	get_vdata_info 

create_vdatas: create_vdatas.f 
	$(FC) $(FFLAGS) -o $@ create_vdatas.f $(LIBSHDF) $(LIB)

create_onefield_vdatas: create_onefield_vdatas.f
	$(FC) $(FFLAGS) -o $@ create_onefield_vdatas.f $(LIBSHDF) $(LIB)

write_to_vdata: write_to_vdata.f
	$(FC) $(FFLAGS) -o $@ write_to_vdata.f $(LIBSHDF) $(LIB)

write_mixed_vdata: write_mixed_vdata.f
	$(FC) $(FFLAGS) -o $@ write_mixed_vdata.f $(LIBSHDF) $(LIB)
 
read_from_vdata: read_from_vdata.f
	$(FC) $(FFLAGS) -o $@ read_from_vdata.f $(LIBSHDF) $(LIB)
 
read_mixed_vdata: read_mixed_vdata.f
	$(FC) $(FFLAGS) -o $@ read_mixed_vdata.f $(LIBSHDF) $(LIB)
 
locate_vdata: locate_vdata.f
	$(FC) $(FFLAGS) -o $@ locate_vdata.f $(LIBSHDF) $(LIB)

set_get_vdata_attr: set_get_vdata_attr.f
	$(FC) $(FFLAGS) -o $@ set_get_vdata_attr.f $(LIBSHDF) $(LIB)

get_vdata_info: get_vdata_info.f
	$(FC) $(FFLAGS) -o $@ get_vdata_info.f $(LIBSHDF) $(LIB)

clean: 
	rm -f *.o create_vdatas \
	create_onefield_vdatas \
	write_to_vdata \
	write_mixed_vdata \
	read_from_vdata \
	read_mixed_vdata \
	locate_vdata \
	set_get_vdata_attr \
	get_vdata_info 
.SUFFIXES:.o.f
