Makefile 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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 math \
  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) : $(INC)/strings.pp $(INC)/stringsi.inc\
  112. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  113. $(SYSTEMPPU)
  114. $(COMPILER) $(INC)/strings.pp $(REDIR)
  115. go32$(PPUEXT) : go32.pp $(SYSTEMPPU)
  116. $(COMPILER) go32.pp $(REDIR)
  117. #
  118. # Delphi Object Model
  119. #
  120. include $(OBJPASDIR)/makefile.op
  121. #
  122. # System Dependent Units
  123. #
  124. mouse$(PPUEXT) : mouse.pp $(SYSTEMPPU)
  125. $(COMPILER) mouse.pp $(REDIR)
  126. #
  127. # TP7 Compatible RTL Units
  128. #
  129. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  130. go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
  131. $(COMPILER) dos.pp $(REDIR)
  132. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
  133. $(COMPILER) crt.pp $(REDIR)
  134. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  135. $(COMPILER) $(INC)/objects.pp $(REDIR)
  136. printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
  137. $(COMPILER) printer.pp $(REDIR)
  138. #
  139. # Other RTL Units
  140. #
  141. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  142. $(COMPILER) $(PROCINC)/cpu.pp $(REDIR)
  143. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  144. $(COMPILER) $(PROCINC)/mmx.pp $(REDIR)
  145. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  146. $(COMPILER) $(INC)/getopts.pp $(REDIR)
  147. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
  148. $(COMPILER) $(INC)/heaptrc $(REDIR)
  149. #####################################################################
  150. # Libs
  151. #####################################################################
  152. staticlib:
  153. make libsclean
  154. make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static
  155. sharedlib:
  156. @echo Shared Libraries not supported for Go32v1
  157. staticlibinstall: staticlib
  158. $(MKDIR) $(STATIC_LIBINSTALLDIR)
  159. $(MKDIR) $(STATIC_UNITINSTALLDIR)
  160. $(INSTALLEXE) fpc$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
  161. $(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)
  162. sharedlibinstall: sharedlib
  163. libinstall: staticlibinstall
  164. libsclean : clean
  165. -$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  166. #####################################################################
  167. # Default targets
  168. #####################################################################
  169. include $(CFG)/makefile.def
  170. #
  171. # $Log$
  172. # Revision 1.5 1999-02-25 10:00:43 michael
  173. # + Fixed type in strings target
  174. #
  175. # Revision 1.4 1999/02/25 07:39:21 michael
  176. # * Joined strings and sysutils
  177. #
  178. # Revision 1.3 1999/01/15 11:47:12 peter
  179. # + added math unit to objects
  180. #
  181. # Revision 1.2 1998/12/28 23:37:38 peter
  182. # * clean target fix, theres no objpas dir to clean anymore
  183. #
  184. # Revision 1.1 1998/12/21 13:07:02 peter
  185. # * use -FE
  186. #
  187. # Revision 1.9 1998/11/24 19:49:44 jonas
  188. # + added warning about TABs
  189. #
  190. # Revision 1.8 1998/10/12 08:36:29 pierre
  191. # * wrong 'objpas' target in all removed
  192. #
  193. # Revision 1.7 1998/10/11 13:45:04 michael
  194. # + Added disk.inc to sysutils dependencies
  195. #
  196. # Revision 1.6 1998/10/11 12:21:47 michael
  197. # + Further sysutils implementations.
  198. #
  199. # Revision 1.5 1998/10/06 22:10:29 peter
  200. # + heaptrc
  201. #
  202. # Revision 1.4 1998/10/02 09:25:59 peter
  203. # * fixed rtl path
  204. #
  205. # Revision 1.3 1998/09/16 16:47:26 peter
  206. # * merged fixes
  207. #
  208. # Revision 1.1.2.2 1998/09/16 16:17:49 peter
  209. # * updates to install with go32,win32
  210. #
  211. # Revision 1.2 1998/09/15 12:09:08 peter
  212. # * merged updates
  213. #
  214. # Revision 1.1.2.1 1998/09/15 12:02:02 peter
  215. # * updates to get objpas using its own makefile
  216. #