# ------------------------------------------------------------------------
# 	C Compiler options 
# ------------------------------------------------------------------------

CC          = gcc
CFLAGS  	= -g -Wall
DEFINES     =  -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC_H=1 -Dstrtod=fixstrtod

# ------------------------------------------------------------------------
# 	Directories containing Tcl and Tk include files and libraries
# ------------------------------------------------------------------------

TCL_INCLUDE   	= -I/net/aviris.ece/export/home/tcltk/include
TK_INCLUDE    	= -I/net/aviris.ece/export/home/tcltk/include
X_INCLUDE     	= -I/usr/openwin/include

# ------------------------------------------------------------------------
#       Libraries directives for Tcl, Tk, X11, and tclSadie
# ------------------------------------------------------------------------

X_LIB        = -L/usr/openwin/lib -lX11 -lm
TK_LIB       = -L/net/aviris.ece/export/home/tcltk/lib -ltk8.0
TCL_LIB      = -L/net/aviris.ece/export/home/tcltk/lib -ltcl8.0
DL_LIBS      = -ldl
EXTRA_LIBS   = -lsocket -lnsl -lm

# ------------------------------------------------------------------------
# 	Don't edit anything beyond this point
# ------------------------------------------------------------------------

OBJS = 	TREES_xdate.o \
        correlate.o

SRCS = 	TREES_xdate.c \
        correlate.c 

INCLUDES	= -I. -I./.. $(TK_INCLUDE) $(TCL_INCLUDE) $(X_INCLUDE)
CC_SWITCHES	= $(CFLAGS) $(DEFINES) $(INCLUDES)
LIBRARIES   = $(TK_LIB) $(TCL_LIB) $(X_LIB) $(DL_LIBS) $(EXTRA_LIBS)
RANLIB   	= ranlib
SHELL    	= /bin/sh
AR       	= ar rc
RM       	= rm -f
srcdir 		= .

all: xdate

xdate: $(OBJS)
	$(CC)  $(OBJS) $(LIBRARIES)  -o xdate
	@echo "make finished on `date`"

clean:
	$(RM) $(OBJS)

.c.o:
	$(CC) -c $(CC_SWITCHES) $<


