xref: /minix3/external/bsd/flex/dist/examples/manual/Makefile.examples (revision 357f1050293be536ca8309aae20889945ce99fc1)
1*357f1050SThomas Veerman#############################################################
2*357f1050SThomas Veerman#
3*357f1050SThomas Veerman# Makefile     : Makefile for Flex examples.
4*357f1050SThomas Veerman# Author       : G.T.Nicol
5*357f1050SThomas Veerman# Last Updated : 1993/10/05
6*357f1050SThomas Veerman#
7*357f1050SThomas Veerman# If you use bison, you may have to supply an alloca
8*357f1050SThomas Veerman#
9*357f1050SThomas Veerman#############################################################
10*357f1050SThomas Veerman
11*357f1050SThomas VeermanCC       = gcc -g
12*357f1050SThomas VeermanLEX      = flex -i -I
13*357f1050SThomas VeermanYACC     = bison -d -y
14*357f1050SThomas VeermanALLOCA   =
15*357f1050SThomas Veerman
16*357f1050SThomas Veerman############################################################
17*357f1050SThomas Veerman#
18*357f1050SThomas Veerman# DO NOT CHANGE ANYTHING FROM HERE ON !!!!!!!!!
19*357f1050SThomas Veerman#
20*357f1050SThomas Veerman############################################################
21*357f1050SThomas Veerman
22*357f1050SThomas Veermanall: expr front myname eof wc replace user_act string1\
23*357f1050SThomas Veerman     string2 yymore numbers dates cat
24*357f1050SThomas Veerman
25*357f1050SThomas Veermanexpr:   expr.y expr.lex
26*357f1050SThomas Veerman	$(YACC) expr.y
27*357f1050SThomas Veerman	$(LEX)  expr.lex
28*357f1050SThomas Veerman	$(CC) -o expr lex.yy.c y.tab.c $(ALLOCA) -ll -lm
29*357f1050SThomas Veerman
30*357f1050SThomas Veermanfront:  front.y front.lex
31*357f1050SThomas Veerman	$(YACC) front.y
32*357f1050SThomas Veerman	$(LEX)  front.lex
33*357f1050SThomas Veerman	$(CC) -o front lex.yy.c y.tab.c $(ALLOCA) -ll -lm
34*357f1050SThomas Veerman
35*357f1050SThomas Veermannumbers: numbers.lex
36*357f1050SThomas Veerman	$(LEX)  numbers.lex
37*357f1050SThomas Veerman	$(CC)   lex.yy.c -o numbers
38*357f1050SThomas Veerman
39*357f1050SThomas Veermandates: dates.lex
40*357f1050SThomas Veerman	$(LEX)  dates.lex
41*357f1050SThomas Veerman	$(CC)   lex.yy.c -o dates -ll
42*357f1050SThomas Veerman
43*357f1050SThomas Veermanyymore: yymore.lex
44*357f1050SThomas Veerman	$(LEX)  yymore.lex
45*357f1050SThomas Veerman	$(CC)   lex.yy.c -o yymore -ll
46*357f1050SThomas Veerman
47*357f1050SThomas Veermanstring1: string1.lex
48*357f1050SThomas Veerman	$(LEX)  string1.lex
49*357f1050SThomas Veerman	$(CC)   lex.yy.c -o string1 -ll
50*357f1050SThomas Veerman
51*357f1050SThomas Veermanstring2: string2.lex
52*357f1050SThomas Veerman	$(LEX)  string2.lex
53*357f1050SThomas Veerman	$(CC)   lex.yy.c -o string2 -ll
54*357f1050SThomas Veerman
55*357f1050SThomas Veermanmyname: myname.lex
56*357f1050SThomas Veerman	$(LEX)  myname.lex
57*357f1050SThomas Veerman	$(CC)   lex.yy.c -o myname -ll
58*357f1050SThomas Veerman
59*357f1050SThomas Veermanmyname2: myname2.lex
60*357f1050SThomas Veerman	$(LEX)  myname2.lex
61*357f1050SThomas Veerman	$(CC)   lex.yy.c -o myname2 -ll
62*357f1050SThomas Veerman
63*357f1050SThomas Veermaneof:    eof_rules.lex
64*357f1050SThomas Veerman	$(LEX)  eof_rules.lex
65*357f1050SThomas Veerman	$(CC)   lex.yy.c -o eof -ll
66*357f1050SThomas Veerman
67*357f1050SThomas Veermanwc:     wc.lex
68*357f1050SThomas Veerman	$(LEX)  wc.lex
69*357f1050SThomas Veerman	$(CC)   lex.yy.c -o wc -ll
70*357f1050SThomas Veerman
71*357f1050SThomas Veermancat:    cat.lex
72*357f1050SThomas Veerman	$(LEX)  cat.lex
73*357f1050SThomas Veerman	$(CC)   lex.yy.c -o cat -ll
74*357f1050SThomas Veerman
75*357f1050SThomas Veermanreplace: replace.lex
76*357f1050SThomas Veerman	$(LEX)  replace.lex
77*357f1050SThomas Veerman	$(CC)   lex.yy.c -o replace -ll
78*357f1050SThomas Veerman
79*357f1050SThomas Veermanuser_act: expr.y expr.lex
80*357f1050SThomas Veerman	$(LEX)  user_act.lex
81*357f1050SThomas Veerman	$(CC) -o user_act lex.yy.c -ll
82*357f1050SThomas Veerman
83*357f1050SThomas Veermanclean:
84*357f1050SThomas Veerman	rm -f *.BAK *.o core *~* *.a
85*357f1050SThomas Veerman	rm -f *.tab.h *.tab.c
86*357f1050SThomas Veerman	rm -f myname expr lex.yy.c *.out eof wc yymore
87*357f1050SThomas Veerman	rm -f replace front user_act string1 string2
88*357f1050SThomas Veerman	rm -f dates numbers cat
89