home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / smalltk / src / makefile.old < prev    next >
Makefile  |  1991-10-12  |  4KB  |  107 lines

  1. CFLAGS = -O
  2.  
  3. # define groups of files, to make later commands easier
  4. INTERPc = memory.c names.c news.c interp.c
  5. INTERPo = memory.o names.o news.o interp.o
  6. PRIMITIVEc = primitive.c filein.c lex.c parser.c unixio.c
  7. PRIMITIVEo = primitive.o filein.o lex.o parser.o unixio.o
  8. basicST = basic.st mag.st collect.st 
  9. unixST = file.st mult.st 
  10. testST = test.st queen.st
  11. CFILES = *.h $(INTERPc) $(PRIMITIVEc) st.c initial.c tty.c winprim.c
  12. OFILES = $(INTERPo) $(PRIMITIVEo) 
  13. STFILES = $(basicST) $(unixST) $(testST) tty.st graphics.st stdwin.st
  14. FILES = README Makefile vms.com $(CFILES) $(STFILES) *.ms
  15. # the following are used only by turboc on the ibm pc
  16. TURBOc=memory names news interp primitive filein lex parser unixio tty
  17. TINCLUDE=c:\turboc\include
  18. TLIB=c:\turboc\lib
  19.  
  20. # the following is for those poor souls who say ``make'' without looking
  21. help:
  22.     @echo "select one of the following to make"
  23.     @echo "bsdtty: Berkeley 4.2/4.3 with teletype interface "
  24.     @echo "sysvtty: System V with teletype interface "
  25.     @echo "bsdx11: Berkeley 4.2/4.3 with stdwin interface on top of X11"
  26.     @echo "ibmturboc: IBM PC with Turbo C compiler (see install.ms)"
  27.  
  28. winfiles: $(OFILES) winprim.o initial.o st.o
  29.  
  30. # initial - the initial object maker
  31. initial: $(INTERPo) $(PRIMITIVEo) initial.o $(INTERFACE)
  32.     cc -o initial $(CFLAGS) $(INTERPo) $(PRIMITIVEo) initial.o $(INTERFACE) -lm $(LIBS)
  33.  
  34. # st - the actual bytecode interpreter
  35. st: $(INTERPo) $(PRIMITIVEo) st.o $(INTERFACE)
  36.     cc -o st $(CFLAGS) $(INTERPo) $(PRIMITIVEo) st.o $(INTERFACE) -lm $(LIBS)
  37.  
  38. # bsdtty - berkeley 4.2/4.3 with tty style interface
  39. bsdtty:
  40.     make "CFLAGS=$(CFLAGS) -DB42" "LIBS=" "INTERFACE= tty.o" initial st
  41.     initial $(basicST) $(unixST) tty.st
  42.  
  43. bsdtty.lint:
  44.     lint -DB42 $(INTERPc) $(PRIMITIVEc) tty.c initial.c -lm
  45.     lint -DB42 $(INTERPc) $(PRIMITIVEc) tty.c st.c -lm
  46.  
  47. # sysvtty - system V with tty style interface
  48. sysvtty:
  49.     make "CFLAGS=$(CFLAGS) -DSYSV" "LIBS=" "INTERFACE= tty.o" initial st
  50.     initial $(basicST) $(unixST) tty.st
  51.  
  52. sysvtty.lint:
  53.     lint -DSYSV $(INTERPc) $(PRIMITIVEc) tty.c initial.c -lm
  54.     lint -DSYSV $(INTERPc) $(PRIMITIVEc) tty.c st.c -lm
  55.  
  56. # bsdterm - berkekey 4.2/4.3 with stdwin interface on top of termcap
  57. # requires Guido van Rossum's standard window package
  58. # (currently doesn't work)
  59. bsdterm: stdw.o
  60.     make "CFLAGS=$(CFLAGS) -DB42 -DSTDWIN" "LIBS= -ltermcap" "INTERFACE= winprim.o stdw.o" initial st
  61.     initial $(basicST) $(unixST) graphics.st stdwin.st
  62.  
  63. # bsdx11 - berkekey 4.2/4.3 with stdwin interface on top of x11
  64. # requires Guido van Rossum's standard window package
  65. bsdx11: stdw.o
  66.     make "CFLAGS=$(CFLAGS) -DB42 -DSTDWIN" "LIBS= -lX" "INTERFACE= winprim.o stdw.o" initial st
  67.     initial $(basicST) $(unixST) graphics.st stdwin.st
  68.  
  69. bsdx11.lint:
  70.     lint -DB42 -DSTDWIN $(INTERPc) $(PRIMITIVEc) winprim.c initial.c -lm -lX
  71.     lint -DB42 -DSTDWIN $(INTERPc) $(PRIMITIVEc) winprim.c st.c -lm -lX
  72.  
  73. # ibmturboc - IBM PC with Turbo C compiler
  74. # see installation notes for editing that must be performed first
  75. ibmturboc:
  76.     tcc -I$(TINCLUDE) -L$(TLIB) -mc -C -a -w- -est $(TURBOc) st
  77.     tcc -I$(TINCLUDE) -L$(TLIB) -mc -a -w- initial $(TURBOc)
  78.     initial basic.st mag.st collect.st file.st mult.st tty.st
  79.  
  80. # stdw.o - guidos van rossum's standard window package
  81. stdw.o:
  82.     @echo to create stdw.o see installation instructions
  83.  
  84. # all the dependencies on .h files
  85. filein.o : filein.c env.h memory.h names.h lex.h 
  86. initial.o : initial.c env.h memory.h names.h 
  87. interp.o : interp.c env.h memory.h names.h interp.h 
  88. lex.o : lex.c env.h memory.h lex.h 
  89. memory.o : memory.c env.h memory.h 
  90. names.o : names.c env.h memory.h names.h 
  91. news.o : news.c env.h memory.h names.h 
  92. parser.o : parser.c env.h memory.h names.h interp.h lex.h 
  93. primitive.o : primitive.c env.h memory.h names.h 
  94. st.o : st.c env.h memory.h names.h 
  95. tty.o : tty.c env.h memory.h 
  96. unixio.o : unixio.c env.h memory.h names.h 
  97. winprim.o : winprim.c stdwin.h stdevent.h stdtext.h env.h memory.h names.h 
  98.  
  99. # - pack - pack up the files for mailing
  100. pack: $(FILES)
  101.     packmail $(FILES)
  102.  
  103. # - tar - make a compressed tar file
  104. tar: $(FILES)
  105.     tar cvf small.v3.tar $(FILES)
  106.     compress small.v3.tar
  107.