####
#### 	i.rectify3 (cmd) 
####

PGM  	= i.rectify3

####    required - suplimental imagery libary
IMAGERY_SUBINC = $(SRC)/libes/image3

all:	$(BIN_CMD)/$(PGM)


####	object files
LIST = main.o\
	check_files.o\
	check_wind.o\
	cp.o\
	compress.o\
	env.o\
	exec.o\
        georef_wind.o\
	mail.o\
	matrix.o\
	parse.o\
	perform.o\
	read_elev.o\
	rectify.o\
	report.o\
	target.o\
	write.o


####	object dependencies
$(LIST): global.h rowcol.h parse.h

LIBES =  $(IMAGERYLIB) $(IMAGESUPLIB) $(D_LIB)\
	 $(DISPLAYLIB) $(RASTERLIB) $(VECTLIB) \
	 $(GPROJLIB) $(COORCNVLIB) $(GISLIB)

DEPLIBS= $(DEPIMAGERYLIB) $(DEPIMAGESUPLIB) $(DEPD_LIB)\
	 $(DEPDISPLAYLIB) $(DEPRASTERLIB) $(DEPVECTLIB) \
	 $(DEPGPROJLIB) $(DEPCOORCNVLIB) $(DEPGISLIB)


####	library dependencies
$(DEPLIBS): # in case of lib changes

####	required compile flags
EXTRA_CFLAGS = $(VECT_INCLUDE) -I$(IMAGERY_SUBINC)

####	any program required link flags
#EXTRA_LDFLAGS 


####	the rules
$(BIN_CMD)/$(PGM): $(LIST) $(DEPLIBS) 
	$(CC) $(LDFLAGS) -o $@ $(LIST) $(LIBES) $(XDRLIB) $(MATHLIB)

