makefile 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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. #####################################################################
  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=GO32V2
  25. endif
  26. # What is the target operating system ?
  27. ifndef OS_TARGET
  28. OS_TARGET=GO32V2
  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. # I think ppc386 is better (it's mostly in path) (FK)
  37. ifndef PP
  38. PP=ppc386
  39. endif
  40. # What options to pass to the compiler ?
  41. # You may want to specify a config file or error definitions file here.
  42. ifndef OPT
  43. OPT=
  44. endif
  45. # Where is the ppumove program ?
  46. ifndef PPUMOVE
  47. PPUMOVE=ppumove
  48. endif
  49. #####################################################################
  50. # End of configurable section.
  51. # Do not edit after this line.
  52. #####################################################################
  53. # Where are the include files
  54. INC=../../inc
  55. PROCINC=../../$(CPU)
  56. CFG=../../cfg
  57. OBJPASDIR=../../objpas
  58. # Where are the .ppi files.
  59. PPI=../ppi
  60. # Get some defaults for Programs and OSes.
  61. # This will set the following variables :
  62. # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  63. # It will also set OPT for cross-compilation, and add required options.
  64. # also checks for config file.
  65. # it expects INC PROCINC to be set !!
  66. include $(CFG)/makefile.cfg
  67. # Get the system independent include file names.
  68. # This will set the following variables :
  69. # SYSINCNAMES
  70. include $(INC)/makefile.inc
  71. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  72. # Get the processor dependent include file names.
  73. # This will set the following variables :
  74. # CPUINCNAMES
  75. include $(PROCINC)/makefile.cpu
  76. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  77. # Put system unit dependencies together.
  78. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  79. #####################################################################
  80. # System dependent
  81. #####################################################################
  82. # Define Go32v2 Units
  83. SYSTEMPPU=system$(PPUEXT)
  84. # BUGFIX branch cannot handle sysutils
  85. ifndef BUGFIX
  86. OBJECTS=strings go32 objpas sysutils math\
  87. dpmiexcp profile dxeload emu387 \
  88. dos crt objects printer \
  89. cpu mmx mouse getopts graph
  90. else
  91. OBJECTS=strings go32 objpas math\
  92. dpmiexcp profile dxeload emu387 \
  93. dos crt objects printer \
  94. cpu mmx mouse getopts graph
  95. endif
  96. LOADERS=prt0 exceptn fpu
  97. #####################################################################
  98. # System independent Makefile
  99. #####################################################################
  100. # Add Prefix and Suffixes
  101. OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
  102. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  103. .PHONY : all install clean \
  104. libs libsclean \
  105. diffs diffclean \
  106. all : $(OBJLOADERS) $(PPUOBJECTS)
  107. install : all
  108. $(MKDIR) $(BASEINSTALLDIR)
  109. $(MKDIR) $(UNITINSTALLDIR)
  110. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  111. clean :
  112. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
  113. -$(DELTREE) *$(SMARTEXT)
  114. #####################################################################
  115. # Files
  116. #####################################################################
  117. #
  118. # Loaders
  119. #
  120. prt0$(OEXT) : v2prt0.as
  121. as -o prt0$(OEXT) v2prt0.as
  122. exceptn$(OEXT) : exceptn.as
  123. as -o exceptn$(OEXT) exceptn.as
  124. fpu$(OEXT) : fpu.as
  125. as -o fpu$(OEXT) fpu.as
  126. #
  127. # Base Units (System, strings, os-dependent-base-unit)
  128. #
  129. $(SYSTEMPPU) : system.pp $(SYSDEPS)
  130. $(PP) $(OPT) -Us -Sg system.pp $(REDIR)
  131. strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
  132. $(COPY) $(PROCINC)/strings.pp .
  133. $(PP) $(OPT) strings.pp $(REDIR)
  134. $(DEL) strings.pp
  135. go32$(PPUEXT) : ../go32.pp $(SYSTEMPPU)
  136. $(COPY) ../go32.pp .
  137. $(PP) $(OPT) go32.pp $(REDIR)
  138. $(DEL) go32.pp
  139. #
  140. # Delphi Object Model
  141. #
  142. objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
  143. $(COPY) $(OBJPASDIR)/objpas.pp .
  144. -$(PP) $(OPT) objpas.pp $(REDIR)
  145. $(DEL) objpas.pp
  146. sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(SYSTEMPPU) objpas$(PPUEXT) \
  147. dos$(PPUEXT)
  148. $(COPY) $(OBJPASDIR)/sysutils.pp .
  149. $(PP) $(OPT) -I$(OBJPASDIR) sysutils $(REDIR)
  150. $(DEL) sysutils.pp
  151. math$(PPUEXT) : $(OBJPASDIR)/math.pp $(SYSTEMPPU) objpas$(PPUEXT) \
  152. dos$(PPUEXT)
  153. $(COPY) $(OBJPASDIR)/math.pp .
  154. $(PP) $(OPT) -I$(OBJPASDIR) math $(REDIR)
  155. $(DEL) math.pp
  156. #
  157. # System Dependent Units
  158. #
  159. dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) $(SYSTEMPPU)
  160. $(PP) $(OPT) -Sg dpmiexcp.pp $(REDIR)
  161. profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT) $(SYSTEMPPU)
  162. $(PP) $(OPT) profile.pp $(REDIR)
  163. dxeload$(PPUEXT) : $(SYSTEMPPU)
  164. $(PP) $(OPT) dxeload.pp $(REDIR)
  165. emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
  166. dpmiexcp$(PPUEXT) $(SYSTEMPPU)
  167. $(PP) $(OPT) emu387.pp $(REDIR)
  168. #
  169. # TP7 Compatible RTL Units
  170. #
  171. dos$(PPUEXT) : ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  172. go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
  173. $(COPY) ../dos.pp .
  174. $(PP) $(OPT) dos $(REDIR)
  175. $(DEL) dos.pp
  176. crt$(PPUEXT) : ../crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
  177. $(COPY) ../crt.pp .
  178. $(PP) $(OPT) crt $(REDIR)
  179. $(DEL) crt.pp
  180. objects$(PPUEXT) : $(INC)/objects.pp $(INC)/platform.inc objinc.inc $(SYSTEMPPU)
  181. $(COPY) $(INC)/objects.pp .
  182. $(PP) $(OPT) objects.pp $(REDIR)
  183. $(DEL) objects.pp
  184. printer$(PPUEXT) : ../printer.pp $(SYSTEMPPU)
  185. $(COPY) ../printer.pp .
  186. $(PP) $(OPT) printer.pp $(REDIR)
  187. $(DEL) printer.pp
  188. #
  189. # Other RTL Units
  190. #
  191. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  192. $(COPY) $(PROCINC)/cpu.pp .
  193. $(PP) $(OPT) cpu.pp $(REDIR)
  194. $(DEL) cpu.pp
  195. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  196. $(COPY) $(PROCINC)/mmx.pp .
  197. $(PP) $(OPT) mmx.pp $(REDIR)
  198. $(DEL) mmx.pp
  199. mouse$(PPUEXT) : ../mouse.pp $(SYSTEMPPU)
  200. $(COPY) ../mouse.pp .
  201. $(PP) $(OPT) mouse.pp $(REDIR)
  202. $(DEL) mouse.pp
  203. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  204. $(COPY) $(INC)/getopts.pp .
  205. $(PP) $(OPT) getopts.pp $(REDIR)
  206. $(DEL) getopts.pp
  207. PPIFILES:=$(wildcard $(PPI)/*.ppi)
  208. graph$(PPUEXT) : ../graph.pp go32$(PPUEXT) $(SYSTEMPPU) mmx$(PPUEXT) $(PPIFILES)
  209. $(COPY) ../graph.pp .
  210. $(PP) $(OPT) -I$(PPI) graph $(REDIR)
  211. $(DEL) graph.pp
  212. #####################################################################
  213. # Libs
  214. #####################################################################
  215. staticlib:
  216. make clean
  217. make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static
  218. sharedlib:
  219. @echo Shared Libraries not supported for Go32v2
  220. staticlibinstall: staticlib
  221. $(MKDIR) $(STATIC_LIBINSTALLDIR)
  222. $(MKDIR) $(STATIC_UNITINSTALLDIR)
  223. $(INSTALLEXE) fpc$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
  224. $(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)
  225. sharedlibinstall: sharedlib
  226. libinstall: staticlibinstall
  227. libsclean : clean
  228. -$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  229. #####################################################################
  230. # Default targets
  231. #####################################################################
  232. include $(CFG)/makefile.def
  233. #
  234. # $Log$
  235. # Revision 1.14 1998-08-20 08:08:37 pierre
  236. # * dpmiexcp did not compile with older versions
  237. # due to the proc to procvar bug
  238. # * makefile separator problem fixed
  239. #
  240. # Revision 1.13 1998/08/19 10:05:01 peter
  241. # * fixed for go32v2 staticlib
  242. #
  243. # Revision 1.12 1998/08/05 10:31:05 pierre
  244. # + added BUGFIX test to be able to compile bugfix branch
  245. #
  246. # Revision 1.11 1998/07/29 15:44:37 michael
  247. # included sysutils and math.pp as target. They compile now.
  248. #
  249. # Revision 1.10 1998/07/22 21:37:03 michael
  250. # make cycle now works
  251. #
  252. # Revision 1.9 1998/05/22 00:39:36 peter
  253. # * go32v1, go32v2 recompiles with the new objects
  254. # * remake3 works again with go32v2
  255. # - removed some "optimizes" from daniel which were wrong
  256. #
  257. # Revision 1.8 1998/05/06 11:53:40 peter
  258. # * update
  259. #
  260. #