Makefile 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. #
  2. # $Id$
  3. # This file is part of the Free Pascal run time library.
  4. # Copyright (c) 1999-2000 by Michael van Canneyt
  5. #
  6. # Makefile for the Free Pascal PalmOS 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=dos
  25. endif
  26. # What is the target operating system ?
  27. ifndef OS_TARGET
  28. override OS_TARGET=palmos
  29. endif
  30. # What compiler to use ?
  31. ifndef PP
  32. PP=ppc68k
  33. endif
  34. # What options to pass to the compiler ?
  35. # You may want to specify a config file or error definitions file here.
  36. ifndef OPT
  37. OPT=
  38. endif
  39. # Use smartlinking ?
  40. ifndef SMARTLINK
  41. SMARTLINK=NO
  42. endif
  43. # Name of library ?
  44. # If this is set, all units will be put in the same library.
  45. # If it is empty (default), the units will be left in separate files.
  46. ifndef LIBNAME
  47. LIBNAME=
  48. #LIBNAME=fpc
  49. endif
  50. # Should the library be shared or static (only if LIBNAME is set).
  51. # Set this to 'shared' or 'static' to create a librrary
  52. # Setting this to shared will disable smart linking.
  53. ifndef LIBTYPE
  54. LIBTYPE=
  55. #LIBTYPE=static
  56. endif
  57. # Where is the PPUMOVE program ?
  58. ifndef PPUMOVE
  59. PPUMOVE=ppumove
  60. endif
  61. #####################################################################
  62. # End of configurable section.
  63. # Do not edit after this line.
  64. #####################################################################
  65. override OS_TARGET=palmos
  66. override CPU=m68k
  67. #####################################################################
  68. # System independent
  69. #####################################################################
  70. # Where are the include files
  71. RTL=..
  72. CFG=$(RTL)/cfg
  73. INC=$(RTL)/inc
  74. PROCINC=$(RTL)/$(CPU)
  75. OBJPASDIR=$(RTL)/objpas
  76. # Get some defaults for Programs and OSes.
  77. # This will set the following variables :
  78. # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  79. # It will also set OPT for cross-compilation, and add required options.
  80. # also checks for config file.
  81. # it expects INC PROCINC to be set !!
  82. include $(CFG)/makefile.cfg
  83. # Get the system independent include file names.
  84. # This will set the following variables :
  85. # SYSINCNAMES
  86. include $(INC)/makefile.inc
  87. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  88. # Get the processor dependent include file names.
  89. # This will set the following variables :
  90. # CPUINCNAMES
  91. include $(PROCINC)/makefile.cpu
  92. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  93. # Put system unit dependencies together.
  94. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  95. #####################################################################
  96. # System dependent
  97. #####################################################################
  98. # Check if we need C library.
  99. ifeq ($(LINK_TO_C),YES)
  100. override OPT:=$(OPT) -dCRTLIB
  101. endif
  102. # Define PalmOS units
  103. SYSTEMPPU = syspalm.ppu
  104. OBJECTS=syspalm
  105. PRT=prt0
  106. LOADERAS=$(PRT).as
  107. # Define Loaders
  108. LOADERS=
  109. # Add Prefix and Suffixes
  110. OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
  111. PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
  112. .PHONY : all install clean \
  113. libs libsclean \
  114. diffs diffclean \
  115. all : $(OBJLOADERS) $(PPUOBJECTS)
  116. install : all
  117. $(MKDIR) $(UNITINSTALLDIR)
  118. $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
  119. clean :
  120. -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
  121. #####################################################################
  122. # Files
  123. #####################################################################
  124. #
  125. # Loaders
  126. #
  127. #prt0$(OEXT) : $(LOADERAS)
  128. # -as $(LOADERAS) -o prt0$(OEXT)
  129. #gprt0$(OEXT) : $(GLOADERAS)
  130. # -as $(GLOADERAS) -o gprt0$(OEXT)
  131. #
  132. # Base Units (System, strings, os-dependent-base-unit)
  133. #
  134. $(SYSTEMPPU) : syspalm.pp $(SYSLINUXDEPS) $(SYSDEPS)
  135. $(COMPILER) -Us -Sg syspalm.pp $(REDIR)
  136. # strings$(PPUEXT) : ../template/strings.pp $(SYSTEMPPU)
  137. # $(COPY) ../template/strings.pp .
  138. # $(PP) $(OPT) strings $(REDIR)
  139. # $(DEL) strings.pp
  140. #
  141. # Delphi Object Model
  142. #
  143. # objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
  144. # $(COPY) $(OBJPASDIR)/objpas.pp .
  145. # $(PP) $(OPT) objpas $(REDIR)
  146. # $(DEL) objpas.pp
  147. #
  148. # System Dependent Units
  149. #
  150. #
  151. # TP7 Compatible RTL Units
  152. #
  153. #dos$(PPUEXT) : $(DOSDEPS) $(SYSTEMPPU)
  154. # $(PP) $(OPT) dos $(REDIR)
  155. #crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(INC)/filerec.inc $(SYSTEMPPU)
  156. # $(PP) $(OPT) crt $(REDIR)
  157. #objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  158. # $(COPY) $(INC)/objects.pp .
  159. # $(PP) $(OPT) objects $(REDIR)
  160. # $(DEL) objects.pp
  161. #
  162. # Other RTL Units
  163. #
  164. #####################################################################
  165. # Libs
  166. #####################################################################
  167. staticlib:
  168. make clean
  169. make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static
  170. sharedlib:
  171. make clean
  172. make all
  173. $(PPUMOVE) -o fpc $(SHAREDLIBFILES)
  174. staticlibinstall: staticlib
  175. $(MKDIR) $(STATIC_LIBINSTALLDIR)
  176. $(MKDIR) $(STATIC_UNITINSTALLDIR)
  177. $(INSTALLEXE) libfpc$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
  178. $(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)
  179. sharedlibinstall: sharedlib
  180. $(MKDIR) $(SHARED_LIBINSTALLDIR)
  181. $(MKDIR) $(SHARED_UNITINSTALLDIR)
  182. $(INSTALLEXE) libfpc$(SHAREDLIBEXT) $(SHARED_LIBINSTALLDIR)
  183. $(INSTALL) *$(PPUEXT) *$(OEXT) $(SHARED_UNITINSTALLDIR)
  184. ldconfig
  185. libinstall: staticlibinstall sharedlibinstall
  186. libsclean : clean
  187. -$(DEL) *$(SMARTLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  188. #####################################################################
  189. # Default targets
  190. #####################################################################
  191. include $(CFG)/makefile.def
  192. #
  193. # $Log$
  194. # Revision 1.1 2000-07-13 06:31:10 michael
  195. # + Initial import
  196. #
  197. # Revision 1.5 2000/01/07 16:41:50 daniel
  198. # * copyright 2000
  199. #
  200. # Revision 1.4 2000/01/07 16:32:34 daniel
  201. # * copyright 2000 added
  202. #
  203. # Revision 1.3 1998/10/14 10:31:28 florian
  204. # * adapted to work
  205. #
  206. # Revision 1.2 1998/10/02 09:26:03 peter
  207. # * fixed rtl path
  208. #
  209. # Revision 1.1 1998/09/10 14:15:51 peter
  210. # - renamed makefile to Makefile
  211. #
  212. #