Makefile 7.1 KB

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