# $Header: /usr/u/jmiller/cs664/RCS/Makefile,v 1.1 1994/02/21 19:42:43 jmiller Exp jmiller $
# to debug malloc /usr/lib/debug/malloc.o
%: RCS/%,v
	co $<
INCDIR = .
LIBDIR = #
SRCDIR = .

OPT  = -O4
DBGR = #-ggdb -DUSING_GDB
PROF = #-pg -DMARK
WARN = -Wall -Wcast-qual -Wcast-align -Wconversion
#uncomment for the right set of DEF's first is linux, then solaris, then sunos
#DEFS = -DMULTIPROC -DSVR4 -DLINUX
DEFS = -DMULTIPROC -DSVR4
#DEFS = -DMULTIPROC -DSUNOS

OCC = CC;
CC = gcc
CFLAGS = -pipe $(PROF) -I$(INCDIR) $(DBGR) $(WARN) $(OPT) $(DEFS)

LINK = gcc

LIB = image.o
INC = 

SRC = dissolvem.c thresher.c image.c routines.c utility.c boxGaussian.c cannyEdge.c \
	hausd_corr.c datafile.c solaris.c maindiss.c


OBJ = $(SRC:.c=.o)

all: TAGS $(OBJ) dissolvem thresher
	
clean:
	/bin/rm $(OBJ) TAGS

TAGS: $(SRC) $(INC)
	/usr/local/bin/etags -t $(SRC) $(INC)

index: 
	ctags -wv $(SRC) |sort -f

depend:
	makedepend -- $(CFLAGS) -- $(SRC)

thresher: thresher.o datafile.o
	$(CC) $(PROF) -o thresher thresher.o datafile.o $(LIB) -lm

dissolvem: dissolvem.o routines.o boxGaussian.o cannyEdge.o hausd_corr.o utility.o datafile.o image.o  solaris.o maindiss.o
	$(CC) $(PROF) -o dissolvem maindiss.o dissolvem.o routines.o boxGaussian.o cannyEdge.o hausd_corr.o utility.o datafile.o solaris.o $(LIB) -lm


# DO NOT DELETE THIS LINE -- make depend depends on it.
