8f7f12c75b2881baecb563120df0e8bedbeec843
[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)
17         @echo "execute cat test/2test | ./$(NAME)"
18         @cat test/2test | ./$(NAME)
19
20 2test:
21         /usr/ftp/pub/ublu/test/$(NAME)/test 2>&1
22