Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # $Id$
  3. # This file is part of the Free Pascal run time library.
  4. # Copyright (c) 1998 by the Free Pascal Development Team
  5. #
  6. # Makefile for the Free Pascal Objpas RTL
  7. #
  8. # See the file COPYING.FPC, included in this distribution,
  9. # for details about the copyright.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. #####################################################################
  16. # Include configuration makefile
  17. #####################################################################
  18. # Where are the include files ?
  19. CFG=../cfg
  20. INC=../inc
  21. PROCINC=../$(CPU)
  22. # Get some defaults for Programs and OSes.
  23. # This will set the following variables :
  24. # inlinux COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  25. # It will also set OPT for cross-compilation, and add required options.
  26. # also checks for config file.
  27. # it expects CFG INC PROCINC to be set !!
  28. include $(CFG)/makefile.cfg
  29. #####################################################################
  30. # Objects
  31. #####################################################################
  32. EXEOBJECTS=
  33. UNITOBJECTS=objpas sysutils math
  34. #####################################################################
  35. # Main targets
  36. #####################################################################
  37. # Create Filenames
  38. EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
  39. UNITFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
  40. UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
  41. .PHONY : all clean diffs install diffclean
  42. all : $(EXEFILES) $(UNITFILES)
  43. $(EXEFILES): %$(EXEEXT): %$(PASEXT)
  44. $(PP) $(OPT) $*
  45. $(UNITFILES): %$(PPUEXT): %$(PASEXT)
  46. $(PP) $(OPT) $*
  47. install : all
  48. ifdef EXEOBJECTS
  49. $(MKDIR) $(BININSTALLDIR)
  50. $(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
  51. endif
  52. ifdef UNITOBJECTS
  53. $(MKDIR) $(UNITINSTALLDIR)
  54. $(INSTALL) $(UNITFILES) $(UNITOFILES) $(UNITINSTALLDIR)
  55. endif
  56. clean:
  57. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) $(PPAS) link.res log
  58. ifdef EXEOBJECTS
  59. -$(DEL) $(EXEFILES)
  60. endif
  61. #####################################################################
  62. # Files
  63. #####################################################################
  64. #####################################################################
  65. # Default makefile targets
  66. #####################################################################
  67. include $(CFG)/makefile.def
  68. #
  69. # $Log$
  70. # Revision 1.2 1998-09-10 14:15:50 peter
  71. # - renamed makefile to Makefile
  72. #
  73. #