Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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=ppc386
  10. # Where are the Free Pascal units ? (Optional)
  11. #UNITDIR = c:/pp/units/os2
  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=c:/pp/units/fcl
  19. # Where to install the programs ?
  20. BININSTALLDIR=/pp/bin
  21. # Install program ?
  22. INSTALL=cp
  23. # Mkdir program ?
  24. MKDIR=mkdir
  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)
  59. #
  60. # Generic install and clean targets
  61. #
  62. install: all
  63. $(MKDIR) $(UNITINSTALLDIR)
  64. ifdef UNITNAMES
  65. $(INSTALL) $(UNITNAMES) $(UNITINSTALLDIR)
  66. endif
  67. ifdef PROGNAMES
  68. $(INSTALL) $(PROGNAMES) $(BININSTALLDIR)
  69. endif
  70. clean:
  71. rm -f $(UNITOBJECTS) $(UNITFILES) $(PROGNAMES) $(PROGOBJECTS)
  72. # End of makefile.