Makefile
changeset 0 eac7211fe522
child 1 823d42546cea
equal deleted inserted replaced
-1:000000000000 0:eac7211fe522
       
     1 
       
     2 CFLAGS=-O2 -Wall
       
     3 CFLAGS_DEBUG=-Wall -DDEBUG -DPROG='"volta (debugmode)"'
       
     4 LIBS=-lsqlite3
       
     5 
       
     6 volta: parser.c volta.c volta.h
       
     7 	$(CC) $(CFLAGS) $(LIBS) -o $@ *.c
       
     8 	strip $@
       
     9 
       
    10 parser.c: parser.rl
       
    11 	ragel -L -C -e -G2 parser.rl -o $@
       
    12 
       
    13 debug: volta_debug
       
    14 
       
    15 volta_debug: parser_debug.c volta.h
       
    16 	$(CC) $(CFLAGS_DEBUG) $(LIBS) -o volta *.c
       
    17 
       
    18 parser_debug.c: parser.c
       
    19 	ragel -V parser.rl > parser_state.dot
       
    20 	ragel -C -e -G2 -V -x parser.rl -o parser_state.xml
       
    21 	dot -Tpng parser_state.dot > parser_state.png
       
    22 
       
    23 clean:
       
    24 	@rm -rf volta volta_debug* parser.c parser_state.*
       
    25