# makefile for VIS-5D version 3.0 for STELLAR/STARDENT GS1000/2000

# vis5d program for visualizing five dimensional gridded data sets
# Copyright (C) 1990, 1991, 1992  Bill Hibbard, Dave Santek, Brian Paul,
# 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 = -c -O1
CVECTOR = -c -O2 -va -na -nv
#CVECTOR = -c -O2
FFLAGS = -c -O1
LFLAGS =

LIBS =  ../lui2/liblui.a -lXcm -lXdb -lXim -lXfdi -lX -lm -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) cursor.c

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

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

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

grid.o: grid.c globals.h memory.h
	cc $(CVECTOR) 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) gui.c

labels.o: labels.c globals.h graphics.h
	cc $(CFLAGS) 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) -O1 main.c

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

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

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

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

queue.o: queue.c globals.h queue.h sync.h
	cc $(CFLAGS) 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 $(CVECTOR) render.c

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

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

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

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

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

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

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

work.o: work.c globals.h grid.h memory.h queue.h sync.h traj.h
	cc $(CVECTOR) 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 $@


