CFLAGS	=	-g

jsp = /turquoise/homes/plank
bm = /white/homes/manchek
BIN = .

MASOBJS = \
	$(ARCH)/y.tab.o \
	$(ARCH)/node.o \
	$(ARCH)/arc.o \
	$(ARCH)/check.o \
	$(ARCH)/cost.o \
	$(ARCH)/execute.o\
	$(ARCH)/anc.o 

MAINOBJS = \
	$(ARCH)/exp.o \
	$(ARCH)/array.o \
	$(ARCH)/eval.o \
	$(ARCH)/param.o \
	$(ARCH)/pvmhelp.o \
	$(ARCH)/print.o \
	$(ARCH)/trace.o \
	$(ARCH)/hstrings.o \
	$(ARCH)/slave.o \
	$(ARCH)/rbhelp.o

SLAVEOBJS = \
	$(ARCH)/slave.o \
	$(ARCH)/req.o \
	$(ARCH)/wrap.o 
	

LIBS = $(jsp)/lib/$(ARCH)/librb.a\
       $(jsp)/lib/$(ARCH)/libdl.a\
       $(jsp)/lib/$(ARCH)/liballoc.a\
       $(bm)/pvm_public/$(ARCH)/libpvm.a

MAINLIB = $(ARCH)/libhence.a
MASLIB = $(ARCH)/libmaster.a
SLAVELIB = $(ARCH)/libslave.a

INCLUDES = -I$(jsp)/include

MASTER = $(ARCH)/master.o

all: $(BIN)/master $(SLAVELIB)

$(MAINLIB): $(MAINOBJS)
	ar ru $(MAINLIB) $(MAINOBJS)
	ranlib $(MAINLIB)

$(SLAVELIB): $(SLAVEOBJS)
	ar ru $(SLAVELIB) $(SLAVEOBJS)
	ranlib $(SLAVELIB)

$(MASLIB): $(MASOBJS)
	ar ru $(MASLIB) $(MASOBJS)
	ranlib $(MASLIB)

$(BIN)/master:  $(MASLIB) $(MAINLIB) $(LIBS) $(MASTER)
	cc $(CFLAGS) -o $(BIN)/master $(MASTER) $(MASLIB) $(MAINLIB) $(LIBS)

$(ARCH)/y.tab.o: grparse.inc

y.tab.c: grparse.y
	yacc grparse.y

grparse.inc: grparse.l
	lex -t grparse.l > grparse.inc
	
clean:
	rm -f master *.o grparase.inc y.tab.c
	
depend:
	$(jsp)/bin/makepvmdep $(INCLUDES)


# +mkdep+ 
$(ARCH)/anc.o: anc.c
$(ARCH)/anc.o: /usr/include/stdio.h
$(ARCH)/anc.o: /turquoise/homes/plank/include/std.h
$(ARCH)/anc.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/anc.o: /usr/include/string.h
$(ARCH)/anc.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/anc.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/anc.o: ./hence.h
$(ARCH)/anc.o: ./rbhelp.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/anc.o anc.c

$(ARCH)/arc.o: arc.c
$(ARCH)/arc.o: /usr/include/stdio.h
$(ARCH)/arc.o: /turquoise/homes/plank/include/std.h
$(ARCH)/arc.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/arc.o: /usr/include/string.h
$(ARCH)/arc.o: /turquoise/homes/plank/include/list.h
$(ARCH)/arc.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/arc.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/arc.o: ./hence.h
$(ARCH)/arc.o: ./rbhelp.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/arc.o arc.c

$(ARCH)/array.o: array.c
$(ARCH)/array.o: /usr/include/stdio.h
$(ARCH)/array.o: /turquoise/homes/plank/include/std.h
$(ARCH)/array.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/array.o: /usr/include/string.h
$(ARCH)/array.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/array.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/array.o: ./hence.h
$(ARCH)/array.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/array.o array.c

$(ARCH)/check.o: check.c
$(ARCH)/check.o: /usr/include/stdio.h
$(ARCH)/check.o: /turquoise/homes/plank/include/std.h
$(ARCH)/check.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/check.o: /usr/include/string.h
$(ARCH)/check.o: /turquoise/homes/plank/include/list.h
$(ARCH)/check.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/check.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/check.o: ./hence.h
$(ARCH)/check.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/check.o check.c

$(ARCH)/cost.o: cost.c
$(ARCH)/cost.o: /usr/include/stdio.h
$(ARCH)/cost.o: /turquoise/homes/plank/include/std.h
$(ARCH)/cost.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/cost.o: /usr/include/string.h
$(ARCH)/cost.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/cost.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/cost.o: ./hence.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/cost.o cost.c

$(ARCH)/eval.o: eval.c
$(ARCH)/eval.o: /usr/include/stdio.h
$(ARCH)/eval.o: /turquoise/homes/plank/include/std.h
$(ARCH)/eval.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/eval.o: /usr/include/string.h
$(ARCH)/eval.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/eval.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/eval.o: ./hence.h
$(ARCH)/eval.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/eval.o eval.c

