home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / smalltk / src / makefile < prev    next >
Makefile  |  1991-10-12  |  5KB  |  123 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.  
  16. # the following are used only by turboc and borland c++ on the ibm pc
  17. TURBOc = memory names news interp primitive filein lex parser unixio tty
  18. TINCLUDE = c:\turboc\include
  19. TLIB = c:\turboc\lib
  20. BC = st.c initial.c tty.c
  21. BCINCLUDE = c:\cpp\include
  22. BCLIB = c:\cpp\lib
  23.  
  24.  
  25. # the following is for those poor souls who say ``make'' without looking
  26. help:
  27.   @echo select one of the following to make:
  28.   @echo bsdtty:     Berkeley 4.2/4.3 with teletype interface
  29.   @echo sysvtty:    System V with teletype interface
  30.   @echo bsdx11:     Berkeley 4.2/4.3 with stdwin interface on top of X11
  31.   @echo ibmturboc:  IBM PC with Turbo C compiler (see install.txt)
  32.   @echo bc++:       IBM PC with Borland C++ compiler (see install.txt)
  33.  
  34. winfiles: $(OFILES) winprim.o initial.o st.o
  35.  
  36. # initial - the initial object maker
  37. initial: $(INTERPo) $(PRIMITIVEo) initial.o $(INTERFACE)
  38.   cc -o initial $(CFLAGS) $(INTERPo) $(PRIMITIVEo) initial.o $(INTERFACE) -lm $(LIBS)
  39.  
  40. # st - the actual bytecode interpreter
  41. st: $(INTERPo) $(PRIMITIVEo) st.o $(INTERFACE)
  42.   cc -o st $(CFLAGS) $(INTERPo) $(PRIMITIVEo) st.o $(INTERFACE) -lm $(LIBS)
  43.  
  44. # bsdtty - berkeley 4.2/4.3 with tty style interface
  45. bsdtty:
  46.   make "CFLAGS=$(CFLAGS) -DB42" "LIBS=" "INTERFACE= tty.o" initial st
  47.   initial $(basicST) $(unixST) tty.st
  48.  
  49. bsdtty.lint:
  50.   lint -DB42 $(INTERPc) $(PRIMITIVEc) tty.c initial.c -lm
  51.   lint -DB42 $(INTERPc) $(PRIMITIVEc) tty.c st.c -lm
  52.  
  53. # sysvtty - system V with tty style interface
  54. sysvtty:
  55.   make "CFLAGS=$(CFLAGS) -DSYSV" "LIBS=" "INTERFACE= tty.o" initial st
  56.   initial $(basicST) $(unixST) tty.st
  57.  
  58. sysvtty.lint:
  59.   lint -DSYSV $(INTERPc) $(PRIMITIVEc) tty.c initial.c -lm
  60.   lint -DSYSV $(INTERPc) $(PRIMITIVEc) tty.c st.c -lm
  61.  
  62. # bsdterm - berkekey 4.2/4.3 with stdwin interface on top of termcap
  63. # requires Guido van Rossum's standard window package
  64. # (currently doesn't work)
  65. bsdterm: stdw.o
  66.   make "CFLAGS=$(CFLAGS) -DB42 -DSTDWIN" "LIBS= -ltermcap" "INTERFACE= winprim.o stdw.o" initial st
  67.   initial $(basicST) $(unixST) graphics.st stdwin.st
  68.  
  69. # bsdx11 - berkekey 4.2/4.3 with stdwin interface on top of x11
  70. # requires Guido van Rossum's standard window package
  71. bsdx11: stdw.o
  72.   make "CFLAGS=$(CFLAGS) -DB42 -DSTDWIN" "LIBS= -lX" "INTERFACE= winprim.o stdw.o" initial st
  73.   initial $(basicST) $(unixST) graphics.st stdwin.st
  74.  
  75. bsdx11.lint:
  76.   lint -DB42 -DSTDWIN $(INTERPc) $(PRIMITIVEc) winprim.c initial.c -lm -lX
  77.   lint -DB42 -DSTDWIN $(INTERPc) $(PRIMITIVEc) winprim.c st.c -lm -lX
  78.  
  79. # ibmturboc - IBM PC with Turbo C compiler
  80. # see installation notes for editing that must be performed first
  81. ibmturboc:
  82.   tcc -I$(TINCLUDE) -L$(TLIB) -mc -C -a -w- -est $(TURBOc) st
  83.   tcc -I$(TINCLUDE) -L$(TLIB) -mc -a -w- initial $(TURBOc)
  84.   initial basic.st mag.st collect.st file.st mult.st tty.st
  85.  
  86. # bc++ - IBM PC with Borlad C++ compiler
  87. # hacked in by Daniel Simmons 9/14/91
  88. bc++:
  89.   bccx -I$(BCINCLUDE) -C -a -w- -c $(PRIMITIVEc)
  90.   bccx -I$(BCINCLUDE) -C -a -w- -c $(INTERPc)
  91.   bccx -I$(BCINCLUDE) -C -a -w- -c $(BC)
  92.   tlinkx /c /LC:\cpp\lib C0c $(TURBOc) st, st,, @bclibs
  93.   tlinkx /c /LC:\cpp\lib C0c $(TURBOc) initial, initial,, @bclibs
  94.   initial basic.st mag.st collect.st file.st mult.st tty.st
  95.  
  96. # stdw.o - guidos van rossum's standard window package
  97. stdw.o:
  98.   @echo to create stdw.o see installation instructions
  99.  
  100. # all the dependencies on .h files
  101. filein.o : filein.c env.h memory.h names.h lex.h
  102. initial.o : initial.c env.h memory.h names.h
  103. interp.o : interp.c env.h memory.h names.h interp.h
  104. lex.o : lex.c env.h memory.h lex.h
  105. memory.o : memory.c env.h memory.h
  106. names.o : names.c env.h memory.h names.h
  107. news.o : news.c env.h memory.h names.h
  108. parser.o : parser.c env.h memory.h names.h interp.h lex.h
  109. primitive.o : primitive.c env.h memory.h names.h
  110. st.o : st.c env.h memory.h names.h
  111. tty.o : tty.c env.h memory.h
  112. unixio.o : unixio.c env.h memory.h names.h
  113. winprim.o : winprim.c stdwin.h stdevent.h stdtext.h env.h memory.h names.h
  114.  
  115. # - pack - pack up the files for mailing
  116. pack: $(FILES)
  117.   packmail $(FILES)
  118.  
  119. # - tar - make a compressed tar file
  120. tar: $(FILES)
  121.   tar cvf small.v3.tar $(FILES)
  122.   compress small.v3.tar
  123.