Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 ex11 ex12 ex13 ex14 ex15 ex16 ex17
  25. # This might not be the same list as objects, since some of the
  26. # tests might be interactive.
  27. TOTEST=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex11 ex12 ex13 ex14 ex15 ex16 ex17
  28. LOGFILE=$(addsuffix .log, $(TOTEST))
  29. TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
  30. all : $(OBJECTS)
  31. execute: $(LOGFILE)
  32. tex : $(TEXOBJECTS)
  33. onetex : tex
  34. $(MAKETEX) $(TEXOBJECTS)
  35. clean :
  36. rm -f *.o *.s $(OBJECTS) $(TEXOBJECTS)
  37. rm -f *.ow *.sw *.exe *.dll *.log *.tmp
  38. $(OBJECTS): %: %.pp
  39. $(PP) $(PPOPTS) $*
  40. $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
  41. $(PP2TEX) $*
  42. $(LOGFILE): %.log: %.exe
  43. $* > $*.log