# This Makefile builds the hdf unpacking programs and sample programs
# for accessing the HDF files. We assume that version HDF version 3.3
# is being used. 

# Edit below Macros to reflect the location of your HDF libaries.

  HDFROOT = /tools/hdf3.3
  INCLUDE = -I$(HDFROOT)/include 
  LIBS   = -L$(HDFROOT)/lib -lnetcdf -ldf

# 
# Uncomment below for use on a SunOS machine. You need an Ansi-C compiler 
#
#    CC  = acc      #  Alternatively use gcc
#    CFLAGS = -O    #  
#    FFLAGS = -g  
#    F77 = f77

# Uncomment below for use on HP-UX machine and if you are using the
#  native HP compiler. When using gcc use CC=gcc, CFLAGS= -O
  CC =cc
  CFLAGS = -O -Aa -DHP9000  # (The native HP-UX C compiler doesn't do ansi-c 
                            #  y default)
  F77 = fort77              # f77 on HP-UX doesn't like the -L switches )
  FFLAGS = -g 

# Uncomment below for use on Solaris machines
# CC  =cc 
# CFLAGS = -O
# FFLAGS = -g 
# F77 = f77  

.c.o:
	$(CC) -c  $(CFLAGS) $(INCLUDE) $<

unpack: unpack.o creadpathP.o
	$(CC) $(INCLUDE) unpack.o creadpathP.o  $(LIBS) -o $@

sample_readpathP_c: sample_readpathP_c.o creadpathP.o
	$(CC) $(INCLUDE) sample_readpathP_c.o creadpathP.o  $(LIBS) -o $@

sample_readpathP_f: sample_readpathP_f.o freadpathP.o 
	$(F77)  sample_readpathP_f.o freadpathP.o   $(LIBS) -o $@














