makefile 7.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 Win32 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. #####################################################################
  17. # Start of configurable section
  18. #####################################################################
  19. # What compiler do you want to use :
  20. ifndef PP
  21. PP=ppc386
  22. endif
  23. # Where do you want to install the units ?
  24. # For each of the systems, a subdirectory OSunits of
  25. # this directry will be created, and the system dependent
  26. # files will be set there.
  27. # For linux:
  28. UNITINSTALLDIR=/usr/lib/fpc/0.99.6
  29. # For dos/os2 :
  30. # UNITINSTALLDIR=\pp\units
  31. # Where do you want to install the (shared or static) run-time libraries ?
  32. # For linux:
  33. LIBINSTALLDIR=/usr/lib
  34. # For dos/os2 :
  35. #LIBINSTALLDIR=\pp\units
  36. # Where do you want the utilities installed ?
  37. # for linux
  38. BININSTALLDIR=/usr/bin
  39. # for DOS, OS/2
  40. # BININSTALLDIR=\pp\bin
  41. #####################################################################
  42. # Try to determine Operating System
  43. #####################################################################
  44. BASEDIR=$(shell pwd)
  45. # in linux no : in pathes
  46. ifeq ($(findstring :,$(BASEDIR)),)
  47. inlinux=1
  48. endif
  49. # in case pwd is not present on the DOS-OS
  50. ifeq ($(strip $(BASEDIR)),'')
  51. inlinux=
  52. BASEDIR:=.
  53. endif
  54. # set here the type of the ppc386 you use:
  55. # Choose from: go32v1 go32v2 linux or os2
  56. # can determine if on linux otherwise assume go32v2
  57. ifdef inlinux
  58. OS_SRC=linux
  59. else
  60. OS_SRC=go32v2
  61. endif
  62. # Set redir to YES if you want a log file to be kept.
  63. ifndef REDIR
  64. REDIR=YES
  65. endif
  66. # Set NODEBUG to YES if you DON'T want debugging
  67. NODEBUG=YES
  68. # set target processor type
  69. CPU=i386
  70. # CPU=m68k
  71. # Set REFPATH if you want to generate diffs to a standard RTL
  72. # this can not be a relative path.
  73. REFPATH=/usr/local/fpk/work/0.9.7/rtl
  74. # Where is the diff program ? (No relative paths)
  75. DIFF=diff
  76. # What options do you want to pass to diff ?
  77. DIFFOPTS=-b -c
  78. # Where is the ppumove program ? (set only if you want to make libs)
  79. # Don't specify a relative path.
  80. PPUMOVE=ppumove
  81. #
  82. # Optional configuration settings.
  83. #
  84. # Set any options you wish to give to the compiler
  85. OPT=
  86. # Optional : Specify the place of the log file.
  87. # default is 'log' in the source directory
  88. # REDIRFILE=
  89. # Optional: Error definitions file you want the compiler to use.
  90. # !! If you specify a path, specify an absolute path. !!
  91. # ERRORFILE=
  92. # Optional: The program to create directories.
  93. # Under DOS this is by default 'mkdir'. Under Linux this is 'install -m 755 -d'
  94. # MKDIR=
  95. # Optional: The program to install the files into the destination directory.
  96. # Under DOS this is by default 'copy', under Linux this is 'install -m 644'
  97. # copy will not work with /
  98. # use cp from djgpp instead
  99. # INSTALL=
  100. #######################################################################
  101. # End of configurable section.
  102. # Do not edit after this line.
  103. #######################################################################
  104. # Check debugging.
  105. ifneq (YES,$(NODEBUG))
  106. OPT:=$(OPT) -g
  107. endif
  108. # Check logfile.
  109. ifeq (YES,$(REDIR))
  110. ifdef REDIRFILE
  111. override REDIR:= >> $(REDIRFILE)
  112. else
  113. override REDIR:= >> log
  114. endif
  115. else
  116. override REDIR:= >> con
  117. endif
  118. # Check error definitions file.
  119. ifdef ERRORFILE
  120. OPT:= $(OPT) -Fr$(ERRORFILE)
  121. endif
  122. # Check operating system.
  123. ifeq ($(OS_SRC),linux)
  124. DOS=NO
  125. else
  126. DOS=YES
  127. # also redirect the standard error to the redir file
  128. ifeq (YES,$(REDIR))
  129. PP:=redir -eo $(PP)
  130. # set the verbosity to max
  131. OPT:=$(OPT) -va
  132. endif
  133. endif
  134. # Check copy delete commands.
  135. # You need cp from GNU to handle / as directory separator
  136. COPY=cp -p
  137. DEL=rm
  138. # To install programs
  139. ifndef INSTALL
  140. ifeq ($(DOS),YES)
  141. INSTALL=copy
  142. else
  143. INSTALL=install
  144. endif
  145. endif
  146. # To make a directory.
  147. ifndef MKDIR
  148. ifeq ($(DOS),YES)
  149. MKDIR=mkdir
  150. else
  151. MKDIR=install -m 755 -d
  152. endif
  153. endif
  154. # add target processor define to command line options
  155. OPT:=$(OPT) -d$(CPU)
  156. # Variables to export
  157. export OS_SRC DOS SEP PP OPT REDIR COPY DEL LIBINSTALLDIR INSTALL MKDIR \
  158. REFPATH CPU PPUMOVE UNITINSTALLDIR
  159. .PHONY: rtl_go32v1 rtl_go32v2 rtl_linux rtl_os2 clean install install_os2 install_linux \
  160. install_go3v2 install_go32v1 native diffs diffclean libs libinstall utils\
  161. utils_install
  162. native: rtl$(OS_SRC)
  163. nativelibs : $(OS_SRC)libs
  164. all: rtlgo32v1 rtlgo32v2 rtllinux rtlos2 rtlwin32
  165. libs: go32v1libs go32v2libs linuxlibs os2libs
  166. diffs: diffs_rtl diffs_inc diffs_i386 diffs_m68k diffs_dos diffs_cfg \
  167. diffs_os2 diffs_go32v1 diffs_go32v2 diffs_linux diffs_template
  168. rtlgo32v1:
  169. $(MAKE) -C dos/go32v1 CFGFILE=../../cfg/ppgo32v1.cfg OS_TARGET=go32v1
  170. rtlgo32v2:
  171. $(MAKE) -C dos/go32v2 CFGFILE=../../cfg/ppgo32v2.cfg OS_TARGET=go32v2
  172. rtllinux:
  173. $(MAKE) -C linux CFGFILE=../cfg/pplinux.cfg OS_TARGET=linux
  174. rtlos2:
  175. $(MAKE) -C os2 CFGFILE=../cfg/ppos2.cfg OS_TARGET=os2
  176. rtlwin32:
  177. $(MAKE) -C win32 CFGFILE=../cfg/ppw32.cfg OS_TARGET=win32
  178. go32v1libs:
  179. $(MAKE) -C dos/go32v1 CFGFILE=../../cfg/ppdos.cfg OS_TARGET=go32v1 libs
  180. go32v2libs:
  181. $(MAKE) -C dos/go32v2 CFGFILE=../../cfg/ppgo32v2.cfg OS_TARGET=go32v2 libs
  182. linuxlibs:
  183. $(MAKE) -C linux CFGFILE=../cfg/pplinux.cfg OS_TARGET=linux libs
  184. os2libs:
  185. $(MAKE) -C os2 CFGFILE=../cfg/ppos2.cfg OS_TARGET=os2 libs
  186. win32libs:
  187. $(MAKE) -C win32 CFGFILE=../cfg/ppw32.cfg OS_TARGET=win32 libs
  188. clean:
  189. $(MAKE) -C template clean
  190. $(MAKE) -C dos clean
  191. $(MAKE) -C dos/go32v1 clean
  192. $(MAKE) -C dos/go32v2 clean
  193. $(MAKE) -C linux clean
  194. $(MAKE) -C win32 clean
  195. $(MAKE) -C os2 clean
  196. -$(DEL) *.dif
  197. diffclean:
  198. $(MAKE) -C template diffclean
  199. $(MAKE) -C dos diffclean
  200. $(MAKE) -C dos/go32v1 diffclean
  201. $(MAKE) -C dos/go32v2 diffclean
  202. $(MAKE) -C linux diffclean
  203. $(MAKE) -C os2 diffclean
  204. $(MAKE) -C win32 diffclean
  205. -$(DEL) *.dif
  206. install: install_linux install_go32v1 install_go32v2 install_os2
  207. libinstall: libinstall_linux libinstall_go32v1 libinstall_go32v2 libinstall_os2
  208. native_install: install_$(OS_SRC)
  209. native_libinstall: libinstall_$(OS_SRC)
  210. makefile.dif : makefile
  211. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/makefile > makefile.dif
  212. diffs_rtl: makefile.dif
  213. diffs_dos:
  214. $(MAKE) -C dos diffs
  215. diffs_inc:
  216. $(MAKE) -C inc diffs
  217. diffs_i386:
  218. $(MAKE) -C i386 diffs
  219. diffs_m68k:
  220. $(MAKE) -C m68k diffs
  221. diffs_cfg:
  222. $(MAKE) -C cfg diffs
  223. diffs_template:
  224. $(MAKE) -C template diffs
  225. diffs_go32v1:
  226. $(MAKE) -C dos/go32v1 diffs
  227. diffs_go32v2:
  228. $(MAKE) -C dos/go32v2 diffs
  229. diffs_linux:
  230. $(MAKE) -C linux diffs
  231. diffs_os2:
  232. $(MAKE) -C os2 diffs
  233. diffs_win32:
  234. $(MAKE) -C win32 diffs
  235. install_go32v1:
  236. $(MAKE) -C dos/go32v1 install
  237. install_go32v2:
  238. $(MAKE) -C dos/go32v2 install
  239. install_linux:
  240. $(MAKE) -C linux install
  241. install_os2:
  242. $(MAKE) -C os2 install
  243. libinstall_go32v1:
  244. $(MAKE) -C dos/go32v1 libinstall
  245. libinstall_go32v2:
  246. $(MAKE) -C dos/go32v2 libinstall
  247. libinstall_linux:
  248. $(MAKE) -C linux libinstall
  249. libinstall_os2:
  250. $(MAKE) -C os2 libinstall
  251. utils:
  252. $(MAKE) -C utils all
  253. utils_install:
  254. $(MAKE) -C utils install