2
0

Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #######################################################################
  2. #
  3. # Makefile to compile all examples and convert them to LaTeX
  4. #
  5. #######################################################################
  6. # Compiler
  7. PP=ppc386
  8. # Unit directory
  9. # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
  10. # Any options you wish to pass.
  11. PPOPTS=
  12. # Script to convert the programs to LaTeX examples which can be included.
  13. PP2TEX=../pp2tex
  14. # Script to collect all examples in 1 file.
  15. MAKETEX=make1tex
  16. #######################################################################
  17. # No need to edit after this line.
  18. #######################################################################
  19. ifdef UNITDIR
  20. PPOPTS:=$(PPOPTS) -Up$(UNITDIR);
  21. endif
  22. .SUFFIXES: .pp .tex
  23. .PHONY: all tex clean execute
  24. OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 \
  25. ex11 ex12 ex13 ex14 ex15 ex16 ex17 ex18 ex19 ex20 \
  26. ex21 ex22 ex23 ex24 ex25 ex26 ex27 ex28 ex29 ex30 \
  27. ex31 ex32 ex33 ex34 ex35 ex36 ex37 ex38 ex39 ex40
  28. # This might not be the same list as objects, since some of the
  29. # tests might be interactive.
  30. TOTEST=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 \
  31. ex11 ex12 ex13 ex14 ex15 ex16 ex17 ex18 ex19 ex20 \
  32. ex21 ex22 ex23 ex24 ex25 ex26 ex27 ex28 ex29 ex30 \
  33. ex31 ex32 ex33 ex34 ex35 ex37 ex38 ex39 ex40
  34. LOGFILE=$(addsuffix .log, $(TOTEST))
  35. TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
  36. all : $(OBJECTS)
  37. tex : $(TEXOBJECTS) myobject.tex mysortc.tex
  38. execute: $(LOGFILE)
  39. onetex : tex
  40. $(MAKETEX) $(TEXOBJECTS)
  41. clean :
  42. rm -f *.o *.s $(OBJECTS) $(TEXOBJECTS) mysortc.ppu myobject.ppu mysortc.tex myobject.tex test.dat
  43. rm -f *.ow *.sw *.exe *.dll *.ppw *.log *.tmp
  44. $(OBJECTS): %: %.pp
  45. $(PP) $(PPOPTS) $*
  46. $(TEXOBJECTS) myobject.tex mysortc.tex: %.tex: %.pp head.tex foot.tex
  47. $(PP2TEX) $*
  48. $(LOGFILE): %.log: %.exe
  49. $* > $*.log