source: trunk/flex/examples/manual/Makefile.examples@ 3032

Last change on this file since 3032 was 3031, checked in by bird, 18 years ago

flex 2.5.33.

File size: 1.9 KB
Line 
1#############################################################
2#
3# Makefile : Makefile for Flex examples.
4# Author : G.T.Nicol
5# Last Updated : 1993/10/05
6#
7# If you use bison, you may have to supply an alloca
8#
9#############################################################
10
11CC = gcc -g
12LEX = flex -i -I
13YACC = bison -d -y
14ALLOCA =
15
16############################################################
17#
18# DO NOT CHANGE ANYTHING FROM HERE ON !!!!!!!!!
19#
20############################################################
21
22all: expr front myname eof wc replace user_act string1\
23 string2 yymore numbers dates cat
24
25expr: expr.y expr.lex
26 $(YACC) expr.y
27 $(LEX) expr.lex
28 $(CC) -o expr lex.yy.c y.tab.c $(ALLOCA) -ll -lm
29
30front: front.y front.lex
31 $(YACC) front.y
32 $(LEX) front.lex
33 $(CC) -o front lex.yy.c y.tab.c $(ALLOCA) -ll -lm
34
35numbers: numbers.lex
36 $(LEX) numbers.lex
37 $(CC) lex.yy.c -o numbers
38
39dates: dates.lex
40 $(LEX) dates.lex
41 $(CC) lex.yy.c -o dates -ll
42
43yymore: yymore.lex
44 $(LEX) yymore.lex
45 $(CC) lex.yy.c -o yymore -ll
46
47string1: string1.lex
48 $(LEX) string1.lex
49 $(CC) lex.yy.c -o string1 -ll
50
51string2: string2.lex
52 $(LEX) string2.lex
53 $(CC) lex.yy.c -o string2 -ll
54
55myname: myname.lex
56 $(LEX) myname.lex
57 $(CC) lex.yy.c -o myname -ll
58
59myname2: myname2.lex
60 $(LEX) myname2.lex
61 $(CC) lex.yy.c -o myname2 -ll
62
63eof: eof_rules.lex
64 $(LEX) eof_rules.lex
65 $(CC) lex.yy.c -o eof -ll
66
67wc: wc.lex
68 $(LEX) wc.lex
69 $(CC) lex.yy.c -o wc -ll
70
71cat: cat.lex
72 $(LEX) cat.lex
73 $(CC) lex.yy.c -o cat -ll
74
75replace: replace.lex
76 $(LEX) replace.lex
77 $(CC) lex.yy.c -o replace -ll
78
79user_act: expr.y expr.lex
80 $(LEX) user_act.lex
81 $(CC) -o user_act lex.yy.c -ll
82
83clean:
84 rm -f *.BAK *.o core *~* *.a
85 rm -f *.tab.h *.tab.c
86 rm -f myname expr lex.yy.c *.out eof wc yymore
87 rm -f replace front user_act string1 string2
88 rm -f dates numbers cat
Note: See TracBrowser for help on using the repository browser.