source/util/Makefile
raw| 1 | YACC := bison -y |
| 2 | LEX := flex |
| 3 | RM ?= rm -f |
| 4 | |
| 5 | ifneq ($(findstring $(MAKEFLAGS),s),s) |
| 6 | ifndef V |
| 7 | QUIET_YACC = @echo ' ' YACC $@; |
| 8 | QUIET_LEX = @echo ' ' LEX $@; |
| 9 | export V |
| 10 | endif |
| 11 | endif |
| 12 | |
| 13 | all: levcomp.tab.cc levcomp.lex.cc |
| 14 | |
| 15 | clean: |
| 16 | $(RM) levcomp.tab.cc levcomp.tab.h levcomp.lex.cc *.o *.d |
| 17 | |
| 18 | %.lex.cc: %.lpp |
| 19 | $(QUIET_LEX)$(LEX) -o$@ $< |
| 20 | @perl -pi.orig -e's/register //' $@ |
| 21 | |
| 22 | %.tab.cc: %.ypp |
| 23 | $(QUIET_YACC)$(YACC) --defines=$*.tab.h -b $* -o $@ $< |