# makefile for VIS-5D version 3.0 for SGI

# vis5d program for visualizing five dimensional gridded data sets
# Copyright (C) 1990, 1991, 1992  Bill Hibbard, Brian Paul, Dave Santek,
# and Andre Battaiola.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.



CFLAGS_1 = -c -cckr -O1
CFLAGS_2 = -c -cckr -O2
FFLAGS = -c -O2
LFLAGS = 


LIBS =  ../lui2/liblui.a -lfm_s -lgl_s -lm -lmpc -lspaceball

OBJS = cursor.o cw.o globals.o graphics.o grid.o gui.o \
	labels.o main.o map.o \
	matrix.o memory.o misc.o queue.o render.o \
	save.o sb.o slice.o sync.o topo.o traj.o vtmcP.o \
	work.o zcont1.o zcont2.o zcont3.o zcont4.o


../vis5d: $(OBJS)
	f77 $(LFLAGS) $(OBJS) $(LIBS) -o $@


cursor.o: cursor.c globals.h graphics.h
	cc $(CFLAGS_2) cursor.c

cw.o: cw.c x.h
	cc $(CFLAGS_2) cw.c

globals.o: globals.c globals.h sync.h
	cc $(CFLAGS_2) globals.c

graphics.o: graphics.c x.h
	cc $(CFLAGS_2) graphics.c

grid.o: grid.c globals.h memory.h
	cc $(CFLAGS_2) grid.c

gui.o: gui.c cursor.h cw.h globals.h labels.h matrix.h misc.h queue.h \
	render.h save.h sb.h x.h
	cc $(CFLAGS_2) gui.c

labels.o: labels.c globals.h graphics.h
	cc $(CFLAGS_2) labels.c

main.o: main.c globals.h graphics.h gui.h memory.h misc.h render.h sync.h \
	traj.h vis5d.h work.h
	cc $(CFLAGS_2) main.c

map.o: map.c globals.h graphics.h topo.h
	cc $(CFLAGS_2) map.c

matrix.o: matrix.c matrix.h x.h
	cc $(CFLAGS_2) matrix.c

memory.o: memory.c globals.h
	cc $(CFLAGS_2) memory.c

misc.o: misc.c globals.h memory.h sync.h
	cc $(CFLAGS_2) misc.c

queue.o: queue.c globals.h queue.h sync.h
	cc $(CFLAGS_2) queue.c

render.o: render.c globals.h graphics.h labels.h map.h matrix.h memory.h \
	queue.h topo.h sync.h x.h
	cc $(CFLAGS_2) render.c

save.o: save.c globals.h memory.h sync.h
	cc $(CFLAGS_2) save.c

sb.o: sb.c globals.h matrix.h x.h
	cc $(CFLAGS_2) sb.c

slice.o: slice.c globals.h graphics.h matrix.h queue.h
	cc $(CFLAGS_2) slice.c

sync.o: sync.c
	cc $(CFLAGS_2) sync.c

topo.o: topo.c globals.h graphics.h memory.h
	cc $(CFLAGS_2) topo.c

traj.o: traj.c grid.h globals.h
	cc $(CFLAGS_1) traj.c

vtmcP.o: vtmcP.c etableP.h memory.h
	cc $(CFLAGS_2) vtmcP.c

work.o: work.c globals.h grid.h memory.h queue.h sync.h traj.h
	cc $(CFLAGS_2) work.c

zcont1.o: zcont.f
	f77 $(FFLAGS) -DWXYZ=1 zcont.f -o $@

zcont2.o: zcont.f
	f77 $(FFLAGS) -DWXYZ=2 zcont.f -o $@

zcont3.o: zcont.f
	f77 $(FFLAGS) -DWXYZ=3 zcont.f -o $@

zcont4.o: zcont.f
	f77 $(FFLAGS) -DWXYZ=4 zcont.f -o $@


