2
0

Makefile 2.1 KB

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