e29faecd9d4e16e97043460a61d56bb9f78cd42b
[uebersetzerbau-ss10.git] / scanner / Makefile
1 NAME := scanner
2 all: $(NAME)
3
4 $(NAME): $(NAME).lex
5         @echo "  FLEX   $<"
6         @flex -o$(NAME).c $(NAME).lex
7         @echo "  COMPILE $<"
8         @gcc -pedantic -ansi -Wall -g -o $(NAME) $(NAME).c -D_GNU_SOURCE -lfl
9
10 .PHONY: clean
11 clean:
12         rm -f $(NAME).o $(NAME) $(NAME).c
13
14 1test: $(NAME)
15         @echo "execute cat test/1test | ./$(NAME)"
16         @cat test/1test | ./$(NAME) > tmp1
17         @echo "execute cat test/2test | ./$(NAME)"
18         @cat test/2test | ./$(NAME) > tmp2
19         -@diff tmp{1,2}
20         @rm tmp{1,2}
21
22 2test:
23         /usr/ftp/pub/ublu/test/$(NAME)/test 2>&1
24