Makefile.fpc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. #
  2. # Makefile.fpc for Free Pascal Compiler
  3. #
  4. [package]
  5. name=compiler
  6. version=2.0.0
  7. [target]
  8. programs=pp
  9. dirs=utils
  10. [compiler]
  11. targetdir=.
  12. unittargetdir=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  13. unitdir=$(COMPILERSOURCEDIR)
  14. includedir=$(CPC_TARGET)
  15. [require]
  16. packages=rtl
  17. tools=diff cmp
  18. [install]
  19. fpcpackage=y
  20. [default]
  21. fpcdir=..
  22. [prerules]
  23. # Don't export version it can change after the first compile
  24. unexport FPC_VERSION FPC_COMPILERINFO
  25. # Which platforms are ready for inclusion in the cycle
  26. CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb
  27. # All supported targets used for clean
  28. ALLTARGETS=$(CYCLETARGETS)
  29. # Allow ALPHA, POWERPC, POWERPC64, M68K, I386 defines for target cpu
  30. ifdef ALPHA
  31. PPC_TARGET=alpha
  32. endif
  33. ifdef POWERPC
  34. PPC_TARGET=powerpc
  35. endif
  36. ifdef POWERPC64
  37. PPC_TARGET=powerpc64
  38. endif
  39. ifdef SPARC
  40. PPC_TARGET=sparc
  41. endif
  42. ifdef M68K
  43. PPC_TARGET=m68k
  44. endif
  45. ifdef I386
  46. PPC_TARGET=i386
  47. endif
  48. ifdef X86_64
  49. PPC_TARGET=x86_64
  50. endif
  51. ifdef ARM
  52. PPC_TARGET=arm
  53. endif
  54. ifdef ARMEB
  55. PPC_TARGET=armeb
  56. endif
  57. # Default is to generate a compiler for the same
  58. # platform as CPU_TARGET (a native compiler)
  59. ifndef PPC_TARGET
  60. PPC_TARGET=$(CPU_TARGET)
  61. endif
  62. ifeq ($(PPC_TARGET),armeb)
  63. CPC_TARGET=arm
  64. else
  65. CPC_TARGET=$(PPC_TARGET)
  66. endif
  67. # Default is to generate a compiler for the same
  68. # target as OS_TARGET (a native compiler)
  69. ifndef PPC_OS
  70. PPC_OS=$(OS_TARGET)
  71. endif
  72. # Where to place the unit files.
  73. CPU_UNITDIR=$(CPC_TARGET)
  74. # RTL
  75. UTILSDIR=../utils
  76. # Directories containing compiler sources
  77. COMPILERSOURCEDIR=$(CPC_TARGET) systems
  78. # Utils used by compiler development/installation
  79. COMPILERUTILSDIR=utils
  80. # Default language for the compiler
  81. ifndef FPCLANG
  82. FPCLANG=e
  83. endif
  84. # Local options for the compiler only
  85. ifndef LOCALOPT
  86. LOCALOPT:=$(OPT)
  87. endif
  88. # Options for the RTL only when cycling
  89. ifndef RTLOPT
  90. RTLOPT:=$(OPT)
  91. endif
  92. # Make OPT empty. It is copied to LOCALOPT and RTLOPT
  93. override OPT=
  94. # Message files
  95. MSGFILES=$(wildcard msg/error*.msg)
  96. # ppcSUFFIX
  97. ifeq ($(CPC_TARGET),i386)
  98. CPUSUF=386
  99. endif
  100. ifeq ($(CPC_TARGET),alpha)
  101. CPUSUF=axp
  102. endif
  103. ifeq ($(CPC_TARGET),m68k)
  104. CPUSUF=68k
  105. endif
  106. ifeq ($(CPC_TARGET),powerpc)
  107. CPUSUF=ppc
  108. endif
  109. ifeq ($(CPC_TARGET),powerpc64)
  110. CPUSUF=ppc64
  111. endif
  112. ifeq ($(CPC_TARGET),sparc)
  113. CPUSUF=sparc
  114. endif
  115. ifeq ($(CPC_TARGET),x86_64)
  116. CPUSUF=x64
  117. endif
  118. ifeq ($(CPC_TARGET),arm)
  119. CPUSUF=arm
  120. endif
  121. # Do not define the default -d$(CPU_TARGET) because that
  122. # will conflict with our -d$(CPC_TARGET)
  123. NOCPUDEF=1
  124. # Default message file
  125. MSGFILE=msg/error$(FPCLANG).msg
  126. # Define Unix also for Linux
  127. ifeq ($(OS_TARGET),linux)
  128. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  129. override LOCALOPT+=-dUNIX
  130. endif
  131. endif
  132. ifeq ($(OS_TARGET),freebsd)
  133. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  134. override LOCALOPT+=-dUNIX
  135. endif
  136. endif
  137. REVINC:=$(wildcard revision.inc)
  138. ifneq ($(REVINC),)
  139. override LOCALOPT+=-dREVINC
  140. ifeq ($(REVSTR),)
  141. SVNVERSION:=$(wildcard svnversion$(EXEEXT))
  142. REVSTR:=$(shell svnversion .)
  143. export REVSTR
  144. endif
  145. endif
  146. # set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
  147. override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
  148. # i386 specific
  149. ifeq ($(PPC_TARGET),i386)
  150. override LOCALOPT+=-Fux86
  151. endif
  152. # x86_64 specific
  153. ifeq ($(PPC_TARGET),x86_64)
  154. override LOCALOPT+=-Fux86
  155. endif
  156. # PowerPC specific
  157. ifeq ($(PPC_TARGET),powerpc)
  158. override LOCALOPT+=-Fuppcgen
  159. endif
  160. # PowerPC64 specific
  161. ifeq ($(PPC_TARGET),powerpc64)
  162. override LOCALOPT+=-Fuppcgen
  163. endif
  164. # m68k specific
  165. ifeq ($(PPC_TARGET),m68k)
  166. override LOCALOPT+=-dNOOPT
  167. endif
  168. # Sparc specific
  169. ifeq ($(PPC_TARGET),sparc)
  170. override LOCALOPT+=
  171. endif
  172. # m68k specific with low stack
  173. ifeq ($(PPC_TARGET),m68k)
  174. ifeq ($(OS_TARGET),amiga)
  175. override LOCALOPT+=-Ct
  176. endif
  177. endif
  178. # ARM specific
  179. ifeq ($(PPC_TARGET),arm)
  180. override LOCALOPT+=
  181. endif
  182. [rules]
  183. #####################################################################
  184. # Setup Targets
  185. #####################################################################
  186. ifeq ($(OS_TARGET),win32)
  187. ifdef CMP
  188. override DIFF:=$(CMP) -i218
  189. endif
  190. endif
  191. # Add Local options
  192. override COMPILER+=$(LOCALOPT)
  193. # Disable optimizer when compiled with 1.0.x
  194. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  195. override COMPILER:=$(patsubst -O%,,$(COMPILER))
  196. endif
  197. #####################################################################
  198. # PASDoc
  199. #####################################################################
  200. PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc.exe,$(SEARCHPATH))))
  201. ifeq ($(PASDOC),)
  202. PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc,$(SEARCHPATH))))
  203. endif
  204. ifeq ($(PASDOC),)
  205. PASDOC:=../projects/pasdoc/bin/pasdoc
  206. else
  207. PASDOC:=$(firstword $(PASDOC))
  208. endif
  209. #####################################################################
  210. # Setup os-independent filenames
  211. #####################################################################
  212. ifndef EXENAME
  213. EXENAME=ppc$(CPUSUF)$(EXEEXT)
  214. endif
  215. PPEXENAME=pp$(EXEEXT)
  216. TEMPNAME=ppc$(SRCEXEEXT)
  217. PPCROSSNAME=ppcross$(CPUSUF)$(SRCEXEEXT)
  218. TEMPNAME1=ppc1$(EXEEXT)
  219. TEMPNAME2=ppc2$(EXEEXT)
  220. TEMPNAME3=ppc3$(EXEEXT)
  221. MAKEDEP=ppdep$(EXEEXT)
  222. MSG2INC=./msg2inc$(EXEEXT)
  223. ifdef CROSSINSTALL
  224. INSTALLEXEFILE=$(PPCROSSNAME)
  225. else
  226. INSTALLEXEFILE=$(EXENAME)
  227. endif
  228. #####################################################################
  229. # CPU targets
  230. #####################################################################
  231. PPC_TARGETS=i386 m68k powerpc sparc arm armeb x86_64 powerpc64 alpha vis ia64
  232. .PHONY: $(PPC_TARGETS)
  233. $(PPC_TARGETS):
  234. $(MAKE) PPC_TARGET=$@ CPU_UNITDIR=$@ all
  235. alltargets: $(ALLTARGETS)
  236. #####################################################################
  237. # Default makefile
  238. #####################################################################
  239. .NOTPARALLEL:
  240. .PHONY: all compiler echotime ppuclean execlean clean distclean
  241. all: compiler $(addsuffix _all,$(TARGET_DIRS))
  242. compiler: $(COMPILER_UNITTARGETDIR) $(COMPILER_TARGETDIR) $(EXENAME)
  243. ifeq ($(MAKELEVEL),0)
  244. ifndef STARTTIME
  245. ifdef DATE
  246. STARTTIME:=$(shell $(DATE) +%T)
  247. else
  248. STARTTIME:=unknown
  249. endif
  250. endif
  251. endif
  252. export STARTTIME
  253. ifdef DATE
  254. ENDTIME=$(shell $(DATE) +%T)
  255. else
  256. ENDTIME:=unknown
  257. endif
  258. echotime:
  259. @echo Start $(STARTTIME) now $(ENDTIME)
  260. ppuclean:
  261. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  262. -$(DEL) $(addsuffix /*$(PPUEXT),$(COMPILERSOURCEDIR))
  263. tempclean:
  264. -$(DEL) $(PPCROSSNAME) $(TEMPNAME) $(TEMPNAME1) $(TEMPNAME2) $(TEMPNAME3) $(MSG2INC)
  265. execlean :
  266. -$(DEL) ppc386$(EXEEXT) ppcaxp$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcsparc$(EXEEXT) $(EXENAME)
  267. $(addsuffix _clean,$(ALLTARGETS)):
  268. -$(DELTREE) $(addprefix $(subst _clean,,$@),/units)
  269. -$(DEL) $(addprefix $(subst _clean,,$@)/,*$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT))
  270. -$(DEL) $(addprefix $(subst _clean,,$@)/,ppc386$(EXEEXT) ppcaxp$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcppc$(EXEEXT) $(EXENAME))
  271. cycleclean: cleanall $(addsuffix _clean,$(PPC_TARGET))
  272. -$(DEL) $(EXENAME)
  273. clean: tempclean execlean cleanall $(addsuffix _clean,$(PPC_TARGET)) $(addsuffix _clean,$(TARGET_DIRS))
  274. distclean: tempclean execlean cleanall $(addsuffix _clean,$(ALLTARGETS)) $(addsuffix _distclean,$(TARGET_DIRS))
  275. #####################################################################
  276. # Make targets
  277. #####################################################################
  278. $(MSG2INC): $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(COMPILERUTILSDIR)/msg2inc.pp
  279. $(COMPILER) -FE. $(COMPILERUTILSDIR)/msg2inc.pp
  280. # The msgtxt.inc only depends on the error?.msg file, not on msg2inc,
  281. # because that one will be new almost everytime
  282. msgtxt.inc: $(MSGFILE)
  283. $(MAKE) $(MSG2INC)
  284. $(MSG2INC) $(MSGFILE) msg msg
  285. msg: msgtxt.inc
  286. insdatx86 : $(COMPILER_UNITTARGETDIR) x86/x86ins.dat
  287. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkx86ins.pp
  288. cd x86; ../utils/mkx86ins; mv -f *.inc ../i386
  289. cd x86;../utils/mkx86ins x86_64; mv -f *.inc ../x86_64
  290. insdatarm : arm/armins.dat
  291. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkarmins.pp
  292. cd arm; ../utils/mkarmins
  293. insdat: insdatx86 insdatarm
  294. # Make only the compiler
  295. $(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg \
  296. $(wildcard systems/*.pas) $(wilcard systems/*.inc) \
  297. $(wildcard $(CPC_TARGET)/*.pas) $(wildcard $(CPC_TARGET)/*.inc)
  298. ifneq ($(REVSTR),)
  299. $(ECHOREDIR) "'$(REVSTR)'" > revision.inc
  300. endif
  301. $(COMPILER) pp.pas
  302. $(EXECPPAS)
  303. $(MOVE) $(COMPILER_TARGETDIR)/$(PPEXENAME) $(EXENAME)
  304. #####################################################################
  305. # Cycle targets
  306. #
  307. # 1. Source CPU = Target CPU and Source OS = Target OS
  308. # Normal cycle
  309. #
  310. # 2. Source CPU = Target CPU and Source OS <> Target OS
  311. # First source native compiler
  312. # Second target native compiler (skipped for cross installation)
  313. #
  314. # 3. Source CPU <> Target CPU
  315. # First source native compiler
  316. # Second cross compiler
  317. # Third target native compiler (skipped for cross installation)
  318. #
  319. #####################################################################
  320. ifeq ($(CPU_SOURCE),$(PPC_TARGET))
  321. ifeq ($(OS_SOURCE),$(OS_TARGET))
  322. ##########################
  323. # Normal cycle
  324. #
  325. # Used to avoid unnecessary steps
  326. ifdef DIFF
  327. ifdef OLDFPC
  328. ifneq ($(OS_TARGET),darwin)
  329. DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
  330. else
  331. DIFFRESULT:=$(shell cp $(OLDFPC) $(OLDFPC).tmp; cp $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; rm $(OLDFPC).tmp $(FPC).tmp)
  332. endif
  333. else
  334. DIFFRESULT=Not equal
  335. endif
  336. else
  337. DIFFRESULT=No diff program
  338. endif
  339. ifndef DIFFRESULT
  340. next :
  341. @echo $(OLDFPC) and $(FPC) are equal
  342. $(COPY) $(FPC) $(EXENAME)
  343. else
  344. next :
  345. $(MAKE) rtlclean rtl
  346. $(MAKE) cycleclean compiler
  347. $(MAKE) echotime
  348. endif
  349. $(TEMPNAME1) :
  350. $(MAKE) 'OLDFPC=' next
  351. -$(DEL) $(TEMPNAME1)
  352. $(MOVE) $(EXENAME) $(TEMPNAME1)
  353. $(TEMPNAME2) : $(TEMPNAME1)
  354. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME1)' 'OLDFPC=' next
  355. -$(DEL) $(TEMPNAME2)
  356. $(MOVE) $(EXENAME) $(TEMPNAME2)
  357. $(TEMPNAME3) : $(TEMPNAME2)
  358. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME2)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME1)' next
  359. -$(DEL) $(TEMPNAME3)
  360. $(MOVE) $(EXENAME) $(TEMPNAME3)
  361. cycle:
  362. $(MAKE) tempclean $(TEMPNAME3)
  363. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next
  364. $(DIFF) $(TEMPNAME3) $(EXENAME)
  365. $(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAME)'
  366. $(MAKE) echotime
  367. else
  368. ##########################
  369. # Cross Target cycle
  370. #
  371. cycle:
  372. # ppc (source native)
  373. $(MAKE) OS_TARGET=$(OS_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
  374. $(MAKE) OS_TARGET=$(OS_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
  375. # ppcross<ARCH> (source native)
  376. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
  377. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) EXENAME=$(PPCROSSNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
  378. # ppc<ARCH> (target native)
  379. ifndef CROSSINSTALL
  380. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' rtlclean rtl
  381. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' cycleclean compiler
  382. endif
  383. endif
  384. else
  385. ##########################
  386. # Cross CPU cycle
  387. #
  388. # ppc1 = native
  389. # ppc2 = cross running on this platform
  390. # ppc3/ppcXXX = native (skipped for cross installation)
  391. #
  392. cycle:
  393. # ppc (source native)
  394. # Clear detected compiler binary, because it can be existing crosscompiler binary, but we need native compiler here
  395. override FPC=
  396. $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
  397. $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
  398. # ppcross<ARCH> (source native)
  399. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
  400. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) PPC_TARGET=$(CPU_TARGET) EXENAME=$(PPCROSSNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
  401. # ppc<ARCH> (target native)
  402. ifndef CROSSINSTALL
  403. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' 'OPT=$(OPT) $(CROSSOPT)' rtlclean rtl
  404. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' 'OPT=$(OPT) $(CROSSOPT)' cycleclean compiler
  405. endif
  406. endif
  407. cycledep:
  408. $(MAKE) cycle USEDEPEND=1
  409. extcycle:
  410. $(MAKE) cycle OPT='-n -OG2p3 -glttt -CRriot -dEXTDEBUG'
  411. cvstest:
  412. $(MAKE) cycle 'LOCALOPT=-n -Se' 'RTLOPT=-n -Se'
  413. ##########################
  414. # Full cycle
  415. #
  416. # 1. build a compiler using cycle
  417. # 2. remove all .ppufiles
  418. # 3. build all supported cross compilers except the
  419. # current PPC_TARGET which was already build
  420. #
  421. full: fullcycle
  422. fullcycle:
  423. $(MAKE) cycle
  424. $(MAKE) ppuclean
  425. $(MAKE) $(filter-out $(PPC_TARGET),$(CYCLETARGETS)) 'FPC=$(BASEDIR)/$(EXENAME)'
  426. #####################################################################
  427. # Docs
  428. #####################################################################
  429. htmldocs:
  430. $(PASDOC) -p -h -o html$(PATHSEP)$(PPC_TARGET) -d fpc -d gdb -d $(PPC_TARGET) -u $(PPC_TARGET) $(PPC_TARGET)$(PATHSEP)*.pas systems$(PATHSEP)*.pas *.pas
  431. #####################################################################
  432. # Installation
  433. #####################################################################
  434. .PHONY: quickinstall install installsym
  435. MSGINSTALLDIR=$(INSTALL_BASEDIR)/msg
  436. override PPEXEFILE:=$(wildcard $(EXENAME))
  437. ifdef UNIXHier
  438. PPCCPULOCATION=$(INSTALL_BASEDIR)
  439. else
  440. PPCCPULOCATION=$(INSTALL_BINDIR)
  441. endif
  442. # This will only install the ppcXXX executable, not the message files etc.
  443. quickinstall: $(addsuffix _install,$(TARGET_DIRS))
  444. # Install ppcXXX executable, for a cross installation we install
  445. # the ppcrossXXX as ppcXXX. The target native build ppcXXX is not used
  446. # for this installation type
  447. ifneq ($(INSTALLEXEFILE),)
  448. ifdef UPXPROG
  449. -$(UPXPROG) $(INSTALLEXEFILE)
  450. endif
  451. $(MKDIR) $(PPCCPULOCATION)
  452. $(INSTALLEXE) $(INSTALLEXEFILE) $(PPCCPULOCATION)/$(INSTALLEXEFILE)
  453. endif
  454. install: quickinstall
  455. ifndef CROSSINSTALL
  456. ifdef UNIXHier
  457. $(MKDIR) $(INSTALL_BASEDIR)
  458. $(INSTALLEXE) $(COMPILERUTILSDIR)/samplecfg $(INSTALL_BASEDIR)/samplecfg
  459. endif
  460. $(MKDIR) $(MSGINSTALLDIR)
  461. $(INSTALL) $(MSGFILES) $(MSGINSTALLDIR)
  462. endif
  463. # This also installs a link from bin to the actual executable.
  464. # The .deb does that later.
  465. installsymlink: install
  466. ifneq ($(PPCCPULOCATION),$(INSTALL_BINDIR))
  467. $(MKDIR) $(INSTALL_BINDIR)
  468. ln -sf $(INSTALL_BASEDIR)/$(EXENAME) $(INSTALL_BINDIR)/$(EXENAME)
  469. endif
  470. #####################################################################
  471. # RTL
  472. #####################################################################
  473. .PHONY: rtl rtlclean rtlinstall
  474. rtl:
  475. $(MAKE) -C $(PACKAGEDIR_RTL) 'OPT=$(RTLOPT)' all
  476. rtlclean:
  477. $(MAKE) -C $(PACKAGEDIR_RTL) clean
  478. rtlinstall:
  479. $(MAKE) -C $(PACKAGEDIR_RTL) install
  480. #####################################################################
  481. # local user configurable file
  482. # in makefile.loc you can add any desired target
  483. #####################################################################
  484. localmake:=$(strip $(wildcard makefile.loc))
  485. ifdef localmake
  486. include ./$(localmake)
  487. endif