makefile 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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 error definitions file.
  109. ifdef ERRORFILE
  110. OPT:= $(OPT) -Fr$(ERRORFILE)
  111. endif
  112. # Check operating system.
  113. ifeq ($(OS_SRC),linux)
  114. DOS=NO
  115. else
  116. DOS=YES
  117. # also redirect the standard error to the redir file
  118. ifeq (YES,$(REDIR))
  119. PP:=redir -eo $(PP)
  120. # set the verbosity to max
  121. OPT:=$(OPT) -va
  122. endif
  123. endif
  124. # Check logfile.
  125. ifeq (YES,$(REDIR))
  126. ifdef REDIRFILE
  127. override REDIR:= >> $(REDIRFILE)
  128. else
  129. override REDIR:= >> log
  130. endif
  131. else
  132. override REDIR:= >> con
  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 rtl_win32 \
  160. install_go32v1 install_go32v2 install_linux install_os2 install_win32 \
  161. go32v1libs go32v2libs linuxlibs os2libs win32libs \
  162. clean install native diffs diffclean \
  163. libs libinstall \
  164. utils utils_install
  165. native: rtl$(OS_SRC)
  166. nativelibs : $(OS_SRC)libs
  167. all: rtlgo32v1 rtlgo32v2 rtllinux rtlos2 rtlwin32
  168. libs: go32v1libs go32v2libs linuxlibs os2libs win32libs
  169. diffs: diffs_rtl diffs_inc diffs_i386 diffs_m68k diffs_dos diffs_cfg \
  170. diffs_os2 diffs_go32v1 diffs_go32v2 diffs_linux diffs_win32 \
  171. diffs_template
  172. rtlgo32v1:
  173. $(MAKE) -C dos/go32v1 CFGFILE=../../cfg/ppgo32v1.cfg OS_TARGET=go32v1
  174. rtlgo32v2:
  175. $(MAKE) -C dos/go32v2 CFGFILE=../../cfg/ppgo32v2.cfg OS_TARGET=go32v2
  176. rtllinux:
  177. $(MAKE) -C linux CFGFILE=../cfg/pplinux.cfg OS_TARGET=linux
  178. rtlos2:
  179. $(MAKE) -C os2 CFGFILE=../cfg/ppos2.cfg OS_TARGET=os2
  180. rtlwin32:
  181. $(MAKE) -C win32 CFGFILE=../cfg/ppwin32.cfg OS_TARGET=win32
  182. go32v1libs:
  183. $(MAKE) -C dos/go32v1 CFGFILE=../../cfg/ppdos.cfg OS_TARGET=go32v1 libs
  184. go32v2libs:
  185. $(MAKE) -C dos/go32v2 CFGFILE=../../cfg/ppgo32v2.cfg OS_TARGET=go32v2 libs
  186. linuxlibs:
  187. $(MAKE) -C linux CFGFILE=../cfg/pplinux.cfg OS_TARGET=linux libs
  188. os2libs:
  189. $(MAKE) -C os2 CFGFILE=../cfg/ppos2.cfg OS_TARGET=os2 libs
  190. win32libs:
  191. $(MAKE) -C win32 CFGFILE=../cfg/ppwin32.cfg OS_TARGET=win32 libs
  192. clean:
  193. $(MAKE) -C template clean
  194. $(MAKE) -C dos clean
  195. $(MAKE) -C dos/go32v1 clean
  196. $(MAKE) -C dos/go32v2 clean
  197. $(MAKE) -C linux clean
  198. $(MAKE) -C win32 clean
  199. $(MAKE) -C os2 clean
  200. $(MAKE) -C utils clean
  201. -$(DEL) *.dif
  202. diffclean:
  203. $(MAKE) -C template diffclean
  204. $(MAKE) -C dos diffclean
  205. $(MAKE) -C dos/go32v1 diffclean
  206. $(MAKE) -C dos/go32v2 diffclean
  207. $(MAKE) -C linux diffclean
  208. $(MAKE) -C os2 diffclean
  209. $(MAKE) -C win32 diffclean
  210. -$(DEL) *.dif
  211. install: install_linux install_go32v1 install_go32v2 install_os2 install_win32
  212. libinstall: libinstall_linux libinstall_go32v1 libinstall_go32v2 \
  213. libinstall_os2 libinstall_win32
  214. native_install: install_$(OS_SRC)
  215. native_libinstall: libinstall_$(OS_SRC)
  216. makefile.dif : makefile
  217. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/makefile > makefile.dif
  218. diffs_rtl: makefile.dif
  219. diffs_dos:
  220. $(MAKE) -C dos diffs
  221. diffs_inc:
  222. $(MAKE) -C inc diffs
  223. diffs_i386:
  224. $(MAKE) -C i386 diffs
  225. diffs_m68k:
  226. $(MAKE) -C m68k diffs
  227. diffs_cfg:
  228. $(MAKE) -C cfg diffs
  229. diffs_template:
  230. $(MAKE) -C template diffs
  231. diffs_go32v1:
  232. $(MAKE) -C dos/go32v1 diffs
  233. diffs_go32v2:
  234. $(MAKE) -C dos/go32v2 diffs
  235. diffs_linux:
  236. $(MAKE) -C linux diffs
  237. diffs_os2:
  238. $(MAKE) -C os2 diffs
  239. diffs_win32:
  240. $(MAKE) -C win32 diffs
  241. install_go32v1:
  242. $(MAKE) -C dos/go32v1 install
  243. install_go32v2:
  244. $(MAKE) -C dos/go32v2 install
  245. install_linux:
  246. $(MAKE) -C linux install
  247. install_os2:
  248. $(MAKE) -C os2 install
  249. install_win32:
  250. $(MAKE) -C win32 install
  251. libinstall_go32v1:
  252. $(MAKE) -C dos/go32v1 libinstall
  253. libinstall_go32v2:
  254. $(MAKE) -C dos/go32v2 libinstall
  255. libinstall_linux:
  256. $(MAKE) -C linux libinstall
  257. libinstall_os2:
  258. $(MAKE) -C os2 libinstall
  259. libinstall_win32:
  260. $(MAKE) -C win32 libinstall
  261. utils:
  262. $(MAKE) -C utils all
  263. utils_install:
  264. $(MAKE) -C utils install
  265. # $Log$
  266. # Revision 1.10 1998-09-04 17:32:36 pierre
  267. # * REDIR handling corrected
  268. #