makefile 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. #
  2. # $Id$
  3. # This file is part of the Free Pascal run time library.
  4. # Copyright (c) 1996-98 by Michael van Canneyt
  5. #
  6. # Makefile for the Free Pascal Win32 Runtime Library
  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. # Start of configurable section.
  17. # Please note that all these must be set in the main makefile, and
  18. # should be set there.
  19. # Don't remove the indef statements. They serve to avoid conflicts
  20. # with the main makefile.
  21. #####################################################################
  22. # What is the Operating System ?
  23. ifndef OS_SOURCE
  24. OS_SOURCE=win32
  25. endif
  26. # What is the target operating system ?
  27. ifndef OS_TARGET
  28. OS_TARGET=win32
  29. endif
  30. # What is the target processor :
  31. ifndef CPU
  32. CPU=i386
  33. #CPU=m68k
  34. endif
  35. # What compiler to use ?
  36. ifndef PP
  37. PP=ppc386
  38. endif
  39. # What options to pass to the compiler ?
  40. # You may want to specify a config file or error definitions file here.
  41. ifndef OPT
  42. OPT=
  43. endif
  44. # Where is the PPUMOVE program ?
  45. ifndef PPUMOVE
  46. PPUMOVE=ppumove
  47. endif
  48. # Use smartlinking ?
  49. ifndef SMARTLINK
  50. SMARTLINK=NO
  51. endif
  52. # Name of library ?
  53. # If this is set, all units will be put in the same library.
  54. # If it is empty (default), the units will be left in separate files.
  55. ifndef LIBNAME
  56. LIBNAME=
  57. #LIBNAME=fpc
  58. endif
  59. # Should the library be shared or static (only if LIBNAME is set).
  60. # Set this to 'shared' or 'static' to create a librrary
  61. # Setting this to shared will disable smart linking.
  62. ifndef LIBTYPE
  63. LIBTYPE=
  64. #LIBTYPE=static
  65. endif
  66. #####################################################################
  67. # End of configurable section.
  68. # Do not edit after this line.
  69. #####################################################################
  70. #####################################################################
  71. # System independent
  72. #####################################################################
  73. # Where are the include files ?
  74. INC=../inc
  75. PROCINC=../$(CPU)
  76. CFG=../cfg
  77. OBJPASDIR=../objpas
  78. # Get some defaults for Programs and OSes.
  79. # This will set the following variables :
  80. # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  81. # It will also set OPT for cross-compilation, and add required options.
  82. # also checks for config file.
  83. # it expects INC PROCINC to be set !!
  84. include $(CFG)/makefile.cfg
  85. # Get the system independent include file names.
  86. # This will set the following variables :
  87. # SYSINCNAMES
  88. include $(INC)/makefile.inc
  89. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  90. # Get the processor dependent include file names.
  91. # This will set the following variables :
  92. # CPUINCNAMES
  93. include $(PROCINC)/makefile.cpu
  94. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  95. # Put system unit dependencies together.
  96. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  97. #####################################################################
  98. # System dependent
  99. #####################################################################
  100. # Override extensions
  101. PPUEXT=.ppw
  102. SHAREDLIBEXT=.dll
  103. # Define Linux Units
  104. SYSTEMPPU=syswin32$(PPUEXT)
  105. OBJECTS=strings objpas \
  106. dos \
  107. base messages defines
  108. # Add Prefix and Suffixes
  109. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  110. .PHONY : all install clean \
  111. libs libsclean \
  112. diffs diffclean \
  113. all : $(OBJLOADERS) $(PPUOBJECTS)
  114. install : all
  115. $(MKDIR) $(UNITINSTALLDIR)
  116. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  117. clean :
  118. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) log
  119. -$(DELTREE) *$(SMARTEXT)
  120. #####################################################################
  121. # Files
  122. #####################################################################
  123. #
  124. # Base Units (System, strings, os-dependent-base-unit)
  125. #
  126. $(SYSTEMPPU) : syswin32.pp win32.inc $(SYSDEPS)
  127. $(PP) $(OPT) -Us -Sg syswin32.pp $(REDIR)
  128. strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
  129. $(COPY) $(PROCINC)/strings.pp .
  130. $(PP) $(OPT) strings $(REDIR)
  131. $(DEL) strings.pp
  132. #
  133. # Delphi Object Model
  134. #
  135. objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
  136. $(COPY) $(OBJPASDIR)/objpas.pp .
  137. $(PP) $(OPT) objpas $(REDIR)
  138. $(DEL) objpas.pp
  139. #
  140. # System Dependent Units
  141. #
  142. base$(PPUEXT) : base.pp $(SYSTEMPPU)
  143. $(PP) $(OPT) base.pp $(REDIR)
  144. messages$(PPUEXT) : messages.pp $(SYSTEMPPU)
  145. $(PP) $(OPT) messages.pp $(REDIR)
  146. defines$(PPUEXT) : defines.pp $(SYSTEMPPU)
  147. $(PP) $(OPT) defines.pp $(REDIR)
  148. #
  149. # TP7 Compatible RTL Units
  150. #
  151. dos$(PPUEXT) : $(DOSDEPS) $(INC)/filerec.inc $(INC)/textrec.inc $(SYSTEMPPU)
  152. $(PP) $(OPT) dos $(REDIR)
  153. #objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  154. # $(COPY) $(INC)/objects.pp .
  155. # $(PP) $(OPT) objects $(REDIR)
  156. # $(DEL) objects.pp
  157. #
  158. # Other RTL Units
  159. #
  160. #####################################################################
  161. # Libs
  162. #####################################################################
  163. staticlib:
  164. make clean
  165. make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static
  166. sharedlib:
  167. make clean
  168. make all
  169. $(PPUMOVE) -o fpc $(SHAREDLIBFILES)
  170. staticlibinstall: staticlib
  171. $(MKDIR) $(STATIC_LIBINSTALLDIR)
  172. $(MKDIR) $(STATIC_UNITINSTALLDIR)
  173. $(INSTALLEXE) libfpc$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
  174. $(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)
  175. sharedlibinstall: sharedlib
  176. $(MKDIR) $(SHARED_LIBINSTALLDIR)
  177. $(MKDIR) $(SHARED_UNITINSTALLDIR)
  178. $(INSTALLEXE) libfpc$(SHAREDLIBEXT) $(SHARED_LIBINSTALLDIR)
  179. $(INSTALL) *$(PPUEXT) *$(OEXT) $(SHARED_UNITINSTALLDIR)
  180. ldconfig
  181. libinstall: staticlibinstall
  182. libsclean : clean
  183. -$(DEL) *$(SMARTLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  184. #####################################################################
  185. # Default targets
  186. #####################################################################
  187. include $(CFG)/makefile.def
  188. #
  189. # $Log$
  190. # Revision 1.7 1998-08-21 15:17:01 peter
  191. # * win32 compiles a bit better, no growheap crash
  192. #
  193. #