author | Mahlon E. Smith <mahlon@laika.com> |
Sat, 03 Sep 2011 14:12:06 -0700 | |
changeset 1 | 823d42546cea |
parent 0 | eac7211fe522 |
child 2 | 8c88756f81b0 |
permissions | -rw-r--r-- |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
1 |
|
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
2 |
CFLAGS = -O2 |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
3 |
LIBS = -lsqlite3 |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
4 |
#OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) parser.o |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
5 |
OBJS = volta.o parser.o |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
6 |
|
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
7 |
######################################################################## |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
8 |
### M A I N |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
9 |
######################################################################## |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
10 |
|
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
11 |
volta: $(OBJS) |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
12 |
$(CC) $(CFLAGS) $(LIBS) -o $@ $(OBJS) |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
13 |
strip $@ |
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
14 |
|
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
15 |
$(OBJS): volta.h |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
16 |
|
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
17 |
parser.c: parser.rl |
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
18 |
ragel -L -C -e -G2 parser.rl -o $@ |
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
19 |
|
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
20 |
|
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
21 |
######################################################################## |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
22 |
### D E B U G |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
23 |
######################################################################## |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
24 |
|
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
25 |
debug: CFLAGS = -Wall -DDEBUG -DPROG='"volta (debugmode)"' |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
26 |
debug: volta parser_state.xml parser_state.png parser_state.dot |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
27 |
|
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
28 |
parser_state.xml parser_state.png parser_state.dot: parser.rl |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
29 |
ragel -Vp parser.rl > parser_state.dot |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
30 |
ragel -C -e -G2 -x parser.rl -o parser_state.xml |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
31 |
dot -Tpng parser_state.dot > parser_state.png |
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
32 |
|
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
33 |
|
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
34 |
######################################################################## |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
35 |
### U T I L |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
36 |
######################################################################## |
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
37 |
|
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
38 |
.PHONY : clean |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
39 |
clean: |
1
823d42546cea
Dial in the Makefile and command line option parsing. Better debug
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
40 |
-rm -f volta volta_debug* parser.c parser_state.* *.o |
0
eac7211fe522
Initial commit of an experimental little Squid redirector.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
41 |