# samples Makefile
# Phil Farrell, Stanford Earth Sciences
# 13 April 1989
#
# Default compiler option is optimization.  You can specify CFLAGS on 
# make command line to override.  For example, to make samples with
# symbolic information for debugger instead of optimization, try
#	% make clean
#	% make "CFLAGS=-g" [name_of_program]
#
CFLAGS = -O
#
# If your system has special floating point hardware, you may want 
# to include the compiler flag for that hardware, as in this example
# for a Sun-3 workstation.
#CFLAGS = -f68881 -O
#
# Compiler directives to specify include file locations, in addition 
# to the default system locations.
INC = -I../include -I../../vplot/filters/include

# Locations of GKS library routines and loclib (getpar) library routines
GKSLIB = ../libgks.a
LOCLIB = ../../vplot/filters/loclib/loclib.a

tube: tube.o ggwstype.o
	cc $(CFLAGS) $(INC) -o tube tube.o ggwstype.o $(LOCLIB) -lm

window: window.o
	cc $(CFLAGS) $(INC) -o window window.o $(GKSLIB) -lm

gksdraw: gksdraw.o
	cc $(CFLAGS) $(INC) -o gksdraw gksdraw.o $(GKSLIB) -lm

graph: graph.o oldsubs.o err.o
	cc $(CFLAGS) $(INC) -o graph graph.o oldsubs.o err.o $(GKSLIB) $(LOCLIB) -lm

.c.o: $?
	cc $(CFLAGS) $(INC) -c $?

clean:
	rm *.o tube window gksdraw graph
