2 # Copyright 2002-2007 Adrian Thurston <thurston@complang.org>
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
26 atoi awkemu clang concurrent cppscan format gotocallret mailbox params \
27 pullscan rlscan statechart
29 #########################################
34 rm -Rf *.o *.c *.cpp $(TARGS)
37 gcc $(CFLAGS) -Wall -g -c -O3 -o $@ $<
40 g++ $(CXXFLAGS) -Wall -g -c -O3 -o $@ $<
42 #########################################
44 gotocallret: gotocallret.o
45 g++ -g -o gotocallret gotocallret.o
47 gotocallret.cpp: gotocallret.rl
48 $(RAGEL) -G2 -o gotocallret.cpp gotocallret.rl
50 gotocallret.o: gotocallret.cpp
51 g++ -Wall -g -c -O3 -o $@ $<
57 pullscan.c: pullscan.rl $(RAGEL)
58 $(RAGEL) -G2 -o $@ pullscan.rl
60 concurrent: concurrent.o
61 g++ -g -o concurrent concurrent.o
63 concurrent.cpp: concurrent.rl $(RAGEL)
64 $(RAGEL) -G2 -o concurrent.cpp concurrent.rl
67 g++ -g -o rlscan rlscan.o
70 $(RAGEL) -G2 -o rlscan.cpp rlscan.rl
72 statechart: statechart.o
73 g++ -g -o statechart statechart.o
75 statechart.cpp: statechart.rl
76 $(RAGEL) -G2 -o statechart.cpp statechart.rl
78 statechart.o: statechart.cpp
79 g++ -Wall -g -c -O3 -o $@ $<
82 gcc -g -o params params.o
85 $(RAGEL) -G2 -o params.c params.rl
88 gcc -g -o clang clang.o
91 $(RAGEL) -G2 -o clang.c clang.rl
93 optional: lex-cppscan re2c-cppscan
98 lex-cppscan: lex-cppscan.o
101 re2c-cppscan: re2c-cppscan.o
104 cppscan.cpp: cppscan.rl
105 $(RAGEL) -G2 -o $@ cppscan.rl
107 lex-cppscan.cpp: cppscan.lex
110 re2c-cppscan.cpp: cppscan.rec
113 example.cpp: example.rec
117 gcc -g -o format format.o
120 $(RAGEL) -G2 -o format.c format.rl
123 gcc -g -o awkemu awkemu.o
126 $(RAGEL) -G2 -o awkemu.c awkemu.rl
130 g++ -g -o mailbox mailbox.o
132 mailbox.cpp: mailbox.rl
133 $(RAGEL) -G2 -o mailbox.cpp mailbox.rl
136 g++ -g -o atoi atoi.o
139 $(RAGEL) -G2 -o atoi.cpp atoi.rl
142 g++ -Wall -g -c -O3 -o $@ $<