#
# Makefile for the xgraph program
#
# David Harrison
# University of California,  Berkeley
# 1987
#
# NOTE: the libCreate library is a library I wrote to replace XCreate
#       and XCreateTerm with ones I think provide a better interface.
#       If you do not have this library,  you can get it from hoser.
#       If you don't want to use it,  just take it out of the LIBS
#	line below.
#

CLEVEL	=
CFLAGS	= $(CLEVEL) -Ixtb -Iux11
CC	= cc

SRC	= xgraph.c xgX.c hard_devices.c dialog.c hpgl.c new_ps.c
OBJ	= xgraph.o xgX.o hard_devices.o dialog.o hpgl.o new_ps.o

UX11	= libux11.a
XTB	= libxtb.a
LIBS	= -L/usr/ucl/lib xtb/$(XTB) ux11/$(UX11) -lX11 -lm

TARGET	= xgraph

#--------

$(TARGET):	$(OBJ) xtb_m ux11_m
		$(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LIBS)

xg11:		$(TOBJ) xtb_m ux11_m
		$(CC) $(CFLAGS) -o xg11 $(TOBJ) $(LIBS)		

xtb_m:
		cd xtb; make CLEVEL=$(CLEVEL) $(XTB)

ux11_m:
		cd ux11; make CLEVEL=$(CLEVEL) $(UX11)

xgtest:		xgtest.o
		cc $(CFLAGS) -o xgtest xgtest.o -lm

clean:
		rm -f $(OBJ) $(TARGET) xgtest.o xgtest #* *~
		cd xtb; make clean
		cd ux11; make clean
