Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 <Template>
  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. # Warning: this file contains TAB (#9) characters that are required for
  16. # make. Make sure you use an editor that does not replace TABs with
  17. # spaces, or the makefile won't work anymore after you save.
  18. #####################################################################
  19. # Defaults
  20. #####################################################################
  21. # Where are the include files ?
  22. RTL=..
  23. CFG=$(RTL)/cfg
  24. #INC=$(RTL)/inc
  25. #PROCINC=$(RTL)/$(CPU)
  26. #####################################################################
  27. # Include configuration makefile
  28. #####################################################################
  29. # Get some defaults for Programs and OSes.
  30. # This will at least set the following variables :
  31. # inlinux COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  32. # INSTALLDIR UNITDIR PPOPT PP CPU COMPILER
  33. include $(CFG)/makefile.cfg
  34. #####################################################################
  35. # Objects
  36. #####################################################################
  37. EXEOBJECTS=
  38. UNITOBJECTS=
  39. #####################################################################
  40. # Main targets
  41. #####################################################################
  42. # Create Filenames
  43. EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
  44. UNITFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
  45. UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
  46. .PHONY : all clean diffs install diffclean
  47. all : $(EXEFILES) $(UNITFILES) targetdir
  48. $(EXEFILES): %$(EXEEXT): %$(PASEXT)
  49. $(COMPILER) $*
  50. $(UNITFILES): %$(PPUEXT): %$(PASEXT)
  51. $(COMPILER) $*
  52. targetdir:
  53. ifdef UNITTARGETDIR
  54. ifdef EXEOBJECTS
  55. $(COPY) $(EXEFILES) $(BINTARGETDIR)
  56. endif
  57. endif
  58. ifdef UNITTARGETDIR
  59. ifdef UNITOBJECTS
  60. $(COPY) $(UNITFILES) $(UNITTARGETDIR)
  61. ifeq ($(SMARTLINK),YES)
  62. $(COPY) $(LIBPREFIX)$(LIBNAME)$(LIBEXT) $(UNITTARGETDIR)
  63. else
  64. $(COPY) $(UNITOFILES) $(UNITTARGETDIR)
  65. endif
  66. endif
  67. endif
  68. install : all
  69. ifdef EXEOBJECTS
  70. $(MKDIR) $(BININSTALLDIR)
  71. $(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
  72. endif
  73. ifdef UNITOBJECTS
  74. $(MKDIR) $(UNITINSTALLDIR)
  75. ifeq ($(SMARTLINK),YES)
  76. $(INSTALL) $(LIBPREFIX)$(LIBNAME)$(LIBEXT) $(UNITINSTALLDIR)
  77. else
  78. $(INSTALL) $(UNITFILES) $(UNITOFILES) $(UNITINSTALLDIR)
  79. endif
  80. endif
  81. clean:
  82. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) $(PPAS) link.res log
  83. -$(DELTREE) *$(SMARTEXT)
  84. ifdef EXEOBJECTS
  85. -$(DEL) $(EXEFILES)
  86. endif
  87. #####################################################################
  88. # Files
  89. #####################################################################
  90. #####################################################################
  91. # Default makefile targets
  92. #####################################################################
  93. include $(CFG)/makefile.def
  94. #
  95. # $Log$
  96. # Revision 1.3 1998-11-24 19:52:44 jonas
  97. # + added warning about TABs
  98. #
  99. # Revision 1.2 1998/09/16 16:47:30 peter
  100. # * merged fixes
  101. #
  102. # Revision 1.1.2.1 1998/09/16 16:17:53 peter
  103. # * updates to install with go32,win32
  104. #
  105. #