# On a sun, you might have to use the following definitions instead
# MOTIF_HOME     = /usr/openwin
MOTIF_HOME       = /usr

INCLUDES = -I${MOTIF_HOME}/include/X11R4 
INCLUDES = -I/usr/lpp/X11/include/X11 -I/usr/lpp/X11/include
XLIBS = -lXm -lXt -lX11

# CCROOT=/
# CC=$(CCROOT)/bin/cc
# AS=$(CCROOT)/bin/as
# AR=$(CCROOT)/bin/ar
# LD=$(CCROOT)/bin/ld
# CFLAGS = -A -g -Wc,-Nd4000 -Wc,-Ns6000 -Wc,-Nt80000 -DSYSV -D_NO_PROTO -D_HPUX_SOURCE
# use -DUSEWIDGETPROC if you have XtWidgetProc in your Xt
CFLAGS = -g -D_NO_PROTO -DUSEWIDGETPROC


LIBNAME = libgraph.a
PROGS = gtest sort

FILES =\
	Arc.o		\
	Graph.o


all:	$(LIBNAME) $(PROGS) 

$(LIBNAME):	$(FILES)
	rm -f $(LIBNAME)
	$(AR) clq $(LIBNAME) $(FILES)
	$(AR) s $(LIBNAME)

.s.a:
	$(AS) -o $*.o $<

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

clean:
	-rm -f *.o

clobber:	clean
	-rm -f $(LIBNAME) $(PROGS)

gtest: gtest.o 
	$(CC) $(CFLAGS) $(INCLUDES) -o gtest gtest.o  $(LIBNAME) $(XLIBS) -lm

sort: sort.o 
	$(CC) $(CFLAGS) $(INCLUDES) -o sort sort.o  $(LIBNAME) $(XLIBS) -lm


Arc.o:		Arc.h		ArcP.h
Graph.o:	Graph.h		GraphP.h

