#
#  xplot: the program: written by Matt Wilson. 
#         heavily modified and ANSI-fied by Mike Vanier,
#         almost to the point of unrecognizability.
#

CC          = gcc 
#CFLAGS      = -O4 -Wall -DSYSV
CFLAGS      = -DSYSV
LIBS        = -lX11 -lm -L/usr/X11R6/lib
INCLUDES    = -I/usr/X11R6/include 
# Change this for your system:
INSTALLDIR  = /usr/local/bin

OBJECTS = \
	main.o         \
	arg.o          \
	axis.o         \
	buttons.o      \
	color.o        \
	command.o      \
	event_loop.o   \
	graph.o        \
	init.o         \
	keys.o         \
	label.o        \
	load.o         \
	menu.o         \
	primitives.o   \
	save.o         \
	scale.o        \
	text.o         \
	tick.o         \
	psdriver.o 

.c.o:
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

default:	xplot	

xplot:		$(OBJECTS)
	$(CC) $(CFLAGS) $(OBJECTS) -o $@ $(LIBS)


install:
	strip xplot
	cp xplot $(INSTALLDIR)


clean:
	-rm -f *.o xplot
	-if [ -f make.out ]; then rm make.out; fi

