2 # Copyright 2002-2007 Adrian Thurston <thurston@cs.queensu.ca>
5 # This file is part of Ragel.
7 # Ragel is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # Ragel is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Ragel; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 RAGEL
= ..
/ragel
/ragel
22 RLCODEGEN
= ..
/rlgen-cd
/rlgen-cd
28 atoi awkemu clang concurrent cppscan format gotocallret mailbox params \
29 pullscan rlscan statechart
31 #########################################
36 rm -Rf
*.o
*.c
*.
cpp $(TARGS
)
39 gcc
$(CFLAGS
) -Wall
-g
-c
-O3
-o
$@
$<
42 g
++ $(CFLAGS
) -Wall
-g
-c
-O3
-o
$@
$<
44 #########################################
46 gotocallret
: gotocallret.o
47 g
++ -g
-o gotocallret gotocallret.o
49 gotocallret.
cpp: gotocallret.rl
$(RAGEL
) $(RLCODEGEN
)
50 $(RAGEL
) gotocallret.rl |
$(RLCODEGEN
) -G2
-o gotocallret.
cpp
52 gotocallret.o
: gotocallret.
cpp
53 g
++ -Wall
-g
-c
-O3
-o
$@
$<
59 pullscan.c
: pullscan.rl
$(RAGEL
) $(RLCODEGEN
)
60 $(RAGEL
) pullscan.rl |
$(RLCODEGEN
) -G2
-o
$@
62 concurrent
: concurrent.o
63 g
++ -g
-o concurrent concurrent.o
65 concurrent.
cpp: concurrent.rl
$(RAGEL
) $(RLCODEGEN
)
66 $(RAGEL
) concurrent.rl |
$(RLCODEGEN
) -G2
-o concurrent.
cpp
69 g
++ -g
-o rlscan rlscan.o
71 rlscan.
cpp: rlscan.rl
$(RAGEL
) $(RLCODEGEN
)
72 $(RAGEL
) rlscan.rl |
$(RLCODEGEN
) -G2
-o rlscan.
cpp
74 statechart
: statechart.o
75 g
++ -g
-o statechart statechart.o
77 statechart.
cpp: statechart.rl
$(RAGEL
) $(RLCODEGEN
)
78 $(RAGEL
) statechart.rl |
$(RLCODEGEN
) -G2
-o statechart.
cpp
80 statechart.o
: statechart.
cpp
81 g
++ -Wall
-g
-c
-O3
-o
$@
$<
84 gcc
-g
-o params params.o
86 params.c
: params.rl
$(RAGEL
) $(RLCODEGEN
)
87 $(RAGEL
) params.rl |
$(RLCODEGEN
) -G2
-o params.c
90 gcc
-g
-o clang clang.o
92 clang.c
: clang.rl
$(RAGEL
) $(RLCODEGEN
)
93 $(RAGEL
) clang.rl |
$(RLCODEGEN
) -G2
-o clang.c
95 optional
: lex-cppscan re2c-cppscan
100 lex-cppscan
: lex-cppscan.o
103 re2c-cppscan
: re2c-cppscan.o
106 cppscan.
cpp: cppscan.rl
$(RAGEL
) $(RLCODEGEN
)
107 $(RAGEL
) cppscan.rl |
$(RLCODEGEN
) -G2
-o
$@
109 lex-cppscan.
cpp: cppscan.
lex
112 re2c-cppscan.
cpp: cppscan.rec
115 example.
cpp: example.rec
119 gcc
-g
-o format format.o
121 format.c
: format.rl
$(RAGEL
) $(RLCODEGEN
)
122 $(RAGEL
) format.rl |
$(RLCODEGEN
) -G2
-o format.c
125 gcc
-g
-o awkemu awkemu.o
127 awkemu.c
: awkemu.rl
$(RAGEL
) $(RLCODEGEN
)
128 $(RAGEL
) awkemu.rl |
$(RLCODEGEN
) -G2
-o awkemu.c
132 g
++ -g
-o mailbox mailbox.o
134 mailbox.
cpp: mailbox.rl
$(RAGEL
) $(RLCODEGEN
)
135 $(RAGEL
) mailbox.rl |
$(RLCODEGEN
) -G2
-o mailbox.
cpp
138 g
++ -g
-o atoi atoi.o
140 atoi.
cpp: atoi.rl
$(RAGEL
) $(RLCODEGEN
)
141 $(RAGEL
) atoi.rl |
$(RLCODEGEN
) -G2
-o atoi.
cpp
144 g
++ -Wall
-g
-c
-O3
-o
$@
$<