# makefile for multigrid program, SGI version

C859 = /afs/cs/project/classes-ph/859E/pub

# include and library paths
IPATH = -I$(C859)/include
LIBS = -L$(C859)/lib -lsvl.dbg -larg -lm

# compilers and settings to use for C++ and C code, respectively
CPPC = CC
CC = cc

CFLAGS = -g $(IPATH) -o32
CPPFLAGS = $(CFLAGS) -D__SGI__ -DVL_CHECKING
# the above VL options turn on subscriptrange checking

# -o32 is an SGI compiler option that selects the old-fashioned instruction
# set (would run a little faster on some machines if we used -n32 or -n64).
# We'll keep life simple and use -o32, however.

# after code is debugged, replace -g -lsvl.dbg -DVL_CHECKING
# with                            -O2 -lsvl
# for optimization.  Program may run many times faster that way.

SOURCE = simp.cc levi.cc

all: simp levi

simp: simp.o
	$(CPPC) -o simp simp.o $(LIBS)

levi: levi.o
	$(CPPC) -o levi levi.o $(LIBS)

.SUFFIXES: .cc .c

.cc.o:
	$(CPPC) -c $(CPPFLAGS) $<

clean:
	-rm -rf simp levi core *.o *~ "#"*"#" Makefile.sgi.bak ii_files

depend:
	makedepend -fMakefile.sgi $(IPATH) -I/usr/include/CC $(SOURCE)

# DO NOT DELETE
