Makefile 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  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 Go32v2 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=go32v2
  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. PPI=ppi
  52. # Where to place the result files
  53. TARGETDIR=.
  54. #####################################################################
  55. # Include default makefile
  56. #####################################################################
  57. include $(CFG)/makefile.cfg
  58. #####################################################################
  59. # System dependent
  60. #####################################################################
  61. # Define Go32v2 Units
  62. SYSTEMPPU=system$(PPUEXT)
  63. OBJECTS=strings go32 initc \
  64. dpmiexcp profile dxeload emu387 \
  65. dos crt objects printer \
  66. objpas sysutils \
  67. cpu mmx msmouse getopts heaptrc graph typinfo
  68. LOADERS=prt0 exceptn fpu
  69. #####################################################################
  70. # Include system unit dependencies
  71. #####################################################################
  72. # Get the system independent include file names.
  73. # This will set the following variables :
  74. # SYSINCNAMES
  75. include $(INC)/makefile.inc
  76. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  77. # Get the processor dependent include file names.
  78. # This will set the following variables :
  79. # CPUINCNAMES
  80. include $(PROCINC)/makefile.cpu
  81. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  82. # Put system unit dependencies together.
  83. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  84. #####################################################################
  85. # System independent Makefile
  86. #####################################################################
  87. # Add Prefix and Suffixes
  88. OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
  89. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  90. .PHONY : all install clean \
  91. libs libsclean \
  92. diffs diffclean \
  93. all : $(OBJLOADERS) $(PPUOBJECTS)
  94. install : all
  95. $(MKDIR) $(UNITINSTALLDIR)
  96. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  97. clean :
  98. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) $(PPAS) link.res log
  99. -$(DELTREE) *$(SMARTEXT)
  100. #####################################################################
  101. # Files
  102. #####################################################################
  103. #
  104. # Loaders
  105. #
  106. prt0$(OEXT) : v2prt0.as
  107. as -o prt0$(OEXT) v2prt0.as
  108. exceptn$(OEXT) : exceptn.as
  109. as -o exceptn$(OEXT) exceptn.as
  110. fpu$(OEXT) : fpu.as
  111. as -o fpu$(OEXT) fpu.as
  112. #
  113. # Base Units (System, strings, os-dependent-base-unit)
  114. #
  115. $(SYSTEMPPU) : system.pp $(SYSDEPS)
  116. $(COMPILER) -Us -Sg system.pp $(REDIR)
  117. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  118. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  119. $(SYSTEMPPU)
  120. $(COMPILER) $(INC)/strings.pp $(REDIR)
  121. go32$(PPUEXT) : go32.pp $(SYSTEMPPU)
  122. $(COMPILER) go32.pp $(REDIR)
  123. #
  124. # Delphi Object Model
  125. #
  126. include $(OBJPASDIR)/makefile.op
  127. #
  128. # System Dependent Units
  129. #
  130. # new version need -Sv switch for external variables
  131. dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) $(SYSTEMPPU)
  132. $(COMPILER) -Sg dpmiexcp.pp $(REDIR)
  133. initc$(PPUEXT) : initc.pp $(SYSTEMPPU)
  134. $(COMPILER) initc.pp $(REDIR)
  135. profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT)
  136. $(COMPILER) profile.pp $(REDIR)
  137. dxeload$(PPUEXT) : dxeload.pp $(SYSTEMPPU)
  138. $(COMPILER) dxeload.pp $(REDIR)
  139. emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
  140. dpmiexcp$(PPUEXT)
  141. $(COMPILER) emu387.pp $(REDIR)
  142. #
  143. # TP7 Compatible RTL Units
  144. #
  145. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  146. go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
  147. $(COMPILER) dos.pp $(REDIR)
  148. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
  149. $(COMPILER) crt.pp $(REDIR)
  150. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  151. $(COMPILER) $(INC)/objects.pp $(REDIR)
  152. printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
  153. $(COMPILER) printer.pp $(REDIR)
  154. #
  155. # Other RTL Units
  156. #
  157. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  158. $(COMPILER) $(PROCINC)/cpu.pp $(REDIR)
  159. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  160. $(COMPILER) $(PROCINC)/mmx.pp $(REDIR)
  161. msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
  162. $(COMPILER) msmouse.pp $(REDIR)
  163. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  164. $(COMPILER) $(INC)/getopts.pp $(REDIR)
  165. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
  166. $(COMPILER) $(INC)/heaptrc.pp $(REDIR)
  167. PPIFILES:=$(wildcard $(PPI)/*.ppi)
  168. graph$(PPUEXT) : graph.pp go32$(PPUEXT) $(SYSTEMPPU) mmx$(PPUEXT) $(PPIFILES)
  169. $(COMPILER) -I$(PPI) graph.pp $(REDIR)
  170. #####################################################################
  171. # Libs
  172. #####################################################################
  173. staticlib:
  174. make libsclean
  175. make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static
  176. sharedlib:
  177. @echo Shared Libraries not supported for Go32v2
  178. staticlibinstall: staticlib
  179. $(MKDIR) $(STATIC_LIBINSTALLDIR)
  180. $(MKDIR) $(STATIC_UNITINSTALLDIR)
  181. $(INSTALLEXE) *$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
  182. $(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)
  183. sharedlibinstall: sharedlib
  184. libinstall: staticlibinstall
  185. libsclean : clean
  186. -$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  187. #####################################################################
  188. # Default targets
  189. #####################################################################
  190. include $(CFG)/makefile.def
  191. #
  192. # $Log$
  193. # Revision 1.8 1999-02-25 10:00:01 michael
  194. # + Fixed type in strings target
  195. #
  196. # Revision 1.7 1999/02/25 07:39:20 michael
  197. # * Joined strings and sysutils
  198. #
  199. # Revision 1.6 1999/02/09 17:16:58 florian
  200. # + typinfo is now also in the makefile for go32v2
  201. # + sysutils.filetruncate for go32v2
  202. #
  203. # Revision 1.5 1999/01/21 11:54:35 peter
  204. # * renamed mouse->msmouse to resolve conflict with the api mouse unit
  205. #
  206. # Revision 1.4 1999/01/15 11:47:16 peter
  207. # + added math unit to objects
  208. #
  209. # Revision 1.3 1998/12/28 23:37:39 peter
  210. # * clean target fix, theres no objpas dir to clean anymore
  211. #
  212. # Revision 1.2 1998/12/21 14:20:37 pierre
  213. # * initc unit added
  214. #
  215. # Revision 1.1 1998/12/21 13:07:02 peter
  216. # * use -FE
  217. #
  218. # Revision 1.12 1998/11/24 23:06:40 peter
  219. # * removed platform.inc
  220. #
  221. # Revision 1.11 1998/11/24 19:50:01 jonas
  222. # + added warning about TABs
  223. #
  224. # Revision 1.10 1998/10/21 16:51:07 pierre
  225. # * dxeload range check problem solved
  226. #
  227. # Revision 1.9 1998/10/14 07:56:02 pierre
  228. # * -Sv now necessary for dpmiexcp unit
  229. #
  230. # Revision 1.8 1998/10/12 08:36:31 pierre
  231. # * wrong 'objpas' target in all removed
  232. #
  233. # Revision 1.7 1998/10/11 13:45:05 michael
  234. # + Added disk.inc to sysutils dependencies
  235. #
  236. # Revision 1.6 1998/10/11 12:21:48 michael
  237. # + Further sysutils implementations.
  238. #
  239. # Revision 1.5 1998/10/06 22:10:30 peter
  240. # + heaptrc
  241. #
  242. # Revision 1.4 1998/10/02 09:26:00 peter
  243. # * fixed rtl path
  244. #
  245. # Revision 1.3 1998/09/16 16:47:27 peter
  246. # * merged fixes
  247. #
  248. # Revision 1.1.2.2 1998/09/16 16:17:50 peter
  249. # * updates to install with go32,win32
  250. #
  251. # Revision 1.2 1998/09/15 12:09:09 peter
  252. # * merged updates
  253. #
  254. # Revision 1.1.2.1 1998/09/15 12:02:03 peter
  255. # * updates to get objpas using its own makefile
  256. #
  257. # Revision 1.1 1998/09/10 14:13:28 peter
  258. # * renamed
  259. #
  260. # Revision 1.16 1998/09/10 10:20:41 florian
  261. # * fixed typo of previous commit
  262. #
  263. # Revision 1.15 1998/09/10 10:16:52 florian
  264. # * make staticlib does now a make libclean instead of make clean
  265. #
  266. # Revision 1.14 1998/08/20 08:08:37 pierre
  267. # * dpmiexcp did not compile with older versions
  268. # due to the proc to procvar bug
  269. # * makefile separator problem fixed
  270. #
  271. # Revision 1.13 1998/08/19 10:05:01 peter
  272. # * fixed for go32v2 staticlib
  273. #
  274. # Revision 1.12 1998/08/05 10:31:05 pierre
  275. # + added BUGFIX test to be able to compile bugfix branch
  276. #
  277. # Revision 1.11 1998/07/29 15:44:37 michael
  278. # included sysutils and math.pp as target. They compile now.
  279. #
  280. # Revision 1.10 1998/07/22 21:37:03 michael
  281. # make cycle now works
  282. #
  283. # Revision 1.9 1998/05/22 00:39:36 peter
  284. # * go32v1, go32v2 recompiles with the new objects
  285. # * remake3 works again with go32v2
  286. # - removed some "optimizes" from daniel which were wrong
  287. #
  288. # Revision 1.8 1998/05/06 11:53:40 peter
  289. # * update
  290. #
  291. #