makefile 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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 Linux Units
  83. SYSTEMPPU=system$(PPUEXT)
  84. OBJECTS=strings go32 objpas \
  85. dpmiexcp profile dxeload emu387 \
  86. dos crt objects printer \
  87. cpu mmx mouse getopts graph \
  88. LOADERS=prt0 exceptn fpu
  89. #####################################################################
  90. # System independent Makefile
  91. #####################################################################
  92. # Add Prefix and Suffixes
  93. OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
  94. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  95. .PHONY : all install clean \
  96. libs libsclean \
  97. diffs diffclean \
  98. all : $(OBJLOADERS) $(PPUOBJECTS)
  99. install : all
  100. $(MKDIR) $(BASEINSTALLDIR)
  101. $(MKDIR) $(UNITINSTALLDIR)
  102. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  103. clean :
  104. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
  105. #####################################################################
  106. # Files
  107. #####################################################################
  108. #
  109. # Loaders
  110. #
  111. prt0$(OEXT) : v2prt0.as
  112. as -o prt0$(OEXT) v2prt0.as
  113. exceptn$(OEXT) : exceptn.as
  114. as -o exceptn$(OEXT) exceptn.as
  115. fpu$(OEXT) : fpu.as
  116. as -o fpu$(OEXT) fpu.as
  117. #
  118. # Base Units (System, strings, os-dependent-base-unit)
  119. #
  120. $(SYSTEMPPU) : system.pp $(SYSDEPS)
  121. $(PP) $(OPT) -Us -Sg system.pp $(REDIR)
  122. strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
  123. $(COPY) $(PROCINC)/strings.pp .
  124. $(PP) $(OPT) strings.pp $(REDIR)
  125. $(DEL) strings.pp
  126. go32$(PPUEXT) : ../go32.pp $(SYSTEMPPU)
  127. $(COPY) ../go32.pp .
  128. $(PP) $(OPT) go32.pp $(REDIR)
  129. $(DEL) go32.pp
  130. #
  131. # Delphi Object Model
  132. #
  133. objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
  134. $(COPY) $(OBJPASDIR)/objpas.pp .
  135. -$(PP) $(OPT) objpas.pp $(REDIR)
  136. $(DEL) objpas.pp
  137. #
  138. # System Dependent Units
  139. #
  140. dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) $(SYSTEMPPU)
  141. $(PP) $(OPT) -Sg dpmiexcp.pp $(REDIR)
  142. profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT) $(SYSTEMPPU)
  143. $(PP) $(OPT) profile.pp $(REDIR)
  144. dxeload$(PPUEXT) : $(SYSTEMPPU)
  145. $(PP) $(OPT) dxeload.pp $(REDIR)
  146. emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
  147. dpmiexcp$(PPUEXT) $(SYSTEMPPU)
  148. $(PP) $(OPT) emu387.pp $(REDIR)
  149. #
  150. # TP7 Compatible RTL Units
  151. #
  152. dos$(PPUEXT) : ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  153. go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
  154. $(COPY) ../dos.pp .
  155. $(PP) $(OPT) dos $(REDIR)
  156. $(DEL) dos.pp
  157. crt$(PPUEXT) : ../crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
  158. $(COPY) ../crt.pp .
  159. $(PP) $(OPT) crt $(REDIR)
  160. $(DEL) crt.pp
  161. objects$(PPUEXT) : $(INC)/objects.pp $(INC)/platform.inc objinc.inc $(SYSTEMPPU)
  162. $(COPY) $(INC)/objects.pp .
  163. $(PP) $(OPT) objects.pp $(REDIR)
  164. $(DEL) objects.pp
  165. printer$(PPUEXT) : ../printer.pp $(SYSTEMPPU)
  166. $(COPY) ../printer.pp .
  167. $(PP) $(OPT) printer.pp $(REDIR)
  168. $(DEL) printer.pp
  169. #
  170. # Other RTL Units
  171. #
  172. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  173. $(COPY) $(PROCINC)/cpu.pp .
  174. $(PP) $(OPT) cpu.pp $(REDIR)
  175. $(DEL) cpu.pp
  176. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  177. $(COPY) $(PROCINC)/mmx.pp .
  178. $(PP) $(OPT) mmx.pp $(REDIR)
  179. $(DEL) mmx.pp
  180. mouse$(PPUEXT) : ../mouse.pp $(SYSTEMPPU)
  181. $(COPY) ../mouse.pp .
  182. $(PP) $(OPT) mouse.pp $(REDIR)
  183. $(DEL) mouse.pp
  184. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  185. $(COPY) $(INC)/getopts.pp .
  186. $(PP) $(OPT) getopts.pp $(REDIR)
  187. $(DEL) getopts.pp
  188. PPIFILES:=$(wildcard $(PPI)/*.ppi)
  189. graph$(PPUEXT) : ../graph.pp go32$(PPUEXT) $(SYSTEMPPU) mmx$(PPUEXT) $(PPIFILES)
  190. $(COPY) ../graph.pp .
  191. $(PP) $(OPT) -I$(PPI) graph $(REDIR)
  192. $(DEL) graph.pp
  193. #####################################################################
  194. # Libs
  195. #####################################################################
  196. libs: all libfpc$(LIBEXT)
  197. libfpc.a:
  198. $(PPUMOVE) -s -o fpc *.ppu
  199. libsclean : clean
  200. -$(DEL) *.$(LIBEXT) *$(PPLEXT)
  201. libinstall: libs
  202. $(INSTALL) libfpc$(LIBEXT) $(LIBINSTALLDIR)
  203. $(INSTALL) *$(PPLEXT) $(UNITINSTALLDIR)
  204. #####################################################################
  205. # Default targets
  206. #####################################################################
  207. include $(CFG)/makefile.def
  208. #
  209. # $Log$
  210. # Revision 1.9 1998-05-22 00:39:36 peter
  211. # * go32v1, go32v2 recompiles with the new objects
  212. # * remake3 works again with go32v2
  213. # - removed some "optimizes" from daniel which were wrong
  214. #
  215. # Revision 1.8 1998/05/06 11:53:40 peter
  216. # * update
  217. #
  218. #