Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #######################################################################
  2. #
  3. # Makefile to compile all examples and convert them to LaTeX
  4. #
  5. #######################################################################
  6. # Compiler
  7. ifndef FPC
  8. ifdef PP
  9. FPC=$(PP)
  10. endif
  11. endif
  12. ifndef FPC
  13. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  14. ifneq ($(FPCPROG),)
  15. FPCPROG:=$(firstword $(FPCPROG))
  16. FPC:=$(shell $(FPCPROG) -PB)
  17. ifneq ($(findstring Error,$(FPC)),)
  18. override FPC=ppc386
  19. endif
  20. else
  21. override FPC=ppc386
  22. endif
  23. endif
  24. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  25. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  26. # Unit directory
  27. # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
  28. # Any options you wish to pass.
  29. PPOPTS=
  30. # Script to convert the programs to LaTeX examples which can be included.
  31. PP2TEX=../pp2tex
  32. # Script to collect all examples in 1 file.
  33. MAKETEX=make1tex
  34. #######################################################################
  35. # No need to edit after this line.
  36. #######################################################################
  37. ifdef UNITDIR
  38. PPOPTS:=$(PPOPTS) -Up$(UNITDIR);
  39. endif
  40. .SUFFIXES: .pp .tex
  41. .PHONY: all tex clean
  42. OBJECTS=ex1 ex10 ex11 ex12 ex15 ex22 ex29 ex36 ex37 ex38 ex39 ex40 ex45 ex46\
  43. ex49 ex5 ex56 ex6 ex60 ex61 ex62 ex65 ex66 ex76 ex77 ex79 ex8 ex80 \
  44. ex9 ex91
  45. TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
  46. all : $(OBJECTS)
  47. tex : $(TEXOBJECTS)
  48. onetex : tex
  49. $(MAKETEX) $(TEXOBJECTS)
  50. clean :
  51. rm -f *.o *.s $(OBJECTS) $(TEXOBJECTS)
  52. rm -f *.ow *.sw *.exe *.dll
  53. $(OBJECTS): %: %.pp
  54. $(FPC) $(PPOPTS) $*
  55. $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
  56. $(PP2TEX) $*