summaryrefslogtreecommitdiff
path: root/examples/params/Makefile
blob: 98b950ca72ad012750b03134ba9e80e9c3c40620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
RAGEL = ../../ragel/ragel
RLCODEGEN = ../../rlcodegen/rlcodegen

all: params

ps: params.ps

params: params.o 
	gcc -g -o params params.o

params.c: params.rl $(RAGEL) $(RLCODEGEN)
	$(RAGEL) params.rl | $(RLCODEGEN) -G2 -o params.c

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

%.o: %.c
	gcc -Wall -O3 -g -c -o $@ $<

distclean clean:
	rm -Rf *.o params.c params params.ps