Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #######################################################################
  2. # Makefile for Free Pascal
  3. # (C) 1998 Michael van Canneyt
  4. #######################################################################
  5. #
  6. # Configurable section
  7. #
  8. # What Compiler should we use ?
  9. PP=../../compiler/ppc386
  10. # Where are the Free Pascal units ? (Optional)
  11. UNITDIR = ../linux\;../../rtl/linux
  12. # Any options you wish to pass to the compiler
  13. OPT=
  14. # Where to install the units ?
  15. UNITINSTALLDIR=/usr/lib/fpc/0.99.5/linuxunits
  16. # Where to install the programs ?
  17. BININSTALLDIR=/usr/local/bin
  18. #######################################################################
  19. # End of configurable section. Do not edit below this line.
  20. #######################################################################
  21. .SUFFIXES: .pp .ppu .pas
  22. .PHONY: all install clean units progs
  23. # If nothing special needs doing, then just fill in the names here.
  24. # The rest should be automatic.
  25. #UNITNAMES=
  26. PROGNAMES=fstream mstream list dparser stringl
  27. UNITOBJECTS=$(addsuffix .o, $(UNITNAMES))
  28. UNITFILES=$(addsuffix .ppu, $(UNITNAMES))
  29. PROGSOURCES=$(addsiffix .pp, $(PROGNAMES))
  30. PROGOBJECTS=$(addsuffix .o, $(PROGNAMES))
  31. # Adapt options. Add unit path if needed.
  32. ifdef UNITDIR
  33. override OPT:=$(OPT) -S2 -Up$(UNITDIR)
  34. endif
  35. # Default rule for units
  36. .pp.ppu:
  37. $(PP) $(OPT) $<
  38. # Default target.
  39. all: $(UNITFILES) $(PROGNAMES)
  40. units: $(UNITFILES)
  41. progs: $(PROGNAMES)
  42. # Default rule for programs
  43. $(PROGNAMES): %:%.pp
  44. $(PP) $(OPT) $<
  45. #
  46. # Generic install and clean targets
  47. #
  48. install: all
  49. install -m 755 $(UNITINSTALLDIR)
  50. ifdef UNITNAMES
  51. install -m 666 $(UNITNAMES) $(UNITINSTALLDIR)
  52. endif
  53. ifdef PROGNAMES
  54. install -m 755 $(PROGNAMES) $(BININSTALLDIR)
  55. endif
  56. clean:
  57. rm -f $(UNITOBJECTS) $(UNITFILES) $(PROGNAMES) $(PROGOBJECTS)
  58. # End of makefile.