Makefile 19 KB

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