Makefile 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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 Go32v1 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. # 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. # Configuration section
  20. #####################################################################
  21. # Use smartlinking ?
  22. ifndef SMARTLINK
  23. SMARTLINK=NO
  24. endif
  25. # Name of library ?
  26. # If this is set, all units will be put in the same library.
  27. # If it is empty (default), the units will be left in separate files.
  28. ifndef LIBNAME
  29. LIBNAME=
  30. #LIBNAME=fpc
  31. endif
  32. # Should the library be shared or static (only if LIBNAME is set).
  33. # Set this to 'shared' or 'static' to create a librrary
  34. # Setting this to shared will disable smart linking.
  35. ifndef LIBTYPE
  36. LIBTYPE=
  37. #LIBTYPE=static
  38. endif
  39. #####################################################################
  40. # Defaults
  41. #####################################################################
  42. # set target and cpu which are required
  43. OS_TARGET=go32v1
  44. CPU=i386
  45. # Where are the include files
  46. RTL=..
  47. CFG=$(RTL)/cfg
  48. INC=$(RTL)/inc
  49. PROCINC=$(RTL)/$(CPU)
  50. OBJPASDIR=$(RTL)/objpas
  51. # Where are the results placed
  52. TARGETDIR=.
  53. #####################################################################
  54. # Include default makefile
  55. #####################################################################
  56. include $(CFG)/makefile.cfg
  57. #####################################################################
  58. # System dependent
  59. #####################################################################
  60. # Define Linux Units
  61. SYSTEMPPU=system$(PPUEXT)
  62. OBJECTS=strings go32 \
  63. dos crt objects printer \
  64. objpas sysutils typinfo \
  65. cpu mmx getopts heaptrc mouse
  66. LOADERS=prt0
  67. #####################################################################
  68. # Include system unit dependencies
  69. #####################################################################
  70. # Get the system independent include file names.
  71. # This will set the following variables :
  72. # SYSINCNAMES
  73. include $(INC)/makefile.inc
  74. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  75. # Get the processor dependent include file names.
  76. # This will set the following variables :
  77. # CPUINCNAMES
  78. include $(PROCINC)/makefile.cpu
  79. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  80. # Put system unit dependencies together.
  81. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  82. #####################################################################
  83. # System independent Makefile
  84. #####################################################################
  85. # Add Prefix and Suffixes
  86. OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
  87. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  88. .PHONY : all install clean \
  89. libs libsclean \
  90. diffs diffclean \
  91. all : $(OBJLOADERS) $(PPUOBJECTS)
  92. install : all
  93. $(MKDIR) $(UNITINSTALLDIR)
  94. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  95. clean :
  96. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) $(PPAS) link.res log
  97. -$(DELTREE) *$(SMARTEXT)
  98. #####################################################################
  99. # Files
  100. #####################################################################
  101. #
  102. # Loaders
  103. #
  104. prt0$(OEXT) : prt0.as
  105. as -o prt0$(OEXT) prt0.as
  106. #
  107. # Base Units (System, strings, os-dependent-base-unit)
  108. #
  109. $(SYSTEMPPU) : system.pp $(SYSDEPS)
  110. $(COMPILER) -Us -Sg system.pp $(REDIR)
  111. strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
  112. $(COMPILER) $(PROCINC)/strings.pp $(REDIR)
  113. go32$(PPUEXT) : go32.pp $(SYSTEMPPU)
  114. $(COMPILER) go32.pp $(REDIR)
  115. #
  116. # Delphi Object Model
  117. #
  118. include $(OBJPASDIR)/makefile.op
  119. #
  120. # System Dependent Units
  121. #
  122. mouse$(PPUEXT) : mouse.pp $(SYSTEMPPU)
  123. $(COMPILER) mouse.pp $(REDIR)
  124. #
  125. # TP7 Compatible RTL Units
  126. #
  127. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  128. go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
  129. $(COMPILER) dos.pp $(REDIR)
  130. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
  131. $(COMPILER) crt.pp $(REDIR)
  132. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  133. $(COMPILER) $(INC)/objects.pp $(REDIR)
  134. printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
  135. $(COMPILER) printer.pp $(REDIR)
  136. #
  137. # Other RTL Units
  138. #
  139. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  140. $(COMPILER) $(PROCINC)/cpu.pp $(REDIR)
  141. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  142. $(COMPILER) $(PROCINC)/mmx.pp $(REDIR)
  143. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  144. $(COMPILER) $(INC)/getopts.pp $(REDIR)
  145. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
  146. $(COMPILER) $(INC)/heaptrc $(REDIR)
  147. #####################################################################
  148. # Libs
  149. #####################################################################
  150. staticlib:
  151. make libsclean
  152. make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static
  153. sharedlib:
  154. @echo Shared Libraries not supported for Go32v1
  155. staticlibinstall: staticlib
  156. $(MKDIR) $(STATIC_LIBINSTALLDIR)
  157. $(MKDIR) $(STATIC_UNITINSTALLDIR)
  158. $(INSTALLEXE) fpc$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
  159. $(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)
  160. sharedlibinstall: sharedlib
  161. libinstall: staticlibinstall
  162. libsclean : clean
  163. -$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  164. #####################################################################
  165. # Default targets
  166. #####################################################################
  167. include $(CFG)/makefile.def
  168. #
  169. # $Log$
  170. # Revision 1.2 1998-12-28 23:37:38 peter
  171. # * clean target fix, theres no objpas dir to clean anymore
  172. #
  173. # Revision 1.1 1998/12/21 13:07:02 peter
  174. # * use -FE
  175. #
  176. # Revision 1.9 1998/11/24 19:49:44 jonas
  177. # + added warning about TABs
  178. #
  179. # Revision 1.8 1998/10/12 08:36:29 pierre
  180. # * wrong 'objpas' target in all removed
  181. #
  182. # Revision 1.7 1998/10/11 13:45:04 michael
  183. # + Added disk.inc to sysutils dependencies
  184. #
  185. # Revision 1.6 1998/10/11 12:21:47 michael
  186. # + Further sysutils implementations.
  187. #
  188. # Revision 1.5 1998/10/06 22:10:29 peter
  189. # + heaptrc
  190. #
  191. # Revision 1.4 1998/10/02 09:25:59 peter
  192. # * fixed rtl path
  193. #
  194. # Revision 1.3 1998/09/16 16:47:26 peter
  195. # * merged fixes
  196. #
  197. # Revision 1.1.2.2 1998/09/16 16:17:49 peter
  198. # * updates to install with go32,win32
  199. #
  200. # Revision 1.2 1998/09/15 12:09:08 peter
  201. # * merged updates
  202. #
  203. # Revision 1.1.2.1 1998/09/15 12:02:02 peter
  204. # * updates to get objpas using its own makefile
  205. #