Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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=/home/michael/fpk/compiler/ppc386
  10. # Where are the Free Pascal units ? (Optional)
  11. UNITDIR = /home/michael/fpk/rtl/linux
  12. # Processor you are using
  13. CPU=i386
  14. #CPU=m68k
  15. # Any options you wish to pass to the compiler
  16. OPT=
  17. # Where to install the units ?
  18. UNITINSTALLDIR=/usr/lib/fpc/0.99.6/fcl
  19. # Where to install the programs ?
  20. BININSTALLDIR=/usr/local/bin
  21. # Install program ?
  22. INSTALL=install -m 644
  23. # Mkdir program ?
  24. MKDIR=install -m 755
  25. #######################################################################
  26. # End of configurable section. Do not edit below this line.
  27. #######################################################################
  28. .SUFFIXES: .pp .ppu .pas
  29. .PHONY: all install clean units progs
  30. INCDIR=../inc
  31. CPUDIR=../$(CPU)
  32. include $(INCDIR)/Makefile.inc
  33. # Set inc
  34. INCFILENAMES=$(addprefix $(INCDIR)/,$(INCNAMES))
  35. # If nothing special needs doing, then just fill in the names here.
  36. # The rest should be automatic.
  37. UNITNAMES=classes
  38. #PROGNAMES=
  39. UNITOBJECTS=$(addsuffix .o, $(UNITNAMES))
  40. UNITFILES=$(addsuffix .ppu, $(UNITNAMES))
  41. PROGSOURCES=$(addsiffix .pp, $(PROGNAMES))
  42. PROGOBJECTS=$(addsuffix .o, $(PROGNAMES))
  43. # Adapt options. Add unit path if needed.
  44. override OPT:=$(OPT) -S2 -I$(INCDIR) -I$(CPUDIR)
  45. ifdef UNITDIR
  46. override OPT:=$(OPT) -Up$(UNITDIR)
  47. endif
  48. # Default rule for units
  49. .pp.ppu:
  50. $(PP) $(OPT) $<
  51. # Default target.
  52. all: $(UNITFILES) $(PROGNAMES)
  53. units: $(UNITFILES)
  54. progs: $(PROGNAMES)
  55. # Default rule for programs
  56. $(PROGNAMES): %:%.pp
  57. $(PP) $(OPT) $<
  58. classes.ppu: classes.pp $(INCFILENAMES) $(PROCFILENAMES) osfile.inc \
  59. oscalls.inc
  60. #
  61. # Generic install and clean targets
  62. #
  63. install: all
  64. $(MKDIR) $(UNITINSTALLDIR)
  65. ifdef UNITNAMES
  66. $(INSTALL) $(UNITNAMES) $(UNITINSTALLDIR)
  67. endif
  68. ifdef PROGNAMES
  69. $(INSTALL) $(PROGNAMES) $(BININSTALLDIR)
  70. endif
  71. clean:
  72. rm -f $(UNITOBJECTS) $(UNITFILES) $(PROGNAMES) $(PROGOBJECTS)
  73. # End of makefile.