home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / source / TeX / tex / makefile < prev    next >
Encoding:
Makefile  |  1994-08-11  |  4.7 KB  |  184 lines

  1. # This file makes TeX in its various incarnations.
  2. #
  3. # The file ../common/texmf.h uses the symbol `TeX' to define certain
  4. # things that are different for TeX and Metafont, hence the addition to
  5. # CFLAGS.
  6.  
  7. SITEDIR=..
  8. CC=gcc.020 -Wall
  9. OPT=-O3
  10. NO_OPT=-I$(SITEDIR)/common -I$(SITEDIR)/gcclib -I$(SITEDIR) -DTeX
  11. #    -fomit-frame-pointer -fcombine-regs -fstrength-reduce
  12. CFLAGS=$(OPT) $(NO_OPT)
  13.  
  14. LDFLAGS=-u __doprnt -liio# force inclusion of fixnum printf lib only
  15. # LDFLAGS=-lcposix
  16. SHELL=/bin/sh
  17.  
  18.  
  19. makeargs=SITEDIR="$(SITEDIR)" CC="$(CC)" OPT="$(OPT)" LDFLAGS="$(LDFLAGS)"
  20.  
  21. .SUFFIXES:
  22. .SUFFIXES: .o .c .s
  23. .c.o:
  24.     $(CC) $(CFLAGS) -c $*.c
  25.  
  26. .s.o:
  27.     $(CC) $(CFLAGS) -S $*.c
  28.  
  29.  
  30. # Routines used everywhere.
  31. #commondefines=../common/common.defines ../common/texmf.defines
  32. commonh=../common/extra.h
  33. commono=../common/extra.o
  34.  
  35. # Routines used in both TeX and Metafont.
  36. extrac=../common/texmf.c
  37. extrah=../common/texmf.h
  38. extrao=texmf.o
  39.  
  40. # Routines used in TeX, Metafont, and BibTeX.
  41. fileioc=../common/fileio.c
  42. fileioh=../common/fileio.h
  43. fileioo=fileio.o
  44.  
  45. # We don't add `$(commono)' here, since it doesn't depend on anything in
  46. # this directory, and we write a dependency for `$(objs)' below.
  47. objs1=stat.o unx2dos.o math.o buildbox.o gettoken.o arith.o mainctrl.o filename.o
  48. objs2=$(fileioo) shipout.o scanning.o mltex.o help.o overflow.o getmem.o
  49. objs3=tex0.o tex1.o tex2.o tex3.o readfont.o tex4.o tex5.o tex6.o tex7.o tex8.o
  50. objs=$(objs1) $(objs2) $(objs3)
  51. iobjs=initprim.o ilinebrk.o idump.o iextra.o initex.o initini.o $(objs)
  52. vobjs=linebrk.o dump.o texextra.o itex.o init.o $(objs)
  53.  
  54. default:    all
  55.  
  56. all:        initex.ttp virtex.ttp
  57. triptrap:    triptex
  58.  
  59. tstcnf.ttp:    tstcnf.o initini.o $(commono) $(fileioo)
  60.         $(CC) -o tstcnf.ttp initini.o tstcnf.o $(fileioo) $(commono) $(LDFLAGS)
  61.  
  62. tstcnf.o:    tstcnf.c $(extrah) $(commonh)
  63.         $(CC) $(CFLAGS) -I. -c tstcnf.c
  64.  
  65.  
  66. initex.ttp:    $(iobjs) $(commono) banner.o
  67.         $(CC) -o initex.ttp banner.o $(iobjs) $(commono) $(LDFLAGS)
  68.  
  69. virtex.ttp:    $(vobjs) $(commono) banner.o
  70.         $(CC) -o virtex.ttp banner.o $(vobjs) $(commono) $(LDFLAGS)
  71.  
  72. run-trip:
  73.         rm -f trip.tex
  74.         -ln TeXtrip/trip.tex .
  75.         -pltotf TeXtrip/trip.pl trip.tfm
  76.         -$(SHELL) -c '. ./tripenv; \
  77.                   ./triptex < TeXtrip/trip1.in > /dev/null 2>&1'
  78.         -diff TeXtrip/tripin.log trip.log
  79.         -$(SHELL) -c '. ./tripenv; \
  80.                   ./triptex < TeXtrip/trip2.in > trip.fot'
  81.         -diff TeXtrip/trip.log trip.log
  82.         -diff TeXtrip/trip.fot trip.fot
  83.         $(SHELL) -c '. ./tripenv; \
  84.         dvitype trip.dvi < TeXtrip/dvitype.in > trip.typ'
  85.         -diff TeXtrip/trip.typ trip.typ
  86.  
  87. # The (hand-coded) file $(extrac) and the (generated) file itex.c have
  88. # #ifdefs for INITEX, so we compile them differently.
  89. iextra.o:    $(extrac) texd.h $(extrah) $(commonh)
  90.         $(CC) $(CFLAGS) -I. -DINITEX -DINI -c $(extrac) -o iextra.o
  91. #        mv $(extrao) iextra.o
  92.  
  93. iextra.s:    $(extrac) texd.h $(extrah) $(commonh)
  94.         $(CC) $(CFLAGS) -I. -DINITEX -DINI -S $(extrac) -o iextra.s
  95.  
  96. initex.o:       itex.c texd.h $(extrah) $(commonh)
  97.         $(CC) $(CFLAGS) -DINITEX -c itex.c -o initex.o
  98.  
  99. initex.s:       itex.c texd.h $(extrah) $(commonh)
  100.         $(CC) $(CFLAGS) -DINITEX -S itex.c -o initex.s
  101.  
  102. ilinebrk.o:    linebrk.c texd.h
  103.         $(CC) $(CFLAGS) -DINITEX -c linebrk.c -o ilinebrk.o
  104.  
  105. ilinebrk.s:    linebrk.c texd.h
  106.         $(CC) $(CFLAGS) -DINITEX -S linebrk.c -o ilinebrk.s
  107.  
  108. initprim.o:    initprim.c texd.h
  109.         $(CC) $(CFLAGS) -DINITEX -c initprim.c
  110.  
  111. initini.o:      init.c texd.h
  112.         $(CC) $(CFLAGS) -DINITEX -c init.c -o initini.o
  113.  
  114. idump.o:    dump.c texd.h $(extrah) $(commonh)
  115.         $(CC) $(CFLAGS) -DINITEX -c dump.c -o idump.o
  116.  
  117. idump.s:    dump.c texd.h $(extrah) $(commonh)
  118.         $(CC) $(CFLAGS) -DINITEX -S dump.c -o idump.s
  119.  
  120. $(objs):    texd.h
  121. texextra.o:    $(extrac) texd.h
  122.         $(CC) $(CFLAGS) -I. -c $(extrac) -o texextra.o
  123. #        mv $(extrao) texextra.o
  124.  
  125. $(fileioo):    $(fileioc) $(fileioh)
  126.         $(CC) $(CFLAGS) -I. -c $(fileioc)
  127.  
  128. stat.o:        ../gcclib/stat.c
  129.         $(CC) $(CFLAGS) -I. -c $*.c
  130.  
  131. unx2dos.o:    ../gcclib/unx2dos.c
  132.         $(CC) $(CFLAGS) -I. -c $*.c
  133.  
  134. banner.o:    #touch-banner
  135.         $(CC) $(CFLAGS) -I. -c banner.c
  136.  
  137. touch-banner:
  138.  
  139. arith.o:    arith.c
  140. linebrk.o:    linebrk.c
  141. shipout.o:    shipout.c
  142. gettoken.o:    gettoken.c
  143. scanning.o:    scanning.c
  144. buildbox.o:    buildbox.c
  145. math.o:        math.c
  146. mltex.o:    mltex.c
  147. help.o:        help.c
  148. overflow.o:    overflow.c
  149. getmem.o:    getmem.c
  150.  
  151.  
  152. init.o:        init.c
  153. dump.o:        dump.c
  154. tex0.o:        tex0.c
  155. tex0b.o:    tex0b.c
  156. tex1.o:        tex1.c
  157. tex2.o:        tex2.c
  158. tex3.o:        tex3.c
  159. filename.o:    filename.c
  160. readfont.o:    readfont.c
  161. #        $(CC) $(NO_OPT) -c $*.c
  162.  
  163. tex4.o:        tex4.c
  164. tex5.o:        tex5.c
  165. tex6.o:        tex6.c
  166. tex7.o:        tex7.c
  167. tex8.o:        tex8.c
  168. mainctrl.o:    mainctrl.c
  169.  
  170. clean:
  171.         rm -f stamp-* *.o triptex initex virtex
  172.         rm -f texd.h coerce.h *.log *.fmt *.aux
  173.         rm -f 8terminal.tex trip.* tripos.tex dvitype.out
  174.  
  175. veryclean:    clean
  176.         rm -f tex?.c itex.c tex.p tex.pool texput.*
  177.         rm -f \#*\# *~ *.bak *.ckp core
  178.