Makefile 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  1. #
  2. # Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
  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. zipinstall: $(addsuffix _zipinstall,$(DIROBJECTS))
  470. zipinstalladd: $(addsuffix _zipinstalladd,$(DIROBJECTS))
  471. clean: $(addsuffix _clean,$(DIROBJECTS))
  472. cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
  473. depend: $(addsuffix _depend,$(DIROBJECTS))
  474. .PHONY: all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend
  475. #####################################################################
  476. # Package depends
  477. #####################################################################
  478. ifneq ($(wildcard $(RTLDIR)),)
  479. ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
  480. override COMPILEPACKAGES+=rtl
  481. rtl_package:
  482. $(MAKE) -C $(RTLDIR) all
  483. endif
  484. endif
  485. .PHONY: rtl_package
  486. # Target Dirs
  487. OBJECTDIRCOMPILER=1
  488. OBJECTDIRRTL=1
  489. OBJECTDIRUTILS=1
  490. OBJECTDIRPACKAGES=1
  491. OBJECTDIRFCL=1
  492. OBJECTDIRIDE=1
  493. # Dir compiler
  494. ifdef OBJECTDIRCOMPILER
  495. .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
  496. compiler_all:
  497. $(MAKE) -C compiler all
  498. compiler_debug:
  499. $(MAKE) -C compiler debug
  500. compiler_examples:
  501. $(MAKE) -C compiler examples
  502. compiler_test:
  503. $(MAKE) -C compiler test
  504. compiler_smart:
  505. $(MAKE) -C compiler smart
  506. compiler_shared:
  507. $(MAKE) -C compiler shared
  508. compiler_showinstall:
  509. $(MAKE) -C compiler showinstall
  510. compiler_install:
  511. $(MAKE) -C compiler install
  512. compiler_sourceinstall:
  513. $(MAKE) -C compiler sourceinstall
  514. compiler_zipinstall:
  515. $(MAKE) -C compiler zipinstall
  516. compiler_zipinstalladd:
  517. $(MAKE) -C compiler zipinstalladd
  518. compiler_clean:
  519. $(MAKE) -C compiler clean
  520. compiler_cleanall:
  521. $(MAKE) -C compiler cleanall
  522. compiler_depend:
  523. $(MAKE) -C compiler depend
  524. compiler_info:
  525. $(MAKE) -C compiler info
  526. endif
  527. # Dir rtl
  528. ifdef OBJECTDIRRTL
  529. .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
  530. rtl_all:
  531. $(MAKE) -C rtl all
  532. rtl_debug:
  533. $(MAKE) -C rtl debug
  534. rtl_examples:
  535. $(MAKE) -C rtl examples
  536. rtl_test:
  537. $(MAKE) -C rtl test
  538. rtl_smart:
  539. $(MAKE) -C rtl smart
  540. rtl_shared:
  541. $(MAKE) -C rtl shared
  542. rtl_showinstall:
  543. $(MAKE) -C rtl showinstall
  544. rtl_install:
  545. $(MAKE) -C rtl install
  546. rtl_sourceinstall:
  547. $(MAKE) -C rtl sourceinstall
  548. rtl_zipinstall:
  549. $(MAKE) -C rtl zipinstall
  550. rtl_zipinstalladd:
  551. $(MAKE) -C rtl zipinstalladd
  552. rtl_clean:
  553. $(MAKE) -C rtl clean
  554. rtl_cleanall:
  555. $(MAKE) -C rtl cleanall
  556. rtl_depend:
  557. $(MAKE) -C rtl depend
  558. rtl_info:
  559. $(MAKE) -C rtl info
  560. endif
  561. # Dir utils
  562. ifdef OBJECTDIRUTILS
  563. .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
  564. utils_all:
  565. $(MAKE) -C utils all
  566. utils_debug:
  567. $(MAKE) -C utils debug
  568. utils_examples:
  569. $(MAKE) -C utils examples
  570. utils_test:
  571. $(MAKE) -C utils test
  572. utils_smart:
  573. $(MAKE) -C utils smart
  574. utils_shared:
  575. $(MAKE) -C utils shared
  576. utils_showinstall:
  577. $(MAKE) -C utils showinstall
  578. utils_install:
  579. $(MAKE) -C utils install
  580. utils_sourceinstall:
  581. $(MAKE) -C utils sourceinstall
  582. utils_zipinstall:
  583. $(MAKE) -C utils zipinstall
  584. utils_zipinstalladd:
  585. $(MAKE) -C utils zipinstalladd
  586. utils_clean:
  587. $(MAKE) -C utils clean
  588. utils_cleanall:
  589. $(MAKE) -C utils cleanall
  590. utils_depend:
  591. $(MAKE) -C utils depend
  592. utils_info:
  593. $(MAKE) -C utils info
  594. endif
  595. # Dir packages
  596. ifdef OBJECTDIRPACKAGES
  597. .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
  598. packages_all:
  599. $(MAKE) -C packages all
  600. packages_debug:
  601. $(MAKE) -C packages debug
  602. packages_examples:
  603. $(MAKE) -C packages examples
  604. packages_test:
  605. $(MAKE) -C packages test
  606. packages_smart:
  607. $(MAKE) -C packages smart
  608. packages_shared:
  609. $(MAKE) -C packages shared
  610. packages_showinstall:
  611. $(MAKE) -C packages showinstall
  612. packages_install:
  613. $(MAKE) -C packages install
  614. packages_sourceinstall:
  615. $(MAKE) -C packages sourceinstall
  616. packages_zipinstall:
  617. $(MAKE) -C packages zipinstall
  618. packages_zipinstalladd:
  619. $(MAKE) -C packages zipinstalladd
  620. packages_clean:
  621. $(MAKE) -C packages clean
  622. packages_cleanall:
  623. $(MAKE) -C packages cleanall
  624. packages_depend:
  625. $(MAKE) -C packages depend
  626. packages_info:
  627. $(MAKE) -C packages info
  628. endif
  629. # Dir fcl
  630. ifdef OBJECTDIRFCL
  631. .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
  632. fcl_all:
  633. $(MAKE) -C fcl all
  634. fcl_debug:
  635. $(MAKE) -C fcl debug
  636. fcl_examples:
  637. $(MAKE) -C fcl examples
  638. fcl_test:
  639. $(MAKE) -C fcl test
  640. fcl_smart:
  641. $(MAKE) -C fcl smart
  642. fcl_shared:
  643. $(MAKE) -C fcl shared
  644. fcl_showinstall:
  645. $(MAKE) -C fcl showinstall
  646. fcl_install:
  647. $(MAKE) -C fcl install
  648. fcl_sourceinstall:
  649. $(MAKE) -C fcl sourceinstall
  650. fcl_zipinstall:
  651. $(MAKE) -C fcl zipinstall
  652. fcl_zipinstalladd:
  653. $(MAKE) -C fcl zipinstalladd
  654. fcl_clean:
  655. $(MAKE) -C fcl clean
  656. fcl_cleanall:
  657. $(MAKE) -C fcl cleanall
  658. fcl_depend:
  659. $(MAKE) -C fcl depend
  660. fcl_info:
  661. $(MAKE) -C fcl info
  662. endif
  663. # Dir ide
  664. ifdef OBJECTDIRIDE
  665. .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
  666. ide_all:
  667. $(MAKE) -C ide all
  668. ide_debug:
  669. $(MAKE) -C ide debug
  670. ide_examples:
  671. $(MAKE) -C ide examples
  672. ide_test:
  673. $(MAKE) -C ide test
  674. ide_smart:
  675. $(MAKE) -C ide smart
  676. ide_shared:
  677. $(MAKE) -C ide shared
  678. ide_showinstall:
  679. $(MAKE) -C ide showinstall
  680. ide_install:
  681. $(MAKE) -C ide install
  682. ide_sourceinstall:
  683. $(MAKE) -C ide sourceinstall
  684. ide_zipinstall:
  685. $(MAKE) -C ide zipinstall
  686. ide_zipinstalladd:
  687. $(MAKE) -C ide zipinstalladd
  688. ide_clean:
  689. $(MAKE) -C ide clean
  690. ide_cleanall:
  691. $(MAKE) -C ide cleanall
  692. ide_depend:
  693. $(MAKE) -C ide depend
  694. ide_info:
  695. $(MAKE) -C ide info
  696. endif
  697. #####################################################################
  698. # Users rules
  699. #####################################################################
  700. #####################################################################
  701. # Main targets
  702. #####################################################################
  703. .PHONY: compiler_cycle \
  704. idezips ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip \
  705. fclzip gtkzip fvzip compilerzip utilszip
  706. info:
  707. @echo
  708. @echo Please use one of the following targets:
  709. @echo
  710. @echo $(DIROBJECTS)
  711. @echo
  712. @echo All targets can follow after a _ with:
  713. @echo all,clean,install,staticinstall,sharedinstall
  714. @echo
  715. @echo example: make api_staticinstall
  716. @exit
  717. #####################################################################
  718. # Dependencies
  719. #####################################################################
  720. #######################################
  721. # Compiler
  722. #######################################
  723. compiler_cycle:
  724. $(MAKE) -C compiler cycle
  725. #######################################
  726. # IDE
  727. #######################################
  728. ide_gdb:
  729. $(MAKE) -C ide gdb
  730. ide_full:
  731. $(MAKE) -C ide full
  732. ide_fullgdb:
  733. $(MAKE) -C ide fullgdb
  734. #######################################
  735. # Install targets
  736. #######################################
  737. base_install:
  738. $(INSTALL) base/Makefile $(BASEINSTALLDIR)
  739. $(INSTALL) base/makefile.fpc $(BASEINSTALLDIR)
  740. demo_install:
  741. $(MAKE) -C demo installdemo
  742. man_install:
  743. $(MAKE) -C man installman
  744. #######################################
  745. # Packaging targets
  746. #######################################
  747. export DESTZIPDIR:=$(BASEDIR)
  748. idezips: clean ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip
  749. ide_allzip:
  750. $(MAKE) ide_clean
  751. $(MAKE) ide_all
  752. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-fake-$(PACKAGESUFFIX)
  753. ide_gdbzip:
  754. $(MAKE) ide_clean
  755. $(MAKE) ide_gdb
  756. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-gdb-$(PACKAGESUFFIX)
  757. ide_fullzip:
  758. $(MAKE) compiler_clean
  759. $(MAKE) ide_clean
  760. $(MAKE) ide_full
  761. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-comp-$(PACKAGESUFFIX)
  762. ide_fullgdbzip:
  763. $(MAKE) ide_clean
  764. $(MAKE) ide_fullgdb
  765. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-full-$(PACKAGESUFFIX)
  766. fvzip: rtl_clean
  767. $(MAKE) -C packages api_clean
  768. $(MAKE) -C packages fv_clean
  769. $(MAKE) -C packages fv_all
  770. $(MAKE) -C packages api_zipinstall ZIPNAME=fv-$(PACKAGESUFFIX)
  771. $(MAKE) -C packages fv_zipinstalladd ZIPNAME=fv-$(PACKAGESUFFIX)
  772. gtkzip: rtl_clean
  773. $(MAKE) -C packages gtk_clean
  774. $(MAKE) -C packages gtk_all
  775. $(MAKE) -C packages gtk_zipinstall ZIPNAME=gtk-$(PACKAGESUFFIX)
  776. compilerzip: compiler_clean rtl_clean
  777. $(MAKE) rtl_all
  778. $(MAKE) compiler_all
  779. $(MAKE) compiler_zipinstall ZIPTARGET=quickinstall ZIPNAME=compiler-$(PACKAGESUFFIX)
  780. $(MAKE) rtl_zipinstalladd ZIPNAME=compiler-$(PACKAGESUFFIX)
  781. fclzip: rtl_clean fcl_clean
  782. $(MAKE) fcl_all
  783. $(MAKE) fcl_zipinstall ZIPNAME=fcl-$(PACKAGESUFFIX)
  784. utilszip: utils_clean rtl_clean fcl_clean
  785. $(MAKE) utils_all
  786. $(MAKE) utils_zipinstall ZIPNAME=utils-$(PACKAGESUFFIX)