home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / turtlegr.zip / scm / makefile.x11 < prev    next >
Makefile  |  1992-11-01  |  5KB  |  188 lines

  1. # Makefile for SCM (Scheme implementation intended for JACAL).
  2. # Copyright (C) 1990, 1991, 1992 Aubrey Jaffer.
  3. # See the file "COPYING" for terms applying to this program
  4.  
  5. # directory where COPYING and Init.scm reside.
  6. IMPLPATH=/usr/local/lib/scm/
  7. #this one is good while debugging
  8. #IMPLPATH=`pwd`/
  9.  
  10. # Pathname where Init.scm resides.  This directory must also contain COPYING.
  11. IMPLINIT=$(IMPLPATH)Init.scm
  12. # If pathname where Init.scm resides is not known in advance then
  13. # SCM_INIT_PATH is the environment variable whose value is the
  14. # pathname where Init.scm resides.
  15. # IMPLINIT=
  16.  
  17. # directory where `make install' will put executable.
  18. DEST=/usr/local/bin/
  19. # directory where `make install' will put manual page.
  20. MANDEST=/usr/local/man/man1/
  21.  
  22. #CC = your compiler
  23. # -DRTL if this is a run-time library only (no interactive top level)
  24. # -Dunix is required for SCO
  25. # -DRECKLESS if you want most scm error checking disabled.
  26. # -O if you want the optimizing C compiler to be used.
  27. CFLAGS =-Wall -O -DX11 -DFLOATS -I/usr/local/X11R5/include
  28.  
  29. # append any names of user extension files
  30. # -lm for -DFLOATS
  31. LIBS = -lm -L/usr/X386/lib/jump -lX11
  32.  
  33. # for BSD nm format
  34. SED_TO_STRIP_NM=sed -e '/.*\.o$$/d' -e 's/.* _//'
  35. # For a System V nm where plain C identifiers have _ prepended:
  36. #SED_TO_STRIP_NM=sed -e '/^_[A-Za-z][A-za-z0-9_]*[     |].*|extern|!d' -e 's/|/ /g' -e 's/^_//' 
  37. # For a System V nm where plain C identifiers have nothing prepended:
  38. #SED_TO_STRIP_NM=sed -e '/^[A-Za-z][A-za-z0-9_]*[     |].*|extern|!d' -e 's/|/ /g'
  39.  
  40. #you should not need to change below this line.
  41.  
  42. SHELL = /bin/sh
  43. DFLAG = -DIMPLINIT=\"$(IMPLINIT)\"
  44. ffiles = time.o repl.o fscl.o sys.o feval.o subr.o sc2.o funif.o turtlegr.o
  45. efiles = time.o repl.o escl.o sys.o eeval.o subr.o sc2.o eunif.o turtlegr.o
  46. cfiles = scm.c time.c repl.c scl.c sys.c eval.c subr.c sc2.c unif.c turtlegr.c
  47. hfiles = scm.h config.h patchlvl.h
  48. tfiles = Init.scm test.scm example.scm pi.scm pi.c
  49. dfiles = README COPYING scm.1 scm.doc MANUAL ChangeLog code.doc ANNOUNCE
  50. mfiles = makefile.unix makefile.msc makefile.bor makefile.tur\
  51.     makefile.djg makefile.qc compile.amiga link.amiga makefile.aztec\
  52.     makefile.ast makefile.prj
  53. vfiles = setjump.mar setjump.h VMSBUILD.COM VMSGCC.COM
  54. afiles = $(dfiles) $(cfiles) $(hfiles) $(tfiles) $(mfiles) $(vfiles)
  55. gfiles = makefile.x11 turtlegr.c grtest.scm turtle
  56.  
  57. all:    scm
  58. scheme:    scm
  59.  
  60. # -DINITS= the initialization calls for user extension files.
  61. turtlegr.o:    turtlegr.c scm.h config.h
  62.     $(CC) -c $(CFLAGS) turtlegr.c
  63.  
  64. dbscm:    $(efiles) ../db/db.a scm.c scm.h config.h patchlvl.h
  65.     $(CC) -o dbscm $(efiles) $(CFLAGS) -DINITS=init_db\(\) scm.c ../db/db.a
  66.  
  67. scm:    $(ffiles) fscm.o
  68.     $(CC) -o scm $(ffiles) fscm.o $(LIBS)
  69. fscm.o:    scm.c scm.h config.h patchlvl.h
  70.     $(CC) $(CFLAGS) -c -DFLOATS -DINITS=init_turtlegr\(\) scm.c
  71.     mv scm.o fscm.o
  72. fscl.o:    scl.c scm.h
  73.     $(CC) $(CFLAGS) -c -DFLOATS scl.c
  74.     mv scl.o fscl.o
  75. feval.o:    eval.c scm.h
  76.     $(CC) $(CFLAGS) -c -DFLOATS eval.c
  77.     mv eval.o feval.o
  78. funif.o:    unif.c scm.h
  79.     $(CC) $(CFLAGS) -c -DFLOATS unif.c
  80.     mv unif.o funif.o
  81.  
  82. escm:    $(efiles) escm.o
  83.     $(CC) -o escm $(efiles) escm.o
  84. escm.o:    scm.c scm.h config.h patchlvl.h
  85.     $(CC) $(CFLAGS) -c -DINITS=init_turtlegr\(\) scm.c
  86.     mv scm.o escm.o
  87. escl.o:    scl.c scm.h
  88.     $(CC) $(CFLAGS) -c scl.c
  89.     mv scl.o escl.o
  90. eeval.o:    eval.c scm.h
  91.     $(CC) $(CFLAGS) -c eval.c
  92.     mv eval.o eeval.o
  93. eunif.o:    unif.c scm.h
  94.     $(CC) $(CFLAGS) -c unif.c
  95.     mv unif.o eunif.o
  96.  
  97. repl.o:    repl.c scm.h config.h
  98.     $(CC) $(CFLAGS) -c $(DFLAG) repl.c
  99. sys.o:    sys.c scm.h config.h
  100.     $(CC) $(CFLAGS) -c sys.c
  101. time.o:    time.c scm.h config.h
  102.     $(CC) $(CFLAGS) -c time.c
  103. subr.o:    subr.c scm.h
  104.     $(CC) $(CFLAGS) -c subr.c
  105. sc2.o:    sc2.c scm.h
  106.     $(CC) $(CFLAGS) -c sc2.c
  107.  
  108. both:    scm escm
  109.  
  110. libscm.a:    rtlscm.o $(ffiles)
  111.     rm -f libscm.a
  112.     ar rc libscm.a rtlscm.o $(ffiles)
  113.     ranlib libscm.a
  114.  
  115. rtlscm.o:    scm.c scm.h config.h patchlvl.h
  116.     $(CC) $(CFLAGS) -c -DFLOATS -DRTL -DINITS=init_user_scm\(\) scm.c
  117.     mv scm.o rtlscm.o
  118.  
  119. scm.doc:    scm.1
  120.     nroff -man scm.1 >scm.doc
  121.  
  122. install:    scm scm.1
  123.     cp scm $(DEST)
  124.     strip $(DEST)scm
  125.     -cp scm.1 $(MANDEST)
  126.     -cp Init.scm $(IMPLPATH)
  127.     -cp COPYING $(IMPLPATH)
  128.  
  129. tar:    turtlegr.tar
  130. turtlegr.tar:    temp/scm
  131.     cd temp; tar chf ../turtlegr.tar scm
  132.     -rm -rf temp
  133. shar:    scm.shar
  134. scm.shar:    temp/scm
  135.     cd temp; shar scm >../scm.shar
  136. dclshar:    scm.com
  137. com:    scm.com
  138. scm.com:    temp/scm
  139.     cd temp; dclshar scm >../scm.com
  140.  
  141. temp/scm:    $(gfiles)
  142.     -rm -rf temp
  143.     mkdir temp
  144.     mkdir temp/scm
  145.     ln  $(gfiles) temp/scm
  146.  
  147. dist:    tar.Z
  148. tar.Z:    turtlegr.tar.Z
  149. turtlegr.tar.Z:    turtlegr.tar
  150.     -rm -f turtlegr.tar.Z
  151.     compress turtlegr.tar
  152. shar.Z:    scm.shar.Z
  153. scm.shar.Z:    scm.shar
  154.     -rm -f scm.shar.Z
  155.     compress scm.shar
  156.  
  157. check:    scm test.scm
  158.     echo '(test-sc4)(test-cont)(test-inexact)(quit 0)' | scm test.scm
  159. lint:    lints
  160. lints:    $(cfiles) $(hfiles)
  161.     lint $(CFLAGS) -DFLOATS $(cfiles) | tee lints
  162. #    lint $(CFLAGS) $(cfiles) | tee lintes
  163. name8:    name8s
  164. name8s:    scm
  165.     nm scm |\
  166.     $(SED_TO_STRIP_NM) |\
  167.     sort -u|\
  168.     awk '{    if (substr(l,1,8)==substr($$1,1,8)) {\
  169.             if (p) print l;\
  170.             print $$1;p=0;stat=1\
  171.         }else p=1;\
  172.         l=$$1\
  173.          }END{exit stat}' -
  174. ctags:    $(hfiles) $(cfiles) code.doc
  175.     etags $(hfiles) $(cfiles) code.doc
  176. TAGS:
  177. tags:    $(hfiles) $(cfiles) Init.scm MANUAL code.doc $(mfiles) README
  178.     etags $(hfiles) $(cfiles) Init.scm MANUAL code.doc $(mfiles) README
  179. mostlyclean:
  180. clean:
  181.     -rm -f *~ \#* *\# *.orig *.rej a.out core lints tmp*
  182. distclean:
  183.     -rm -f *~ \#* *.o *\# *.orig *.rej a.out core lints tmp*
  184.     -rm -rf temp
  185. realclean:
  186.     -rm -f *~ \#* *.o *\# *.orig *.rej a.out core TAGS lints tmp* scm.doc
  187.     -rm -rf temp
  188.