makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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 OS/2 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=os2
  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. ifndef PP
  37. PP=ppc386
  38. endif
  39. # What options to pass to the compiler ?
  40. # You may want to specify a config file or error definitions file here.
  41. ifndef OPT
  42. OPT=
  43. endif
  44. # Where is the PPUMOVE program ?
  45. ifndef PPUMOVE
  46. PPUMOVE=ppumove
  47. endif
  48. # Set this to 'shared' or 'static'
  49. LIBTYPE=shared
  50. # AOUT should be defined in main makefile.
  51. # But you can set it here too.
  52. # AOUT = -DAOUT
  53. # Do you want to link to the C library ?
  54. # Standard it is NO. You can set it to YES to link in th C library.
  55. ifndef LINK_TO_C
  56. LINK_TO_C=NO
  57. endif
  58. #####################################################################
  59. # End of configurable section.
  60. # Do not edit after this line.
  61. #####################################################################
  62. #####################################################################
  63. # System independent
  64. #####################################################################
  65. # Where are the include files ?
  66. INC=../inc
  67. PROCINC=../$(CPU)
  68. CFG=../cfg
  69. OBJPASDIR=../objpas
  70. # Get some defaults for Programs and OSes.
  71. # This will set the following variables :
  72. # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  73. # It will also set OPT for cross-compilation, and add required options.
  74. # also checks for config file.
  75. # it expects INC PROCINC to be set !!
  76. include $(CFG)/makefile.cfg
  77. # Get the system independent include file names.
  78. # This will set the following variables :
  79. # SYSINCNAMES
  80. include $(INC)/makefile.inc
  81. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  82. # Get the processor dependent include file names.
  83. # This will set the following variables :
  84. # CPUINCNAMES
  85. include $(PROCINC)/makefile.cpu
  86. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  87. # Put system unit dependencies together.
  88. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  89. #####################################################################
  90. # System dependent
  91. #####################################################################
  92. PPUEXT=.ppo
  93. ASMEXT=.so2
  94. OEXT=.o2
  95. # Define Linux Units
  96. SYSTEMPPU=sysos2$(PPUEXT)
  97. OBJECTS=strings objpas \
  98. dos crt
  99. LOADERS=prt0 prt1
  100. #####################################################################
  101. # System independent Makefile
  102. #####################################################################
  103. # Add Prefix and Suffixes
  104. OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
  105. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  106. .PHONY : all install clean \
  107. libs libsclean \
  108. diffs diffclean \
  109. all : $(OBJLOADERS) $(PPUOBJECTS)
  110. install : all
  111. $(MKDIR) $(UNITINSTALLDIR)
  112. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  113. clean :
  114. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) log
  115. #####################################################################
  116. # Files
  117. #####################################################################
  118. #
  119. # Loaders
  120. #
  121. prt0$(OEXT) : prt0.as
  122. as -D -o prt0$(OEXT) prt0.as
  123. prt1$(OEXT) : prt1.as
  124. as -D -o prt1$(OEXT) prt1.as
  125. #
  126. # Base Units (System, strings, os-dependent-base-unit)
  127. #
  128. $(SYSTEMPPU) : sysos2.pas $(SYSDEPS)
  129. $(PP) $(OPT) -Us -Sg sysos2.pas $(REDIR)
  130. strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
  131. $(COPY) $(PROCINC)/strings.pp .
  132. $(PP) $(OPT) strings $(REDIR)
  133. $(DEL) strings.pp
  134. #
  135. # Delphi Object Model
  136. #
  137. objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
  138. $(COPY) $(OBJPASDIR)/objpas.pp .
  139. $(PP) $(OPT) objpas $(REDIR)
  140. $(DEL) objpas.pp
  141. #
  142. # System Dependent Units
  143. #
  144. #
  145. # TP7 Compatible RTL Units
  146. #
  147. dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMPPU)
  148. $(PP) $(OPT) dos.pas $(REDIR)
  149. crt$(PPUEXT) : crt.pas dos$(PPUEXT)
  150. $(PP) $(OPT) crt.pas $(REDIR)
  151. #objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  152. # $(COPY) $(INC)/objects.pp .
  153. # $(PP) $(OPT) objects $(REDIR)
  154. # $(DEL) objects.pp
  155. #
  156. # Other RTL Units
  157. #
  158. #####################################################################
  159. # Libs
  160. #####################################################################
  161. libs : all libfpc$(LIBEXT)
  162. libfpc.so:
  163. $(PPUMOVE) -o fpc *.ppu
  164. libfpc.a:
  165. $(PPUMOVE) -s -o fpc *.ppu
  166. libinstall : libs
  167. $(INSTALLEXE) libfpc$(LIBEXT) $(LIBINSTALLDIR)
  168. $(INSTALL) *$(PPLEXT) $(UNITINSTALLDIR)
  169. ldconfig
  170. libsclean : clean
  171. -$(DEL) *.a *.so *$(PPLEXT)
  172. #####################################################################
  173. # Default targets
  174. #####################################################################
  175. include $(CFG)/makefile.def