Makefile.lex 799 B

12345678910111213141516171819202122232425262728293031
  1. LEX = flex -i
  2. YACC = bison -t -v -g
  3. all: main.c fortran.c
  4. main.c : convert.tab.c convert.yy.c
  5. cat convert.tab.c convert.yy.c > ../LIB/main.c
  6. $(RM) convert.tab.c convert.yy.c
  7. fortran.c : fortran.tab.c fortran.yy.c
  8. cat fortran.tab.c fortran.yy.c > ../LIB/fortran.c
  9. $(RM) fortran.tab.c fortran.yy.c
  10. convert.tab.c : convert.y decl.h
  11. $(YACC) -p convert_ convert.y
  12. fortran.tab.c : fortran.y decl.h
  13. $(YACC) -p fortran_ fortran.y
  14. convert.yy.c : convert.lex
  15. $(LEX) -P convert_ -o convert.yy.c convert.lex
  16. fortran.yy.c : fortran.lex
  17. $(LEX) -P fortran_ -o fortran.yy.c fortran.lex
  18. clean:
  19. $(RM) convert.yy.c convert.tab.c convert.output convert.vcg convert.dot \
  20. fortran.yy.c fortran.tab.c fortran.output fortran.vcg fortran.dot
  21. clean-all: clean
  22. $(RM) ../LIB/main.c ../LIB/fortran.c