File: Makefile

package info (click to toggle)
ragel 5.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,628 kB
  • ctags: 4,619
  • sloc: cpp: 15,187; ansic: 3,490; yacc: 1,921; makefile: 411; sh: 146; awk: 6
file content (41 lines) | stat: -rw-r--r-- 738 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
RAGEL = ragel
RLCODEGEN = rlcodegen
FLEX = flex
RE2C = re2c

CFLAGS = -Wall -g -O2

all: cppscan lex-cppscan re2c-cppscan

ps: cppscan.ps

cppscan: cppscan.o
	g++ -g -o $@ $<

lex-cppscan: lex-cppscan.o
	g++ -g -o $@ $<
	
re2c-cppscan: re2c-cppscan.o
	g++ -g -o $@ $<
	
cppscan.cpp: cppscan.rl 
	$(RAGEL) cppscan.rl | $(RLCODEGEN) -G2 -o $@

lex-cppscan.cpp: cppscan.lex
	$(FLEX) -f -o $@ $<

re2c-cppscan.cpp: cppscan.rec
	$(RE2C) -s $< > $@

example.cpp: example.rec
	$(RE2C) -s $< > $@

%.o: %.cpp
	g++ $(CFLAGS) -c -o $@ $<

cppscan.ps: cppscan.rl
	$(RAGEL) cppscan.rl | $(RLCODEGEN) -V | dot -Tps > cppscan.ps

distclean clean:
	rm -Rf *.o cppscan.cpp cppscan cppscan.ps \
		lex-cppscan lex-cppscan.cpp re2c-cppscan re2c-cppscan.cpp