# Edit the following variables as needed
HDF_INSTALL = 
CC          = cc
CFLAGS      = 
LIB         = -lm

INCLUDE   = -I$(HDF_INSTALL)/include
LIBSHDF   = -L$(HDF_INSTALL)/lib -lmfhdf -ldf -ljpeg -lz

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.c 
	$(CC) $(CFLAGS) -o $@ create_vdatas.c $(INCLUDE) $(LIBSHDF) $(LIB)

create_onefield_vdatas: create_onefield_vdatas.c
	$(CC) $(CFLAGS) -o $@ create_onefield_vdatas.c $(INCLUDE) $(LIBSHDF) $(LIB)

write_to_vdata: write_to_vdata.c
	$(CC) $(CFLAGS) -o $@ write_to_vdata.c $(INCLUDE) $(LIBSHDF) $(LIB)

write_mixed_vdata: write_mixed_vdata.c
	$(CC) $(CFLAGS) -o $@ write_mixed_vdata.c $(INCLUDE) $(LIBSHDF) $(LIB)
 
read_from_vdata: read_from_vdata.c
	$(CC) $(CFLAGS) -o $@ read_from_vdata.c $(INCLUDE) $(LIBSHDF) $(LIB)
 
read_mixed_vdata: read_mixed_vdata.c
	$(CC) $(CFLAGS) -o $@ read_mixed_vdata.c $(INCLUDE) $(LIBSHDF) $(LIB)
 
locate_vdata: locate_vdata.c
	$(CC) $(CFLAGS) -o $@ locate_vdata.c $(INCLUDE) $(LIBSHDF) $(LIB)

set_get_vdata_attr: set_get_vdata_attr.c
	$(CC) $(CFLAGS) -o $@ set_get_vdata_attr.c $(INCLUDE) $(LIBSHDF) $(LIB)

get_vdata_info: get_vdata_info.c
	$(CC) $(CFLAGS) -o $@ get_vdata_info.c $(INCLUDE) $(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.c
