makefile 6.8 KB

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