port of netbsd's tr
[minix.git] / commands / awk / Makefile
bloba14ed7a1b1ab8d43327402f160b6b709a16857f0
1 # /****************************************************************
2 # Copyright (C) Lucent Technologies 1997
3 # All Rights Reserved
4 #
5 # Permission to use, copy, modify, and distribute this software and
6 # its documentation for any purpose and without fee is hereby
7 # granted, provided that the above copyright notice appear in all
8 # copies and that both that the copyright notice and this
9 # permission notice and warranty disclaimer appear in supporting
10 # documentation, and that the name Lucent Technologies or any of
11 # its entities not be used in advertising or publicity pertaining
12 # to distribution of the software without specific, written prior
13 # permission.
15 # LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
17 # IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
18 # SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20 # IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21 # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
22 # THIS SOFTWARE.
23 # ****************************************************************/
25 CFLAGS = -g
26 CFLAGS = -O2
27 CFLAGS =
29 CC = gcc -Wall -g -Wwrite-strings
30 CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
31 CC = gcc -Wall -g
32 CC = cc
33 CC = gcc -O4
34 CC = cc -O
37 YACC = bison -y
38 YACC = yacc
39 YFLAGS = -d
41 OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o
43 SOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \
44 maketab.c parse.c lib.c run.c tran.c proctab.c missing95.c
46 LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
47 lib.c run.c tran.c missing95.c
49 SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile makefile.win \
50 vcvars32.bat buildwin.bat awk.1
52 all: awk
54 install: awk awk.1
55 install -m 755 -o bin -g operator awk /usr/bin/awk
56 install -m 644 -o bin -g operator awk.1 /usr/man/man1
58 awk: ytab.o $(OFILES)
59 $(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -lm -o $@
61 $(OFILES): awk.h ytab.h proto.h
63 ytab.o: awk.h proto.h awkgram.y
64 $(YACC) $(YFLAGS) awkgram.y
65 mv y.tab.c ytab.c
66 mv y.tab.h ytab.h
67 $(CC) $(CFLAGS) -c ytab.c
69 proctab.c: maketab
70 ./maketab >proctab.c
72 maketab: ytab.h maketab.c
73 $(CC) $(CFLAGS) maketab.c -o maketab
75 bundle:
76 @cp ytab.h ytabh.bak
77 @cp ytab.c ytabc.bak
78 @bundle $(SHIP)
80 tar:
81 @cp ytab.h ytabh.bak
82 @cp ytab.c ytabc.bak
83 @bundle $(SHIP) >awk.shar
84 @tar cf awk.tar $(SHIP)
85 gzip awk.tar
86 ls -l awk.tar.gz
87 @zip awk.zip $(SHIP)
88 ls -l awk.zip
90 names:
91 @echo $(LISTING)
93 clean:
94 rm -f awk *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c