Makefile 19 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  1. #
  2. # Makefile generated by fpcmake v0.99.13 [2000/01/14]
  3. #
  4. defaultrule: info
  5. #####################################################################
  6. # Autodetect OS (Linux or Dos or Windows NT)
  7. # define inlinux when running under linux
  8. # define inWinNT when running under WinNT
  9. #####################################################################
  10. # We need only / in the path
  11. override PATH:=$(subst \,/,$(PATH))
  12. # Search for PWD and determine also if we are under linux
  13. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
  14. ifeq ($(PWD),)
  15. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
  16. ifeq ($(PWD),)
  17. nopwd:
  18. @echo You need the GNU utils package to use this Makefile!
  19. @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
  20. @exit
  21. else
  22. inlinux=1
  23. endif
  24. else
  25. PWD:=$(firstword $(PWD))
  26. endif
  27. # Detect NT - NT sets OS to Windows_NT
  28. ifndef inlinux
  29. ifeq ($(OS),Windows_NT)
  30. inWinNT=1
  31. endif
  32. endif
  33. # Detect OS/2 - OS/2 has OS2_SHELL defined
  34. ifndef inlinux
  35. ifndef inWinNT
  36. ifdef OS2_SHELL
  37. inOS2=1
  38. endif
  39. endif
  40. endif
  41. # The extension of executables
  42. ifdef inlinux
  43. EXEEXT=
  44. else
  45. EXEEXT=.exe
  46. endif
  47. # The path which is searched separated by spaces
  48. ifdef inlinux
  49. SEARCHPATH=$(subst :, ,$(PATH))
  50. else
  51. SEARCHPATH=$(subst ;, ,$(PATH))
  52. endif
  53. # Base dir
  54. ifdef PWD
  55. BASEDIR:=$(shell $(PWD))
  56. else
  57. BASEDIR=.
  58. endif
  59. #####################################################################
  60. # FPC version/target Detection
  61. #####################################################################
  62. # What compiler to use ?
  63. ifndef FPC
  64. # Compatibility with old makefiles
  65. ifdef PP
  66. FPC=$(PP)
  67. else
  68. ifdef inOS2
  69. FPC=ppos2$(EXEEXT)
  70. else
  71. FPC=ppc386$(EXEEXT)
  72. endif
  73. endif
  74. endif
  75. # Target OS
  76. ifndef OS_TARGET
  77. OS_TARGET:=$(shell $(FPC) -iTO)
  78. endif
  79. # Source OS
  80. ifndef OS_SOURCE
  81. OS_SOURCE:=$(shell $(FPC) -iSO)
  82. endif
  83. # Target CPU
  84. ifndef CPU_TARGET
  85. CPU_TARGET:=$(shell $(FPC) -iTP)
  86. endif
  87. # Source CPU
  88. ifndef CPU_SOURCE
  89. CPU_SOURCE:=$(shell $(FPC) -iSP)
  90. endif
  91. # FPC version
  92. ifndef FPC_VERSION
  93. FPC_VERSION:=$(shell $(FPC) -iV)
  94. endif
  95. export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
  96. #####################################################################
  97. # FPCDIR Setting
  98. #####################################################################
  99. # Test FPCDIR to look if the RTL dir exists
  100. ifdef FPCDIR
  101. override FPCDIR:=$(subst \,/,$(FPCDIR))
  102. ifeq ($(wildcard $(FPCDIR)/rtl),)
  103. override FPCDIR=wrong
  104. endif
  105. else
  106. override FPCDIR=wrong
  107. endif
  108. # Default FPCDIR
  109. ifeq ($(FPCDIR),wrong)
  110. override FPCDIR=$(BASEDIR)
  111. ifeq ($(wildcard $(FPCDIR)/rtl),)
  112. override FPCDIR=wrong
  113. endif
  114. endif
  115. # Detect FPCDIR
  116. ifeq ($(FPCDIR),wrong)
  117. ifdef inlinux
  118. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  119. else
  120. override FPCDIR:=$(subst /$(FPC)$(EXEEXT),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC)$(EXEEXT),$(SEARCHPATH))))))
  121. endif
  122. endif
  123. #####################################################################
  124. # User Settings
  125. #####################################################################
  126. # Targets
  127. override DIROBJECTS+=$(wildcard compiler rtl utils fcl api fv packages ide)
  128. # Clean
  129. # Install
  130. ZIPTARGET=install
  131. # Defaults
  132. # Directories
  133. # Packages
  134. # Libraries
  135. #####################################################################
  136. # Post Settings
  137. #####################################################################
  138. export RELEASE=1
  139. #####################################################################
  140. # Shell tools
  141. #####################################################################
  142. # echo
  143. ifndef ECHO
  144. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
  145. ifeq ($(ECHO),)
  146. ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
  147. ifeq ($(ECHO),)
  148. ECHO:=echo
  149. else
  150. ECHO:=$(firstword $(ECHO))
  151. endif
  152. else
  153. ECHO:=$(firstword $(ECHO))
  154. endif
  155. endif
  156. # To copy pograms
  157. ifndef COPY
  158. COPY:=cp -fp
  159. endif
  160. # Copy a whole tree
  161. ifndef COPYTREE
  162. COPYTREE:=cp -rfp
  163. endif
  164. # To move pograms
  165. ifndef MOVE
  166. MOVE:=mv -f
  167. endif
  168. # Check delete program
  169. ifndef DEL
  170. DEL:=rm -f
  171. endif
  172. # Check deltree program
  173. ifndef DELTREE
  174. DELTREE:=rm -rf
  175. endif
  176. # To install files
  177. ifndef INSTALL
  178. ifdef inlinux
  179. INSTALL:=install -m 644
  180. else
  181. INSTALL:=$(COPY)
  182. endif
  183. endif
  184. # To install programs
  185. ifndef INSTALLEXE
  186. ifdef inlinux
  187. INSTALLEXE:=install -m 755
  188. else
  189. INSTALLEXE:=$(COPY)
  190. endif
  191. endif
  192. # To make a directory.
  193. ifndef MKDIR
  194. ifdef inlinux
  195. MKDIR:=install -m 755 -d
  196. else
  197. MKDIR:=ginstall -m 755 -d
  198. endif
  199. endif
  200. export ECHO COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  201. #####################################################################
  202. # Default Tools
  203. #####################################################################
  204. # assembler, redefine it if cross compiling
  205. ifndef AS
  206. AS=as
  207. endif
  208. # linker, but probably not used
  209. ifndef LD
  210. LD=ld
  211. endif
  212. # ppas.bat / ppas.sh
  213. ifdef inlinux
  214. PPAS=ppas.sh
  215. else
  216. ifdef inOS2
  217. PPAS=ppas.cmd
  218. else
  219. PPAS=ppas.bat
  220. endif
  221. endif
  222. # also call ppas if with command option -s
  223. ifeq (,$(findstring -s ,$(COMPILER)))
  224. EXECPPAS=
  225. else
  226. EXECPPAS:=@$(PPAS)
  227. endif
  228. # ldconfig to rebuild .so cache
  229. ifdef inlinux
  230. LDCONFIG=ldconfig
  231. else
  232. LDCONFIG=
  233. endif
  234. #####################################################################
  235. # Default extensions
  236. #####################################################################
  237. # Default needed extensions (Go32v2,Linux)
  238. LOADEREXT=.as
  239. PPLEXT=.ppl
  240. PPUEXT=.ppu
  241. OEXT=.o
  242. ASMEXT=.s
  243. SMARTEXT=.sl
  244. STATICLIBEXT=.a
  245. SHAREDLIBEXT=.so
  246. RSTEXT=.rst
  247. FPCMADE=fpcmade
  248. # Go32v1
  249. ifeq ($(OS_TARGET),go32v1)
  250. PPUEXT=.pp1
  251. OEXT=.o1
  252. ASMEXT=.s1
  253. SMARTEXT=.sl1
  254. STATICLIBEXT=.a1
  255. SHAREDLIBEXT=.so1
  256. FPCMADE=fpcmade.v1
  257. endif
  258. # Go32v2
  259. ifeq ($(OS_TARGET),go32v2)
  260. FPCMADE=fpcmade.dos
  261. endif
  262. # Linux
  263. ifeq ($(OS_TARGET),linux)
  264. FPCMADE=fpcmade.lnx
  265. endif
  266. # Win32
  267. ifeq ($(OS_TARGET),win32)
  268. PPUEXT=.ppw
  269. OEXT=.ow
  270. ASMEXT=.sw
  271. SMARTEXT=.slw
  272. STATICLIBEXT=.aw
  273. SHAREDLIBEXT=.dll
  274. FPCMADE=fpcmade.w32
  275. endif
  276. # OS/2
  277. ifeq ($(OS_TARGET),os2)
  278. PPUEXT=.ppo
  279. ASMEXT=.so2
  280. OEXT=.oo2
  281. SMARTEXT=.so
  282. STATICLIBEXT=.ao2
  283. SHAREDLIBEXT=.dll
  284. FPCMADE=fpcmade.os2
  285. endif
  286. # library prefix
  287. LIBPREFIX=lib
  288. ifeq ($(OS_TARGET),go32v2)
  289. LIBPREFIX=
  290. endif
  291. ifeq ($(OS_TARGET),go32v1)
  292. LIBPREFIX=
  293. endif
  294. # determine which .pas extension is used
  295. ifndef PASEXT
  296. ifdef EXEOBJECTS
  297. override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
  298. else
  299. override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
  300. endif
  301. ifeq ($(TESTPAS),)
  302. PASEXT=.pp
  303. else
  304. PASEXT=.pas
  305. endif
  306. endif
  307. #####################################################################
  308. # Default Directories
  309. #####################################################################
  310. # set the prefix directory where to install everything
  311. ifndef PREFIXINSTALLDIR
  312. ifdef inlinux
  313. PREFIXINSTALLDIR=/usr
  314. else
  315. PREFIXINSTALLDIR=/pp
  316. endif
  317. endif
  318. export PREFIXINSTALLDIR
  319. # Where to place the resulting zip files
  320. ifndef DESTZIPDIR
  321. DESTZIPDIR:=$(BASEDIR)
  322. endif
  323. export DESTZIPDIR
  324. #####################################################################
  325. # Install Directories
  326. #####################################################################
  327. # set the base directory where to install everything
  328. ifndef BASEINSTALLDIR
  329. ifdef inlinux
  330. BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
  331. else
  332. BASEINSTALLDIR=$(PREFIXINSTALLDIR)
  333. endif
  334. endif
  335. # set the directory where to install the binaries
  336. ifndef BININSTALLDIR
  337. ifdef inlinux
  338. BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
  339. else
  340. BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
  341. endif
  342. endif
  343. # set the directory where to install the units.
  344. ifndef UNITINSTALLDIR
  345. UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
  346. ifdef UNITSUBDIR
  347. UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
  348. endif
  349. endif
  350. # Where to install shared libraries
  351. ifndef LIBINSTALLDIR
  352. ifdef inlinux
  353. LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
  354. else
  355. LIBINSTALLDIR=$(UNITINSTALLDIR)
  356. endif
  357. endif
  358. # Where the source files will be stored
  359. ifndef SOURCEINSTALLDIR
  360. ifdef inlinux
  361. SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
  362. else
  363. SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
  364. endif
  365. ifdef SOURCESUBDIR
  366. SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
  367. endif
  368. endif
  369. # Where the doc files will be stored
  370. ifndef DOCINSTALLDIR
  371. ifdef inlinux
  372. DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
  373. else
  374. DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
  375. endif
  376. endif
  377. # Where the some extra (data)files will be stored
  378. ifndef DATAINSTALLDIR
  379. DATAINSTALLDIR=$(BASEINSTALLDIR)
  380. endif
  381. #####################################################################
  382. # Redirection
  383. #####################################################################
  384. # Release ? Then force OPT and don't use extra opts via commandline
  385. ifndef REDIRFILE
  386. REDIRFILE=log
  387. endif
  388. ifdef REDIR
  389. ifndef inlinux
  390. override FPC=redir -eo $(FPC)
  391. endif
  392. # set the verbosity to max
  393. override FPCOPT+=-va
  394. override REDIR:= >> $(REDIRFILE)
  395. endif
  396. #####################################################################
  397. # Standard rules
  398. #####################################################################
  399. all: $(addsuffix _all,$(DIROBJECTS))
  400. debug: $(addsuffix _debug,$(DIROBJECTS))
  401. examples: $(addsuffix _examples,$(DIROBJECTS))
  402. test: $(addsuffix _test,$(DIROBJECTS))
  403. smart: $(addsuffix _smart,$(DIROBJECTS))
  404. shared: $(addsuffix _shared,$(DIROBJECTS))
  405. showinstall: $(addsuffix _showinstall,$(DIROBJECTS))
  406. install: $(addsuffix _install,$(DIROBJECTS))
  407. sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
  408. clean: $(addsuffix _clean,$(DIROBJECTS))
  409. cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
  410. require: $(addsuffix _require,$(DIROBJECTS))
  411. .PHONY: all debug examples test smart shared showinstall install sourceinstall clean cleanall require
  412. #####################################################################
  413. # Directories
  414. #####################################################################
  415. OBJECTDIRCOMPILER=1
  416. OBJECTDIRRTL=1
  417. OBJECTDIRUTILS=1
  418. OBJECTDIRFCL=1
  419. OBJECTDIRAPI=1
  420. OBJECTDIRFV=1
  421. OBJECTDIRPACKAGES=1
  422. OBJECTDIRIDE=1
  423. # Dir compiler
  424. ifdef OBJECTDIRCOMPILER
  425. .PHONY: compiler_all compiler_debug compiler_examples compiler_test compiler_smart compiler_shared compiler_showinstall compiler_install compiler_sourceinstall compiler_zipinstall compiler_zipsourceinstall compiler_clean compiler_cleanall compiler_require compiler_info
  426. compiler_all:
  427. $(MAKE) -C compiler all
  428. compiler_debug:
  429. $(MAKE) -C compiler debug
  430. compiler_examples:
  431. $(MAKE) -C compiler examples
  432. compiler_test:
  433. $(MAKE) -C compiler test
  434. compiler_smart:
  435. $(MAKE) -C compiler smart
  436. compiler_shared:
  437. $(MAKE) -C compiler shared
  438. compiler_showinstall:
  439. $(MAKE) -C compiler showinstall
  440. compiler_install:
  441. $(MAKE) -C compiler install
  442. compiler_sourceinstall:
  443. $(MAKE) -C compiler sourceinstall
  444. compiler_zipinstall:
  445. $(MAKE) -C compiler zipinstall
  446. compiler_zipsourceinstall:
  447. $(MAKE) -C compiler zipsourceinstall
  448. compiler_clean:
  449. $(MAKE) -C compiler clean
  450. compiler_cleanall:
  451. $(MAKE) -C compiler cleanall
  452. compiler_require:
  453. $(MAKE) -C compiler require
  454. compiler_info:
  455. $(MAKE) -C compiler info
  456. endif
  457. # Dir rtl
  458. ifdef OBJECTDIRRTL
  459. .PHONY: rtl_all rtl_debug rtl_examples rtl_test rtl_smart rtl_shared rtl_showinstall rtl_install rtl_sourceinstall rtl_zipinstall rtl_zipsourceinstall rtl_clean rtl_cleanall rtl_require rtl_info
  460. rtl_all:
  461. $(MAKE) -C rtl all
  462. rtl_debug:
  463. $(MAKE) -C rtl debug
  464. rtl_examples:
  465. $(MAKE) -C rtl examples
  466. rtl_test:
  467. $(MAKE) -C rtl test
  468. rtl_smart:
  469. $(MAKE) -C rtl smart
  470. rtl_shared:
  471. $(MAKE) -C rtl shared
  472. rtl_showinstall:
  473. $(MAKE) -C rtl showinstall
  474. rtl_install:
  475. $(MAKE) -C rtl install
  476. rtl_sourceinstall:
  477. $(MAKE) -C rtl sourceinstall
  478. rtl_zipinstall:
  479. $(MAKE) -C rtl zipinstall
  480. rtl_zipsourceinstall:
  481. $(MAKE) -C rtl zipsourceinstall
  482. rtl_clean:
  483. $(MAKE) -C rtl clean
  484. rtl_cleanall:
  485. $(MAKE) -C rtl cleanall
  486. rtl_require:
  487. $(MAKE) -C rtl require
  488. rtl_info:
  489. $(MAKE) -C rtl info
  490. endif
  491. # Dir utils
  492. ifdef OBJECTDIRUTILS
  493. .PHONY: utils_all utils_debug utils_examples utils_test utils_smart utils_shared utils_showinstall utils_install utils_sourceinstall utils_zipinstall utils_zipsourceinstall utils_clean utils_cleanall utils_require utils_info
  494. utils_all:
  495. $(MAKE) -C utils all
  496. utils_debug:
  497. $(MAKE) -C utils debug
  498. utils_examples:
  499. $(MAKE) -C utils examples
  500. utils_test:
  501. $(MAKE) -C utils test
  502. utils_smart:
  503. $(MAKE) -C utils smart
  504. utils_shared:
  505. $(MAKE) -C utils shared
  506. utils_showinstall:
  507. $(MAKE) -C utils showinstall
  508. utils_install:
  509. $(MAKE) -C utils install
  510. utils_sourceinstall:
  511. $(MAKE) -C utils sourceinstall
  512. utils_zipinstall:
  513. $(MAKE) -C utils zipinstall
  514. utils_zipsourceinstall:
  515. $(MAKE) -C utils zipsourceinstall
  516. utils_clean:
  517. $(MAKE) -C utils clean
  518. utils_cleanall:
  519. $(MAKE) -C utils cleanall
  520. utils_require:
  521. $(MAKE) -C utils require
  522. utils_info:
  523. $(MAKE) -C utils info
  524. endif
  525. # Dir fcl
  526. ifdef OBJECTDIRFCL
  527. .PHONY: fcl_all fcl_debug fcl_examples fcl_test fcl_smart fcl_shared fcl_showinstall fcl_install fcl_sourceinstall fcl_zipinstall fcl_zipsourceinstall fcl_clean fcl_cleanall fcl_require fcl_info
  528. fcl_all:
  529. $(MAKE) -C fcl all
  530. fcl_debug:
  531. $(MAKE) -C fcl debug
  532. fcl_examples:
  533. $(MAKE) -C fcl examples
  534. fcl_test:
  535. $(MAKE) -C fcl test
  536. fcl_smart:
  537. $(MAKE) -C fcl smart
  538. fcl_shared:
  539. $(MAKE) -C fcl shared
  540. fcl_showinstall:
  541. $(MAKE) -C fcl showinstall
  542. fcl_install:
  543. $(MAKE) -C fcl install
  544. fcl_sourceinstall:
  545. $(MAKE) -C fcl sourceinstall
  546. fcl_zipinstall:
  547. $(MAKE) -C fcl zipinstall
  548. fcl_zipsourceinstall:
  549. $(MAKE) -C fcl zipsourceinstall
  550. fcl_clean:
  551. $(MAKE) -C fcl clean
  552. fcl_cleanall:
  553. $(MAKE) -C fcl cleanall
  554. fcl_require:
  555. $(MAKE) -C fcl require
  556. fcl_info:
  557. $(MAKE) -C fcl info
  558. endif
  559. # Dir api
  560. ifdef OBJECTDIRAPI
  561. .PHONY: api_all api_debug api_examples api_test api_smart api_shared api_showinstall api_install api_sourceinstall api_zipinstall api_zipsourceinstall api_clean api_cleanall api_require api_info
  562. api_all:
  563. $(MAKE) -C api all
  564. api_debug:
  565. $(MAKE) -C api debug
  566. api_examples:
  567. $(MAKE) -C api examples
  568. api_test:
  569. $(MAKE) -C api test
  570. api_smart:
  571. $(MAKE) -C api smart
  572. api_shared:
  573. $(MAKE) -C api shared
  574. api_showinstall:
  575. $(MAKE) -C api showinstall
  576. api_install:
  577. $(MAKE) -C api install
  578. api_sourceinstall:
  579. $(MAKE) -C api sourceinstall
  580. api_zipinstall:
  581. $(MAKE) -C api zipinstall
  582. api_zipsourceinstall:
  583. $(MAKE) -C api zipsourceinstall
  584. api_clean:
  585. $(MAKE) -C api clean
  586. api_cleanall:
  587. $(MAKE) -C api cleanall
  588. api_require:
  589. $(MAKE) -C api require
  590. api_info:
  591. $(MAKE) -C api info
  592. endif
  593. # Dir fv
  594. ifdef OBJECTDIRFV
  595. .PHONY: fv_all fv_debug fv_examples fv_test fv_smart fv_shared fv_showinstall fv_install fv_sourceinstall fv_zipinstall fv_zipsourceinstall fv_clean fv_cleanall fv_require fv_info
  596. fv_all:
  597. $(MAKE) -C fv all
  598. fv_debug:
  599. $(MAKE) -C fv debug
  600. fv_examples:
  601. $(MAKE) -C fv examples
  602. fv_test:
  603. $(MAKE) -C fv test
  604. fv_smart:
  605. $(MAKE) -C fv smart
  606. fv_shared:
  607. $(MAKE) -C fv shared
  608. fv_showinstall:
  609. $(MAKE) -C fv showinstall
  610. fv_install:
  611. $(MAKE) -C fv install
  612. fv_sourceinstall:
  613. $(MAKE) -C fv sourceinstall
  614. fv_zipinstall:
  615. $(MAKE) -C fv zipinstall
  616. fv_zipsourceinstall:
  617. $(MAKE) -C fv zipsourceinstall
  618. fv_clean:
  619. $(MAKE) -C fv clean
  620. fv_cleanall:
  621. $(MAKE) -C fv cleanall
  622. fv_require:
  623. $(MAKE) -C fv require
  624. fv_info:
  625. $(MAKE) -C fv info
  626. endif
  627. # Dir packages
  628. ifdef OBJECTDIRPACKAGES
  629. .PHONY: packages_all packages_debug packages_examples packages_test packages_smart packages_shared packages_showinstall packages_install packages_sourceinstall packages_zipinstall packages_zipsourceinstall packages_clean packages_cleanall packages_require packages_info
  630. packages_all:
  631. $(MAKE) -C packages all
  632. packages_debug:
  633. $(MAKE) -C packages debug
  634. packages_examples:
  635. $(MAKE) -C packages examples
  636. packages_test:
  637. $(MAKE) -C packages test
  638. packages_smart:
  639. $(MAKE) -C packages smart
  640. packages_shared:
  641. $(MAKE) -C packages shared
  642. packages_showinstall:
  643. $(MAKE) -C packages showinstall
  644. packages_install:
  645. $(MAKE) -C packages install
  646. packages_sourceinstall:
  647. $(MAKE) -C packages sourceinstall
  648. packages_zipinstall:
  649. $(MAKE) -C packages zipinstall
  650. packages_zipsourceinstall:
  651. $(MAKE) -C packages zipsourceinstall
  652. packages_clean:
  653. $(MAKE) -C packages clean
  654. packages_cleanall:
  655. $(MAKE) -C packages cleanall
  656. packages_require:
  657. $(MAKE) -C packages require
  658. packages_info:
  659. $(MAKE) -C packages info
  660. endif
  661. # Dir ide
  662. ifdef OBJECTDIRIDE
  663. .PHONY: ide_all ide_debug ide_examples ide_test ide_smart ide_shared ide_showinstall ide_install ide_sourceinstall ide_zipinstall ide_zipsourceinstall ide_clean ide_cleanall ide_require ide_info
  664. ide_all:
  665. $(MAKE) -C ide all
  666. ide_debug:
  667. $(MAKE) -C ide debug
  668. ide_examples:
  669. $(MAKE) -C ide examples
  670. ide_test:
  671. $(MAKE) -C ide test
  672. ide_smart:
  673. $(MAKE) -C ide smart
  674. ide_shared:
  675. $(MAKE) -C ide shared
  676. ide_showinstall:
  677. $(MAKE) -C ide showinstall
  678. ide_install:
  679. $(MAKE) -C ide install
  680. ide_sourceinstall:
  681. $(MAKE) -C ide sourceinstall
  682. ide_zipinstall:
  683. $(MAKE) -C ide zipinstall
  684. ide_zipsourceinstall:
  685. $(MAKE) -C ide zipsourceinstall
  686. ide_clean:
  687. $(MAKE) -C ide clean
  688. ide_cleanall:
  689. $(MAKE) -C ide cleanall
  690. ide_require:
  691. $(MAKE) -C ide require
  692. ide_info:
  693. $(MAKE) -C ide info
  694. endif
  695. #####################################################################
  696. # Local Makefile
  697. #####################################################################
  698. ifneq ($(wildcard fpcmake.loc),)
  699. include fpcmake.loc
  700. endif
  701. #####################################################################
  702. # Users rules
  703. #####################################################################
  704. #####################################################################
  705. # Main targets
  706. #####################################################################
  707. .PHONY: compiler_cycle \
  708. idezips ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip \
  709. fclzip gtkzip fvzip compilerzip utilszip
  710. info:
  711. @echo
  712. @echo Please use one of the following targets:
  713. @echo
  714. @echo $(DIROBJECTS)
  715. @echo
  716. @echo All targets can follow after a _ with:
  717. @echo all,clean,install,staticinstall,sharedinstall
  718. @echo
  719. @echo example: make api_staticinstall
  720. @exit
  721. #####################################################################
  722. # Dependencies
  723. #####################################################################
  724. #######################################
  725. # Compiler
  726. #######################################
  727. compiler_cycle:
  728. $(MAKE) -C compiler cycle
  729. #######################################
  730. # IDE
  731. #######################################
  732. ide_gdb:
  733. $(MAKE) -C ide gdb
  734. ide_full:
  735. $(MAKE) -C ide full
  736. ide_fullgdb:
  737. $(MAKE) -C ide fullgdb
  738. #######################################
  739. # Install targets
  740. #######################################
  741. demo_install:
  742. $(MAKE) -C demo installexamples
  743. man_install:
  744. $(MAKE) -C man installman
  745. #######################################
  746. # Packaging targets
  747. #######################################
  748. ifndef DESTZIPDIR
  749. export DESTZIPDIR:=$(BASEDIR)
  750. endif
  751. idezips: clean ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip
  752. ide_allzip:
  753. $(MAKE) ide_clean
  754. $(MAKE) ide_all
  755. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-fake-$(PACKAGESUFFIX)
  756. ide_gdbzip:
  757. $(MAKE) ide_clean
  758. $(MAKE) ide_gdb
  759. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-gdb-$(PACKAGESUFFIX)
  760. ide_fullzip:
  761. $(MAKE) compiler_clean
  762. $(MAKE) ide_clean
  763. $(MAKE) ide_full
  764. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-comp-$(PACKAGESUFFIX)
  765. ide_fullgdbzip:
  766. $(MAKE) ide_clean
  767. $(MAKE) ide_fullgdb
  768. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-full-$(PACKAGESUFFIX)
  769. fvzip: rtl_clean
  770. $(MAKE) api_clean
  771. $(MAKE) fv_clean
  772. $(MAKE) fv_all
  773. $(MAKE) api_zipinstall ZIPNAME=fv-$(PACKAGESUFFIX)
  774. $(MAKE) fv_zipinstalladd ZIPNAME=fv-$(PACKAGESUFFIX)
  775. gtkzip: rtl_clean
  776. $(MAKE) -C packages gtk_clean
  777. $(MAKE) -C packages gtk_all
  778. $(MAKE) -C packages gtk_zipinstall ZIPNAME=gtk-$(PACKAGESUFFIX)
  779. compilerzip: compiler_clean rtl_clean
  780. $(MAKE) rtl_all
  781. $(MAKE) compiler_all
  782. $(MAKE) compiler_zipinstall ZIPTARGET=quickinstall ZIPNAME=compiler-$(PACKAGESUFFIX)
  783. $(MAKE) rtl_zipinstalladd ZIPNAME=compiler-$(PACKAGESUFFIX)
  784. fclzip: rtl_clean fcl_clean
  785. $(MAKE) fcl_all
  786. $(MAKE) fcl_zipinstall ZIPNAME=fcl-$(PACKAGESUFFIX)
  787. utilszip: utils_clean rtl_clean fcl_clean
  788. $(MAKE) utils_all
  789. $(MAKE) utils_zipinstall ZIPNAME=utils-$(PACKAGESUFFIX)