1209814Sjchandra# /**************************************************************** 2209814Sjchandra# Copyright (C) Lucent Technologies 1997 3209814Sjchandra# All Rights Reserved 4209814Sjchandra# 5209814Sjchandra# Permission to use, copy, modify, and distribute this software and 6209814Sjchandra# its documentation for any purpose and without fee is hereby 7209814Sjchandra# granted, provided that the above copyright notice appear in all 8209814Sjchandra# copies and that both that the copyright notice and this 9209814Sjchandra# permission notice and warranty disclaimer appear in supporting 10209814Sjchandra# documentation, and that the name Lucent Technologies or any of 11209814Sjchandra# its entities not be used in advertising or publicity pertaining 12209814Sjchandra# to distribution of the software without specific, written prior 13209814Sjchandra# permission. 14209814Sjchandra# 15209814Sjchandra# LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16209814Sjchandra# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 17209814Sjchandra# IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 18209814Sjchandra# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19209814Sjchandra# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20215270Simp# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21211280Sjchandra# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22211280Sjchandra# THIS SOFTWARE. 23209814Sjchandra# ****************************************************************/ 24209814Sjchandra 25209814SjchandraCFLAGS = -g 26209814SjchandraCFLAGS = -O2 27209814SjchandraCFLAGS = 28209814Sjchandra 29209814SjchandraCC = gcc -Wall -g -Wwrite-strings 30209814SjchandraCC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov 31209814SjchandraCC = gcc -g -Wall -pedantic 32209814SjchandraCC = gcc -O4 -Wall -pedantic -fno-strict-aliasing 33209814Sjchandra 34209814SjchandraYACC = bison -d -y 35209814SjchandraYACC = yacc -d -S 36209814Sjchandra#YFLAGS = -d -S 37209814Sjchandra # -S uses sprintf in yacc parser instead of sprint 38209814Sjchandra 39209814SjchandraOFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o 40209814Sjchandra 41209814SjchandraSOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \ 42209814Sjchandra maketab.c parse.c lib.c run.c tran.c proctab.c 43209814Sjchandra 44209814SjchandraLISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \ 45209814Sjchandra lib.c run.c tran.c 46209814Sjchandra 47209814SjchandraSHIP = README FIXES $(SOURCE) ytab[ch].bak makefile \ 48209814Sjchandra awk.1 49209814Sjchandra 50209814Sjchandraa.out: ytab.o $(OFILES) 51209814Sjchandra $(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -lm 52209814Sjchandra 53215085Sjchandra$(OFILES): awk.h ytab.h proto.h 54209814Sjchandra 55209814Sjchandraytab.o: awk.h proto.h awkgram.y 56209814Sjchandra $(YACC) $(YFLAGS) awkgram.y 57209814Sjchandra mv y.tab.c ytab.c 58209814Sjchandra mv y.tab.h ytab.h 59209814Sjchandra $(CC) $(CFLAGS) -c ytab.c 60209814Sjchandra 61209814Sjchandraproctab.c: maketab 62209814Sjchandra ./maketab >proctab.c 63209814Sjchandra 64209814Sjchandramaketab: ytab.h maketab.c 65209814Sjchandra $(CC) $(CFLAGS) maketab.c -o maketab 66209814Sjchandra 67209814Sjchandrabundle: 68209814Sjchandra @cp ytab.h ytabh.bak 69209814Sjchandra @cp ytab.c ytabc.bak 70209814Sjchandra @bundle $(SHIP) 71209814Sjchandra 72209814Sjchandratar: 73209814Sjchandra @cp ytab.h ytabh.bak 74209814Sjchandra @cp ytab.c ytabc.bak 75209814Sjchandra @bundle $(SHIP) >awk.shar 76209814Sjchandra @tar cf awk.tar $(SHIP) 77209814Sjchandra gzip awk.tar 78209814Sjchandra ls -l awk.tar.gz 79209814Sjchandra @zip awk.zip $(SHIP) 80209814Sjchandra ls -l awk.zip 81209814Sjchandra 82209814Sjchandranames: 83209814Sjchandra @echo $(LISTING) 84209814Sjchandra 85209814Sjchandraclean: 86209814Sjchandra rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c 87209814Sjchandra