home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / pd6.lzh / SRC / makefile < prev    next >
Makefile  |  1990-01-03  |  3KB  |  107 lines

  1. # NAME
  2. #      Makefile - for the tile forth environment
  3. # SYNOPSIS
  4. #      make [option]
  5. # DESCRIPTION
  6. #      General compilation coordinator for the threaded interpreter language
  7. #      environment (TILE). Allow compilation in different modes to simplify
  8. #      program development; compiling, recompiling, debugging, profiling,
  9. #      benchmarks, and distribution.
  10. # OPTIONS
  11. #      new
  12. #              Cleans up and compiles a fresh version.
  13. #      opt
  14. #              Use all optimization tricks known by cc.
  15. #      dbx
  16. #              Recompile for debugging with dbx.
  17. #      gprof
  18. #              Recompile for profiling with gprof.
  19. #      lint
  20. #              Verify the source code using lint.
  21. #      bench
  22. #              Some benchmarks to evaluate this threading method
  23. #      kit
  24. #              Pack the available source, test and documentation files
  25. # SEE ALSO
  26. #      make(1), cc(1), touch(1), dbx(1), grof(1), lint(1), time(1), makekit(1)
  27. # AUTHOR
  28. #      Copyright (c) 1989, Mikael R.K. Patel
  29. #      Computer Aided Design Laboratory (CADLAB)
  30. #      Department of Computer and Information Science
  31. #      Linkoping University
  32. #      S-581 83 LINKOPING
  33. #      SWEDEN
  34. #      Email: mip@ida.liu.se
  35. #
  36.  
  37. # Source and object files
  38. SRC = kernel.c kernel.h io.c io.h error.c error.h memory.c memory.h forth.c
  39. OBJS = kernel.r io.r error.r memory.r
  40.  
  41. # Machines and separate compilation directives
  42. # Vanilla Compiler might not understand void
  43. # LIBS =
  44. # CFLAGS = -Dvoid=int
  45.  
  46. # Template for your machine dependencies and libraries
  47. # LIBS = -lyourlibrary
  48. # CFLAGS = -youroption -DYOURMACHINE
  49. CFLAGS= -qgixt=/r0
  50. RDIR=rels
  51. CC=cc
  52.  
  53. forth: $(OBJS) forth.r
  54.        chd $(RDIR);$(CC) $(CFLAGS) -fd=../$@ $(OBJS) forth.r -l=/h0/lib/os9lib.l
  55.        attr -e $*
  56.  
  57.  
  58. # Object code dependencies
  59. forth.r: kernel.h io.h error.h memory.h
  60.  
  61. kernel.r: kernel.h io.h error.h memory.h
  62.  
  63. memory.r: kernel.h memory.h
  64.  
  65. error.r:  kernel.h io.h error.h memory.h
  66.  
  67. io.r:     io.h error.h memory.h
  68.  
  69.  
  70. # Cleans up and compiles a new version
  71. new:
  72.        touch forth.r
  73.        del *.r
  74.        make forth
  75.  
  76.  
  77. # Compiles for debugging with "dbx" or "dbxtool"
  78. dbx:
  79.        touch forth.r
  80.        del *.r
  81.        make forth "CFLAGS=$(CFLAGS) -g"
  82.  
  83.  
  84. # Run the benchmarks
  85. bench:
  86.        time forth src/*.f83 -s bye
  87.        time forth tst/byte_sieve.tst -s byte-sieve
  88.        time forth tst/colburn_sieve.tst -s colburn-sieve
  89.        time forth tst/fibonacci.tst -s recursive-fib
  90.        time forth tst/fibonacci.tst -s tail-recursive-fib
  91.        time forth tst/bubble_sort.tst -s bubble-sort
  92.        time forth tst/bubble_sort.tst -s bubble-sort-with-flag
  93.        time forth tst/tree_sort.tst -s tree-sort
  94.        time forth tst/matrix_mult.tst -s matrix-mult
  95.        time forth tst/permutations.tst -s permutations
  96.        time forth tst/towers_of_hanoi.tst -s towers-of-hanoi
  97.  
  98.  
  99. # Packs the available source and documentation for mailing
  100. kit:
  101.        makekit -s57k -ntile.kit. \
  102.                COPYING README PORTING RELEASES tile.1 \
  103.                Makefile $(SRC) forth.el forthtool .forthicon \
  104.                src src/* doc doc/* tst tst/* \
  105.        > tile.kit.00
  106.        mv tile.kit.* shar
  107.