Advertisement
Guest User

makefile

a guest
Apr 30th, 2012
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #declaring variables. accessed with $ sign in later use.
  2. #CC will be the compiler I am using. CFLAGS are compiler flags.
  3. #YACCFLAGS are yacc flags.
  4. CC = g++
  5. CFLAGS = -c -Wall
  6. PARGEN = bison
  7. LEXPARGENFLAGS = -d
  8. LEXER = flex
  9.  
  10.  
  11. .PHONY : clean
  12. clean:
  13. rm lex.yy.o y.tab.o lex.yy.c y.tab.c y.tab.h a.out
  14.  
  15. .PHONY : build run
  16. build:
  17. $(PARGEN) $(PARGENFLAGS) pl0yacc.ypp
  18. $(LEXER) pl0Lex.l
  19. $(CC) $(CFLAGS) -lfl lex.yy.c pl0yacc.tab.cpp
  20. $(CC) lex.yy.o pl0yacc.tab.o -o a.out
  21.  
  22. run: build
  23. ./a.out<testInput
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement