head     1.4;
branch   ;
access   ;
symbols  ;
locks    ;
comment  @@;


1.4
date     92.03.23.15.48.42;  author bin;  state Exp;
branches ;
next     1.3;

1.3
date     91.03.14.19.57.27;  author bin;  state Exp;
branches ;
next     1.2;

1.2
date     91.03.13.19.51.36;  author bin;  state Exp;
branches ;
next     1.1;

1.1
date     91.02.08.16.07.27;  author bin;  state Exp;
branches ;
next     ;


desc
@initial version provided by steve ness
@


1.4
log
@cef update: can now use an objects subdir.
@
text
@YFLAGS	= -hdr yy.h -st -terms 55 -nterms 34 -prods 109 -states 203
OFILES	= bcmch.o  bcmutil.o getnum.o globals.o gram.o grmact.o\
		interp.o lex.o main.o output.o putnum.o
HFILES	= bc.h bcmch.h bcsymtbl.h
SFILES	= globals.c main.c gram.y grmact.c interp.c bcmch.c bcmutil.c\
		lex.c getnum.c putnum.c output.c
CFLAGS= -AOs -I.. -I.
MFILES	= readme Makefile gram.fix

bc:	$(OFILES) 
	$(CC) $(CFLAGS) -o bc $(OFILES) -lmp

install : bc
	su root cp bc /bin
	su root chmog 511 bin bin /bin/bc

bcprof:	$(OFILES)
	$(CC) $(CFLAGS) -o bcprof -p $(OFILES) bc.v.o -lmp

print:
	pr $(MFILES) $(HFILES) $(SFILES)

ofiles:		$(OFILES)

bc.v.o: $(SFILES)
	version `pwd` bc $(SFILES) > bc.v.s
	as -o bc.v.o bc.v.s
	rm bc.v.s

clean:
	-rm $(OFILES) yy.h

$(OFILES):	$(HFILES)

debug.o:	$(HFILES)
lex.o:		gram.o
# gram.fix rewrites the terminal name list into the input strings rather
# then the NAMES_ used in the grammar
gram.o: gram.y $(HFILES) gram.fix
	yacc $(YFLAGS) `srcpath gram.y`
	sed -f `srcpath gram.fix` < y.tab.c > gram.c
	rm y.tab.c
	$(CC) $(CFLAGS) -c gram.c
	rm gram.c
@


1.3
log
@bob h added chown, chgrp, chmod...
@
text
@d7 1
a7 2
CFLAGS= -O
DESTDIR= /f1/bin/
d10 2
a11 3
#bc:	$(OFILES) bc.v.o
#	$(CC) $(CFLAGS) -i -o bc $(OFILES) bc.v.o -lmp
#	rm bc.v.o
d13 4
a16 6
bc:	$(OFILES) 
	$(CC) $(CFLAGS) -i -o $(DESTDIR)bc $(OFILES) -lmp
	su root chown bin $(DESTDIR)bc
	su root chgrp bin $(DESTDIR)bc
	su root chmod 511 $(DESTDIR)bc

d40 2
a41 2
	yacc $(YFLAGS) gram.y
	sed -f gram.fix <y.tab.c >gram.c
@


1.2
log
@bob h added DESTDIR
@
text
@d17 3
@


1.1
log
@Initial revision
@
text
@d8 1
d16 1
a16 1
	$(CC) $(CFLAGS) -i -o bc $(OFILES) -lmp
@
