Makefile 19 KB

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