makefile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. # 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. # set the directory where to install the units.
  23. ifndef UNITINSTALLDIR
  24. UNITINSTALLDIR=c:\lib\ppc\win32
  25. endif
  26. # set the directory where to install libraries
  27. ifndef LIBINSTALLDIR
  28. LIBINSTALLDIR=c:\lib
  29. endif
  30. # What is the Operating System
  31. ifndef OS_SRC
  32. OS_SRC=GO32V2
  33. endif
  34. # What is the target operating system ?
  35. ifndef OS_TARGET
  36. OS_TARGET=WIN32
  37. endif
  38. # What is the target processor :
  39. ifndef CPU
  40. CPU=i386
  41. #CPU=m68k
  42. endif
  43. # What compiler to use ?
  44. # I think ppc386 is better (it's mostly in path) (FK)
  45. ifndef PP
  46. PP=ppc386
  47. endif
  48. # What options to pass to the compiler ?
  49. # You may want to specify a config file or error definitions file here.
  50. ifndef OPT
  51. OPT=
  52. endif
  53. # Where is the ppumove program ?
  54. ifndef PPUMOVE
  55. PPUMOVE=ppumove
  56. endif
  57. #####################################################################
  58. # End of configurable section.
  59. # Do not edit after this line.
  60. #####################################################################
  61. #####################################################################
  62. # System independent
  63. #####################################################################
  64. # Where are the include files ?
  65. INC=../inc
  66. PROCINC=../$(CPU)
  67. CFG=../cfg
  68. OBJPASDIR=../objpas
  69. # Get some defaults for Programs and OSes.
  70. # This will set the following variables :
  71. # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  72. # It will also set OPT for cross-compilation, and add required options.
  73. # also checks for config file.
  74. # it expects INC PROCINC to be set !!
  75. include $(CFG)/makefile.cfg
  76. # Get the system independent include file names.
  77. # This will set the following variables :
  78. # SYSINCNAMES
  79. include $(INC)/makefile.inc
  80. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  81. # Get the processor dependent include file names.
  82. # This will set the following variables :
  83. # CPUINCNAMES
  84. include $(PROCINC)/makefile.cpu
  85. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  86. # Put system unit dependencies together.
  87. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  88. #####################################################################
  89. # System dependent
  90. #####################################################################
  91. # Determine needed extensions
  92. PPUEXT=.ppw
  93. PPLEXT=.ppl
  94. OEXT=.obj
  95. ASMEXT=.s
  96. LIBEXT=.a
  97. # Define Windows Units
  98. SYSTEMPPU=syswin32$(PPUEXT)
  99. OBJECTS=strings objpas \
  100. base \
  101. dos \
  102. # crt objects printer \
  103. cpu mmx getopts \
  104. # No loaders needed
  105. LOADERS=
  106. # Add Prefix and Suffixes
  107. OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
  108. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  109. .PHONY : all install clean \
  110. libs libsclean \
  111. diffs diffclean \
  112. all : $(OBJLOADERS) $(PPUOBJECTS)
  113. install : all
  114. $(MKDIR) $(UNITINSTALLDIR)
  115. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  116. clean :
  117. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
  118. #####################################################################
  119. # Files
  120. #####################################################################
  121. #
  122. # Loaders
  123. #
  124. #
  125. # Base Units (System, strings, os-dependent-base-unit)
  126. #
  127. $(SYSTEMPPU) : syswin32.pp $(SYSDEPS) win32.inc
  128. $(PP) $(OPT) -Us -Sg syswin32.pp $(REDIR)
  129. strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
  130. $(COPY) $(PROCINC)/strings.pp .
  131. $(PP) $(OPT) strings.pp $(REDIR)
  132. $(DEL) strings.pp
  133. #
  134. # Delphi Object Model
  135. #
  136. objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
  137. $(COPY) $(OBJPASDIR)/objpas.pp .
  138. $(PP) $(OPT) objpas $(REDIR)
  139. $(DEL) objpas.pp
  140. #
  141. # System Dependent Units
  142. #
  143. base$(PPUEXT) : base.pp $(SYSTEMPPU)
  144. $(PP) $(OPT) base.pp $(REDIR)
  145. #
  146. # TP7 Compatible RTL Units
  147. #
  148. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  149. strings$(PPUEXT) $(SYSTEMPPU) win32.inc
  150. $(PP) $(OPT) dos $(REDIR)
  151. #crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
  152. # $(PP) $(OPT) crt $(REDIR)
  153. #objects$(PPUEXT) : objects.pp $(SYSTEMPPU)
  154. # $(PP) $(OPT) objects.pp $(REDIR)
  155. #printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
  156. # $(PP) $(OPT) printer.pp $(REDIR)
  157. #
  158. # Other RTL Units
  159. #
  160. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  161. $(COPY) $(PROCINC)/cpu.pp .
  162. $(PP) $(OPT) cpu.pp $(REDIR)
  163. $(DEL) cpu.pp
  164. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  165. $(COPY) $(PROCINC)/mmx.pp .
  166. $(PP) $(OPT) mmx.pp $(REDIR)
  167. $(DEL) mmx.pp
  168. getopts$(PPUEXT) : $(PROCINC)/getopts.pp $(SYSTEMPPU)
  169. $(COPY) $(PROCINC)/getopts.pp .
  170. $(PP) $(OPT) getopts.pp $(REDIR)
  171. $(DEL) getopts.pp
  172. #####################################################################
  173. # Libs
  174. #####################################################################
  175. libs: all
  176. libsclean : clean
  177. -$(DEL) *.$(LIBEXT) *$(PPLEXT)
  178. #####################################################################
  179. # Diffs
  180. #####################################################################
  181. %.dif : %.pp
  182. -$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v1/$*.pp > $*.dif
  183. %.dif : %.inc
  184. -$(DIFF) $(DIFFOPTS) $*.inc $(REFPATH)/dos/go32v1/$*.inc > $*.dif
  185. %.dif : %.as
  186. -$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v1/$*.as > $*.dif
  187. diffclean:
  188. -$(DEL) *.dif
  189. makefile.dif : makefile
  190. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v1/makefile > makefile.dif
  191. diffs: syswin32.dif os.dif makefile.dif dos.dif base.dif struct.dif \
  192. winheap.dif messages.dif
  193. #####################################################################
  194. # Distribution
  195. #####################################################################
  196. distclean : clean libsclean diffclean