NAME := scanner all: $(NAME) $(NAME): $(NAME).lex @echo " FLEX $<" @flex -o$(NAME).c $(NAME).lex @echo " COMPILE $<" @gcc -pedantic -ansi -Wall -g -o $(NAME) $(NAME).c -D_GNU_SOURCE -lfl .PHONY: clean clean: rm -f $(NAME).o $(NAME) $(NAME).c 1test: $(NAME) @echo "execute cat test/1test | ./$(NAME)" @cat test/1test | ./$(NAME) > tmp1 @echo "execute cat test/2test | ./$(NAME)" @cat test/2test | ./$(NAME) > tmp2 -@diff tmp{1,2} @rm tmp{1,2} 2test: /usr/ftp/pub/ublu/test/$(NAME)/test 2>&1