#*****************************************************
#  CS225 General Makefile
#
#  File originally written by Matt Buchanan in Fall 1995
#
#*****************************************************


#**************************************************************************
# List of .o files that EXENAME depends on.  Edit as appropriate for MP.

OBJS = \
	array.o asserts.o hashbase.o closehash.o setlookup.o itdoublist.o nodedisjoint.o stack.o string.o main.o


#**************************************************************************
# Change this line if you don't like 'a.out'.

EXENAME = a.out


#**************************************************************************
# Macros defining the C/C++ compiler and linker.

CC = CC 
CCOPTS = -g +w
LINK = CC 
LINKOPTS = -L/opt/SUNWspro/SC4.2/lib


#**************************************************************************
# Rules for building EXENAME from OBJS and OBJS from your source.

$(EXENAME):  $(OBJS)
	purify $(LINK) $(LINKOPTS) $(OBJS)

clean:
	-rm *.o *~ $(EXENAME)
	-rm -r Templates.DB

array.o: array.C array.h asserts.h
	$(CC) -c $(CCOPTS) array.C

asserts.o: asserts.C asserts.h
	$(CC) -c $(CCOPTS) asserts.C

hashbase.o: hashbase.C hashbase.h array.h asserts.h
	$(CC) -c $(CCOPTS) hashbase.C

closehash.o: closehash.C closehash.h hashbase.h
	$(CC) -c $(CCOPTS) closehash.C

setlookup.o: setlookup.C setlookup.h closehash.h hashbase.h 
	$(CC) -c $(CCOPTS) setlookup.C

itdoublist.o: itdoublist.C itdoublist.h asserts.h
	$(CC) -c $(CCOPTS) itdoublist.C

nodedisjoint.o: nodedisjoint.C nodedisjoint.h setlookup.h itdoublist.h stack.h
	$(CC) -c $(CCOPTS) nodedisjoint.C

stack.o: stack.C stack.h singlist.h asserts.h
	$(CC) -c $(CCOPTS) stack.C

singlist.o: singlist.C singlist.h asserts.h
	$(CC) -c $(CCOPTS) singlist.C

string.o: string.C string.h asserts.h
	$(CC) -c $(CCOPTS) string.C

main.o : main.C nodedisjoint.h
	$(CC) -c $(CCOPTS) main.C