$(ARCH)/execute.o: execute.c
$(ARCH)/execute.o: /usr/include/stdio.h
$(ARCH)/execute.o: /turquoise/homes/plank/include/std.h
$(ARCH)/execute.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/execute.o: /usr/include/string.h
$(ARCH)/execute.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/execute.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/execute.o: ./hence.h
$(ARCH)/execute.o: ./htypes.h
$(ARCH)/execute.o: ./rbhelp.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/execute.o execute.c

$(ARCH)/exp.o: exp.c
$(ARCH)/exp.o: /usr/include/stdio.h
$(ARCH)/exp.o: /usr/include/malloc.h
$(ARCH)/exp.o: /turquoise/homes/plank/include/std.h
$(ARCH)/exp.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/exp.o: /usr/include/string.h
$(ARCH)/exp.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/exp.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/exp.o: ./hence.h
$(ARCH)/exp.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/exp.o exp.c

$(ARCH)/hstrings.o: hstrings.c
$(ARCH)/hstrings.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/hstrings.o hstrings.c

$(ARCH)/master.o: master.c
$(ARCH)/master.o: /usr/include/stdio.h
$(ARCH)/master.o: /usr/include/signal.h
$(ARCH)/master.o: /turquoise/homes/plank/include/std.h
$(ARCH)/master.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/master.o: /usr/include/string.h
$(ARCH)/master.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/master.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/master.o: ./hence.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/master.o master.c

$(ARCH)/node.o: node.c
$(ARCH)/node.o: /usr/include/stdio.h
$(ARCH)/node.o: /turquoise/homes/plank/include/std.h
$(ARCH)/node.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/node.o: /usr/include/string.h
$(ARCH)/node.o: /turquoise/homes/plank/include/list.h
$(ARCH)/node.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/node.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/node.o: ./hence.h
$(ARCH)/node.o: ./htypes.h
$(ARCH)/node.o: ./rbhelp.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/node.o node.c

$(ARCH)/param.o: param.c
$(ARCH)/param.o: /usr/include/stdio.h
$(ARCH)/param.o: /turquoise/homes/plank/include/std.h
$(ARCH)/param.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/param.o: /usr/include/string.h
$(ARCH)/param.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/param.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/param.o: ./hence.h
$(ARCH)/param.o: ./htypes.h
$(ARCH)/param.o: ./rbhelp.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/param.o param.c

$(ARCH)/print.o: print.c
$(ARCH)/print.o: /usr/include/stdio.h
$(ARCH)/print.o: /turquoise/homes/plank/include/std.h
$(ARCH)/print.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/print.o: /usr/include/string.h
$(ARCH)/print.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/print.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/print.o: ./hence.h
$(ARCH)/print.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/print.o print.c

$(ARCH)/pvmhelp.o: pvmhelp.c
$(ARCH)/pvmhelp.o: /usr/include/stdio.h
$(ARCH)/pvmhelp.o: /usr/include/signal.h
$(ARCH)/pvmhelp.o: /turquoise/homes/plank/include/std.h
$(ARCH)/pvmhelp.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/pvmhelp.o: /usr/include/string.h
$(ARCH)/pvmhelp.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/pvmhelp.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/pvmhelp.o: ./hence.h
$(ARCH)/pvmhelp.o: ./htypes.h
$(ARCH)/pvmhelp.o: ./rbhelp.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/pvmhelp.o pvmhelp.c

$(ARCH)/rbhelp.o: rbhelp.c
$(ARCH)/rbhelp.o: /usr/include/stdio.h
$(ARCH)/rbhelp.o: /turquoise/homes/plank/include/std.h
$(ARCH)/rbhelp.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/rbhelp.o: /usr/include/string.h
$(ARCH)/rbhelp.o: /turquoise/homes/plank/include/list.h
$(ARCH)/rbhelp.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/rbhelp.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/rbhelp.o: ./hence.h
$(ARCH)/rbhelp.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/rbhelp.o rbhelp.c

$(ARCH)/slave.o: slave.c
$(ARCH)/slave.o: /usr/include/stdio.h
$(ARCH)/slave.o: /turquoise/homes/plank/include/std.h
$(ARCH)/slave.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/slave.o: /usr/include/string.h
$(ARCH)/slave.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/slave.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/slave.o: ./hence.h
$(ARCH)/slave.o: ./htypes.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/slave.o slave.c

$(ARCH)/trace.o: trace.c
$(ARCH)/trace.o: /usr/include/stdio.h
$(ARCH)/trace.o: /turquoise/homes/plank/include/std.h
$(ARCH)/trace.o: /turquoise/homes/plank/include/imalloc.h
$(ARCH)/trace.o: /usr/include/string.h
$(ARCH)/trace.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/trace.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/trace.o: ./hence.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/trace.o trace.c

$(ARCH)/y.tab.o: y.tab.c
$(ARCH)/y.tab.o: /usr/include/sys/types.h
$(ARCH)/y.tab.o: /usr/include/stdio.h
$(ARCH)/y.tab.o: /turquoise/homes/plank/include/rb.h
$(ARCH)/y.tab.o: /turquoise/homes/plank/include/dlist.h
$(ARCH)/y.tab.o: ./hence.h
$(ARCH)/y.tab.o: ./htypes.h
$(ARCH)/y.tab.o: ./grparse.inc
$(ARCH)/y.tab.o: /usr/include/stdio.h
	cc -c $(CFLAGS) $(INCLUDES) -o $(ARCH)/y.tab.o y.tab.c

