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 / Beta / makefile < prev    next >
Makefile  |  2007-09-04  |  4KB  |  131 lines

  1. #
  2. # makefile for all BLITZ tools - BETA VERSION
  3. #
  4. # Harry Porter - 9 May 2007
  5. #
  6. # Type 'make' with this 'makefile' file in your current directory to compile
  7. # the BLITZ tools.  It will execute the following commands as needed, based
  8. # on files' most-recent-update times.
  9.  
  10. #########################################################################
  11. #
  12. # Use these for Solaris:
  13. #
  14. #CC=gcc
  15. #CFLAGS=-g -lm
  16. #CPLUSPLUS=g++
  17. #CPLUSPLUSFLAGS=-g
  18. #LINKFLAGS=
  19. #
  20. #########################################################################
  21. #
  22. # Use these for a PPC-based MAC:
  23. #
  24. # NOTE: If compiled this way, the tools should still run on
  25. # an Intel-based MAC, but will run 2.3 times slower.
  26. # The "-arch ppc" flag is only needed when compiling for the MAC on
  27. # Intel-based machine.
  28. # For MAC OS-X, the default stack size may be inadequate for the amount of
  29. #   recursion in larger runs of the KPL compiler, since it recurses
  30. #   in proportion to the depth of the abstract syntax tree.  This is the reason
  31. #   for the "-Xlinker -stack_size -Xlinker MMM -Xlinker -stack_addr -Xlinker NNN"
  32. #   options.  The -Xlinker option passes the next thing through to the linker, so
  33. #   the linker ends up seeing "-stack_size MMM -stack_addr NNN".  In the past, 
  34. #   these were necessary; they may still be required on some machines.
  35. #
  36. #CC=cc
  37. #CFLAGS=-g -lm -arch ppc
  38. #CPLUSPLUS=g++
  39. #CPLUSPLUSFLAGS=-g -arch ppc
  40. #LINKFLAGS=    -Xlinker -stack_size\
  41. #        -Xlinker 4000000\
  42. #        -Xlinker -stack_addr\
  43. #        -Xlinker c0000000
  44. #
  45. #########################################################################
  46. #
  47. # Use these for an Intel-based Machines
  48. #
  49. # These work for the following machines...
  50. #
  51. # Apple Mac with Intel Processors
  52. #
  53. # Windows (using Cygwin, see www.cygwin.com).
  54. #
  55. # Debian/Ubuntu Linux 2.6.20; i686; using GCC 4.1.2, although warnings
  56. # about multi-byte character constants get displayed.
  57. #
  58. # FreeBSD 5.5 on Intel hardware.
  59. #
  60. # Ubuntu 7.04, with the multi-char warnings.
  61. #
  62. # cc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5), with the multi-char warnings.
  63. #
  64. CC=cc
  65. CFLAGS=-g -lm -DBLITZ_HOST_IS_LITTLE_ENDIAN
  66. CPLUSPLUS=g++
  67. CPLUSPLUSFLAGS=-g -DBLITZ_HOST_IS_LITTLE_ENDIAN
  68. LINKFLAGS=
  69. #
  70. #########################################################################
  71.  
  72. all: asm dumpObj lddd blitz diskUtil hexdump check endian kpl
  73.  
  74. asm: asm.c
  75.     $(CC) $(CFLAGS) asm.c -o asm
  76.  
  77. lddd: lddd.c
  78.     $(CC) $(CFLAGS) lddd.c -o lddd
  79.  
  80. blitz: blitz.c
  81.     $(CC) $(CFLAGS) blitz.c -o blitz
  82.  
  83. dumpObj: dumpObj.c
  84.     $(CC) $(CFLAGS) dumpObj.c -o dumpObj
  85.  
  86. diskUtil: diskUtil.c
  87.     $(CC) $(CFLAGS) diskUtil.c -o diskUtil
  88.  
  89. hexdump: hexdump.c
  90.     $(CC) $(CFLAGS) hexdump.c -o hexdump
  91.  
  92. check: check.c
  93.     $(CC) $(CFLAGS) check.c -o check
  94.  
  95. endian: endian.c
  96.     $(CC) $(CFLAGS) endian.c -o endian
  97.  
  98. kpl:    main.o lexer.o ast.o printAst.o parser.o mapping.o check.o ir.o gen.o
  99.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) $(LINKFLAGS)\
  100.         main.o lexer.o ast.o printAst.o parser.o\
  101.         mapping.o check.o ir.o  gen.o -o kpl
  102.  
  103. main.o: main.cc main.h ast.h ir.h
  104.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c main.cc
  105.  
  106. lexer.o: lexer.cc main.h ast.h
  107.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c lexer.cc
  108.  
  109. ast.o: ast.cc main.h ast.h
  110.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c ast.cc
  111.  
  112. printAst.o: printAst.cc main.h ast.h
  113.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c printAst.cc
  114.  
  115. parser.o: parser.cc main.h ast.h
  116.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c parser.cc
  117.  
  118. mapping.o: mapping.cc main.h ast.h
  119.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c mapping.cc
  120.  
  121. check.o: check.cc main.h ast.h
  122.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c check.cc
  123.  
  124. ir.o: ir.cc main.h ast.h ir.h
  125.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c ir.cc
  126.  
  127. gen.o: gen.cc main.h ast.h ir.h
  128.     $(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c gen.cc
  129.  
  130.