home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / Harry / Blitz / version-1-0 / BlitzSrc / kpl / makefile-Mac < prev    next >
Makefile  |  2006-03-19  |  2KB  |  56 lines

  1. #
  2. # Type 'make' with this 'makefile' file in your current directory to compile
  3. # the KPL compiler components.  It will execute the following commands
  4. # as needed, based on file most-recent-update times.
  5.  
  6. CC=g++
  7.  
  8. # The "-arch ppc" flag is only needed when compiling for the MAC.
  9. CFLAGS=-g -arch ppc
  10.  
  11. all:    kpl
  12.  
  13. #
  14. # For MAC OS-X, the default stack size may be inadequate for the amount of
  15. #   recursion in larger runs of the KPL compiler, since it recurses
  16. #   in proportion to the depth of the abstract syntax tree.  This is the reason
  17. #   for the "-Xlinker -stack_size -Xlinker MMM -Xlinker -stack_addr -Xlinker NNN"
  18. #   options.  The -Xlinker option passes the next thing through to the linker, so
  19. #   the linker ends up seeing "-stack_size MMM -stack_addr NNN".
  20. # For Sun/SPARC, these options are not needed or allowed, so they must be
  21. #   commented out.
  22. #
  23.  
  24. kpl:    main.o lexer.o ast.o printAst.o parser.o mapping.o check.o ir.o gen.o
  25.     $(CC) $(CFLAGS) main.o lexer.o ast.o printAst.o parser.o\
  26.             mapping.o check.o ir.o  gen.o -o kpl\
  27.             -Xlinker -stack_size -Xlinker 4000000 -Xlinker -stack_addr -Xlinker c0000000
  28.  
  29. main.o: main.cc main.h ast.h ir.h
  30.     $(CC) $(CFLAGS) -c main.cc
  31.  
  32. lexer.o: lexer.cc main.h ast.h
  33.     $(CC) $(CFLAGS) -c lexer.cc
  34.  
  35. ast.o: ast.cc main.h ast.h
  36.     $(CC) $(CFLAGS) -c ast.cc
  37.  
  38. printAst.o: printAst.cc main.h ast.h
  39.     $(CC) $(CFLAGS) -c printAst.cc
  40.  
  41. parser.o: parser.cc main.h ast.h
  42.     $(CC) $(CFLAGS) -c parser.cc
  43.  
  44. mapping.o: mapping.cc main.h ast.h
  45.     $(CC) $(CFLAGS) -c mapping.cc
  46.  
  47. check.o: check.cc main.h ast.h
  48.     $(CC) $(CFLAGS) -c check.cc
  49.  
  50. ir.o: ir.cc main.h ast.h ir.h
  51.     $(CC) $(CFLAGS) -c ir.cc
  52.  
  53. gen.o: gen.cc main.h ast.h ir.h
  54.     $(CC) $(CFLAGS) -c gen.cc
  55.